Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-20 Thread Alex Thorlton
On Sun, Jan 19, 2014 at 01:41:34AM +0200, Kirill A. Shutemov wrote: > On Thu, Jan 16, 2014 at 03:01:43PM -0600, Alex Thorlton wrote: > > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > > index 91672e2..475f59f 100644 > > --- a/include/linux/huge_mm.h > > +++ b/include/linux/huge_mm

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-18 Thread Kirill A. Shutemov
On Thu, Jan 16, 2014 at 03:01:43PM -0600, Alex Thorlton wrote: > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > index 91672e2..475f59f 100644 > --- a/include/linux/huge_mm.h > +++ b/include/linux/huge_mm.h > @@ -1,6 +1,8 @@ > #ifndef _LINUX_HUGE_MM_H > #define _LINUX_HUGE_MM_H >

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-17 Thread Alex Thorlton
On Fri, Jan 17, 2014 at 11:54:09AM -0800, Andy Lutomirski wrote: > Usual nit: please return -EINVAL if unused args are nonzero. This > makes it possible to extend these APIs in the future. Got it. Thanks, Andy! - Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-17 Thread Alex Thorlton
On Fri, Jan 17, 2014 at 09:09:23PM +0100, Oleg Nesterov wrote: > On 01/16, Alex Thorlton wrote: > > > > + case PR_GET_THP_DISABLE: > > + error = put_user(test_bit(MMF_THP_DISABLE, > > +&me->mm->flags), > > +(int __user *) arg2); >

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-17 Thread Oleg Nesterov
On 01/16, Alex Thorlton wrote: > > + case PR_GET_THP_DISABLE: > + error = put_user(test_bit(MMF_THP_DISABLE, > + &me->mm->flags), > + (int __user *) arg2); > + break; Do we really want put_user? error =

Re: [RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-17 Thread Andy Lutomirski
On Thu, Jan 16, 2014 at 1:01 PM, Alex Thorlton wrote: > This patch adds an mm flag (MMF_THP_DISABLE) to disable transparent > hugepages using prctl. > > --- a/kernel/sys.c > +++ b/kernel/sys.c > @@ -1998,6 +1998,17 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, > arg2, unsigned long, arg3

[RFC PATCHv2 1/2] Add mm flag to control THP

2014-01-16 Thread Alex Thorlton
This patch adds an mm flag (MMF_THP_DISABLE) to disable transparent hugepages using prctl. Changes for v2: * Pulled code for prctl helper functions into prctl to make things more concise. * Changed PRCTL_SET_THP_DISABLE to accept an argument to set/clear the THP_DISABLE bit, instead of having