Messages in this thread | | | From | Rasmus Villemoes <> | Subject | Re: [PATCH] Add per-process flag to control thp | Date | Sun, 04 Aug 2013 14:44:17 +0000 |
| |
Alex Thorlton <athorlton@sgi.com> writes:
> This patch implements functionality to allow processes to disable the use of > transparent hugepages through the prctl syscall.
A few comments:
Is there a reason it shouldn't be possible for a process to un-disable/reenable thp?
> +static inline int transparent_hugepage_enabled(struct vm_area_struct *vma) > +{ > + return !current->thp_disabled & _transparent_hugepage_enabled(vma); > +}
Should probably be &&.
> diff --git a/include/linux/sched.h b/include/linux/sched.h > index 50d04b9..f084c76 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1406,6 +1406,9 @@ struct task_struct { > unsigned int sequential_io; > unsigned int sequential_io_avg; > #endif > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > + int thp_disabled; > +#endif > };
Is there a reason this needs a whole int in task_struct and not just a single bit?
Rasmus
| |