Commit Graph

7 Commits

Author SHA1 Message Date
manu 4a466c8fec Added proper locks when calling uvm_swap_stats() 2002-03-29 09:06:54 +00:00
manu 2dd126f08e Fixed the swap block size problem: the swap block size as used in struct
swapent, or as seen in userland, is dbtob(1), which turns to be 512 for all
arch for now.

In struct swapdev, there is another field for block size. This value is private
to uvm_swap.c and is only used for swap I/O on regular files. It is equal to
the underlying device block size and it is not necessarily 512.
2002-03-28 18:45:28 +00:00
manu 9278164721 - now reports accurate swap object size with swapctl(SWAP_STATS)
- Added two more swapctl commands: GETFREESWAP and GETSWAPVIRT.

There is a problem in the way swap block size are found here. See comment
in get_block_size().
2002-03-28 13:14:42 +00:00
manu af187fe983 Added swapctl SC_ADD, SC_REMOVE and SC_SGIADD commands. 2002-03-18 20:34:54 +00:00
manu a8db9077cd Uses the recently introduced uvm_swap_stats() instead of
sys_swapctl(SWAP_STATS). This enable the use of a kernel based
buffer instead of using some temporary memory in the stackgap,
whereas we cannot make sure that the size os the struct swapent array
will fit in it. (it is not known at build time, but the stackgap len
is set at build time).
2002-03-18 17:21:24 +00:00
christos 381e6a7764 make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
2002-03-16 20:43:48 +00:00
manu 431e4d2b95 Added enough of swaptcl() command emulation to get swap -l working. This
is needed by acad (it exec's swap -l to check if swap is enabled)
2002-03-16 13:29:42 +00:00