Re: Avoid grabbing the kernel lock in pool backend allocator

2015-09-05 Thread Mark Kettenis
> From: Alexey Suslikov > Date: Sat, 5 Sep 2015 08:49:17 + (UTC) > > Mark Kettenis xs4all.nl> writes: > > > RCS file: /cvs/src/sys/kern/subr_pool.c,v > > > > > kd.kd_waitok = ISSET(flags, PR_WAITOK); > > > > > + /* > > +* XXX Until we can call msleep(9) without holding the

Re: Avoid grabbing the kernel lock in pool backend allocator

2015-09-05 Thread Alexey Suslikov
Mark Kettenis xs4all.nl> writes: > RCS file: /cvs/src/sys/kern/subr_pool.c,v > kd.kd_waitok = ISSET(flags, PR_WAITOK); > + /* > + * XXX Until we can call msleep(9) without holding the kernel > + * lock. > + */ > + if (ISSET(flags, PR_WAITOK)) It there a reason

Avoid grabbing the kernel lock in pool backend allocator

2015-09-04 Thread Mark Kettenis
At this stage we can actually avoid grabbing the lock in the default pool backend allocator, as long as the PR_WAITOK flag isn't set. This is safe because: * The pmemrange allocator can be called without holding the kernel lock. * On pmap_direct architectures, we simply use the direct map to a