Re: disable-cap-mlock

Andrea Arcangeli
2004-04-02T03:07:27Z

On Thu, Apr 01, 2004 at 06:49:07PM -0800, Andrew Morton wrote:
> Andrea Arcangeli <andrea@suse.de> wrote:
> >
> > > One thing I was wondering was whether /proc/sys/vm/disable_cap_mlock should
> > > hold a GID rather than a boolean. So you do
> > >
> > > echo groupof oracle > /proc/sys/vm/disable_cap_mlock
> >
> > that's probably optimal OTOH that would complicate the code, I prefer an
> > obviously safe !disable_cap_mlock, if we want to go complicated we can
> > probably wait the userspace solution ;)
>
> That depends on how you structure the code. If you do it the below way,
> it's a one-liner.

after you did this cleanup effort I'll have to merge your version ;)

>
> (Will the compiler propagate `unlikeliness' out of an inline function?)

it should, both need_resched and signal_pending depends on it, but I
don't think unlikely is correct, it's likely infact, optimizing for an
application returning -EPERM doesn't sound worthwhile, so I'll change it
to "likely".

thanks.