lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] mm: thp: Add per-mm_struct flag to control THP
On Sun, Jan 12, 2014 at 02:56:00PM +0100, Oleg Nesterov wrote:
> On 01/11, Alex Thorlton wrote:
> >
> > On Sat, Jan 11, 2014 at 04:53:37PM +0100, Oleg Nesterov wrote:
> >
> > > I simply can't understand, this all looks like overkill. Can't you simply add
> > >
> > > #idfef CONFIG_TRANSPARENT_HUGEPAGE
> > > case GET:
> > > error = test_bit(MMF_THP_DISABLE);
> > > break;
> > > case PUT:
> > > if (arg2)
> > > set_bit();
> > > else
> > > clear_bit();
> > > break;
> > > #endif
> > >
> > > into sys_prctl() ?
> >
> > That's probably a better solution. I wasn't sure whether or not it was
> > better to have two functions to handle this, or to have one function
> > handle both. If you think it's better to just handle both with one,
> > that's easy enough to change.
>
> Personally I think sys_prctl() can handle this itself, without a helper.
> But of course I won't argue, this is up to you.
>
> My only point is, the kernel is already huge ;) Imho it makes sense to
> try to lessen the code size, when the logic is simple.

I agree with you here as well. There was a mixed bag of PRCTLs using
helpers vs. ones that put the code right into sys_prctl. I just
arbitrarily chose to use a helper here. I'll switch that over for v2.

- Alex


\
 
 \ /
  Last update: 2014-01-13 20:21    [W:0.067 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site