Commit Graph

93 Commits

Author SHA1 Message Date
pooka
d8e04c9094 to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
para
608fba6393 make condition for ENOMEM consistent with allocation requirement 2014-04-02 18:09:10 +00:00
para
c28aad1c2f bt_refill is and must be called with VM_NOSLEEP set, assert this
fix error path if pool_get returns NULL
2014-04-02 16:14:50 +00:00
mlelstv
43b8706dc0 Incorrect use of pointer arithmetic.
CID 1193195:  Extra sizeof expression
2014-03-20 06:48:22 +00:00
pooka
1ac307e403 kill undesirable #ifndef _RUMPKERNEL 2014-03-11 20:32:05 +00:00
para
e3e2479f22 replace vmem(9) custom boundary tag allocation with a pool(9) 2014-02-17 20:40:06 +00:00
christos
471b216b8f convert vmem, signals, powerhooks from CIRCLEQ -> TAILQ. 2013-11-22 21:04:11 +00:00
martin
6a2419fedf Turn a few __unused into __diagused 2013-10-25 11:35:55 +00:00
alnsn
cb7134ee1a Revert the previous commit. 2013-07-22 19:43:54 +00:00
alnsn
f346ebebc0 Always terminate qc_name with NUL because pool_init(9) uses
strcmp(3) to compare wchans.
2013-07-18 19:39:49 +00:00
yamt
0f92d1cdeb update comments 2013-03-06 11:20:10 +00:00
christos
a67c3c8971 printflike maintenance. 2013-02-09 00:31:21 +00:00
skrll
8668323de3 Fix release of vmem_btag_lock (don't release twice in error path) 2013-02-08 09:30:01 +00:00
para
19d40baab3 make vmem(9) ready to be used early during bootstrap to replace extent(9)
pass memory for vmem structs into the initialization function and
do away with the static pool of vmem structs.
remove special bootstrapping of the quantum cache pools of the kmem_va_arena
as memory for pool_caches is allocated via pool_allocator_meta which is
fully operational at this point.
2013-01-29 21:26:24 +00:00
para
39dafdefa9 revert previous commit not yet fully functional, sorry 2013-01-26 15:18:00 +00:00
para
cca299e0a3 make vmem(9) ready to be used early during bootstrap to replace extent(9).
pass memory for vmem structs into the initialization functions and
do away with the static pools for this.
factor out the vmem internal structures into a private header.
remove special bootstrapping of the kmem_va_arena as all necessary memory
comes from pool_allocator_meta wich is fully operational at this point.
2013-01-26 13:50:33 +00:00
para
493b8304e5 fix a lock order reversal during global boundary tag refill.
thanks to chuq@
xxx: request pullup
2013-01-04 08:28:38 +00:00
joerg
ed602fb487 Don't use const foo const as type, one const is enough. 2012-09-13 21:44:49 +00:00
para
192ae8787d rework boundary-tag reserve calculation, make it more precise.
add comment about the rational behind the sizing of certain vars
used by allocation and bootstrap.
as requested by yamt@
2012-09-01 12:28:58 +00:00
njoly
05acbbfb30 Remove final ';' from CONDVAR_DECL macro. The caller already adds its
own.
2012-07-30 17:49:24 +00:00
para
abfefc8c5f make accounting for vm_inuse sane
while here don't statically allocated for more caches then required
2012-03-04 14:28:49 +00:00
para
4c23b30cff proper sizing of kmem_arena on different ports
PR port-i386/45946: Kernel locks up in VMEM system
2012-02-10 17:35:47 +00:00
para
e253ed8e30 allocate uareas and buffers from kernel_map again
add code to drain pools if kmem_arena runs out of space
2012-02-01 23:43:49 +00:00
para
4c6d5e038d do the bookkeeping right 2012-01-30 17:35:18 +00:00
rmind
3892f469e5 - vmem_xalloc: remove call to uvm_kick_pdaemon() as it is not right.
- Reduce some #ifdefs.  Misc.
2012-01-29 17:27:37 +00:00
para
33c295ed5b move condvar calls under interlock protection
call uvm_kick_pdaemon in case we can sleep and no space in arena
2012-01-29 13:38:15 +00:00
rmind
9ff9ca4853 - Make subr_vmem.c compile as standalone again.
- Reduce some #ifdefs.
2012-01-28 23:05:48 +00:00
para
e62ee4d475 extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged
2012-01-27 19:48:38 +00:00
yamt
c7b8df0b85 revert a debug printf slipped in with subr_vmem.c rev.1.64.
pointed out by Nicolas Joly.
2011-10-20 03:05:14 +00:00
yamt
8bde152794 vmem_create: copy the 'name' string rather than just keeping a reference to it.
i think it's what solaris does as at least dtrace relies on this behaviour.
2011-10-19 11:12:37 +00:00
rmind
fe52151587 Avoid return with expression in void functions. 2011-10-15 19:02:27 +00:00
rmind
d551e49456 - Replace calc_order() with ilog2(), wrap into SIZE2ORDER().
- Inline some functions, reduce some #ifdefs.
2011-10-02 21:32:48 +00:00
dyoung
78b0e18345 Report vmem(9) errors out-of-band so that we can use vmem(9) to manage
ranges that include the least and the greatest vmem_addr_t.  Update
vmem(9) uses throughout the kernel.  Slightly expand on the tests in
subr_vmem.c, which still pass.  I've been running a kernel with this
patch without any trouble.
2011-09-02 22:25:08 +00:00
dyoung
64311e1f9d Introduce a couple of new constants, VMEM_ADDR_MIN (the least possible
address in a vmem(9) arena, 0) and VMEM_ADDR_MAX (the maximum possible
address, currently 0xFFFFFFFF).  Modify several boundary conditions so
that a vmem(9) arena can allocate ranges including VMEM_ADDR_MAX.
Update documentation and tests.

These changes pass the tests in sys/kern/subr_vmem.c.  To compile the
and run the test program, run "cd sys/kern/ && gcc -DVMEM_SANITY -o
subr_vmem ./subr_vmem.c && ./subr_vmem".
2011-08-23 22:00:57 +00:00
yamt
e2fcae61c5 comments. related to PR/44969 2011-07-26 13:09:11 +00:00
yamt
ef99b60b5d wrap a long line. 2010-12-17 22:24:11 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
yamt
c69852d701 vmem_rehash_all: remove a debug printf slipped in with the previous changes. 2009-02-18 13:33:46 +00:00
yamt
f68e4571e5 - fix vmem unittest. rename VMEM_DEBUG so that it won't be abused again.
- reimplement vmem sanity checks with less code duplication.
- reimplement ddb vmem-related commands in a more consistent ways.
  remove automatic whatis.
2009-02-18 13:31:59 +00:00
yamt
f4fa6bbef9 bump VMEM_HASHSIZE_MAX from 8192 to 65536. 2009-01-25 13:08:56 +00:00
pooka
8b32829eeb Change VMEM_HASHSIZE_INIT from 1 to 128. This mainly benefits
quick-running or non-threaded rump jobs, where the rehash algorithm
does not have a chance to run.  For other cases it doesn't make
much difference, since the size will grow or decrease when the
rehash algorithm runs for the first time (t=10*hz currently).
2009-01-23 13:45:06 +00:00
ad
50f32f7a93 Put vm_lock into its own cache line. 2008-12-15 10:26:10 +00:00
christos
15e362cca8 fix endif comment 2008-12-10 18:07:30 +00:00
christos
0bff293dd2 disable VMEM_DEBUG by default. 2008-12-10 17:32:32 +00:00
christos
10fdeaec16 vmem_check_sanity is just too expensive for DEBUG. Enable it only for
VMEM_DEBUG.
2008-12-10 16:59:12 +00:00
cegger
33d827105a vmem_check_sanity: refactor overlapping check for better readability.
Move use of vmem_check_sanity into locked sections. Pointed out by ad@
2008-12-09 07:54:59 +00:00
cegger
4dfe7b7870 ddb: make show vmem print exact span type
vmem_check_sanity: print exact span type
vmem_add1: KASSERT span types
2008-12-07 22:39:01 +00:00
cegger
f132fda3fe vmem_check_sanity: fix check to correctly detect even exactly duplicate spans. 2008-12-07 11:49:51 +00:00
cegger
bb1d17f443 build fix: make i386 build again 2008-12-07 09:40:42 +00:00
cegger
2aa8aa0f8f Spans may never overlap. Overlapping spans mean memory corruption
when used by kmem(9), for example.
Do sanity checks to detect such spans on DEBUG kernels.
2008-12-07 02:21:04 +00:00