lkml.org 
[lkml]   [2014]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should beatomic flags
On Tue, Sep 23, 2014 at 07:55:48PM +0900, Tetsuo Handa wrote:
> Zefan Li wrote:
> > Tetsuo reported a hard-to-reproduce kernel crash on RHEL6, which happend
>
> s/happend/happened/
>
> > @@ -1972,6 +1973,14 @@ static inline void memalloc_noio_restore(unsigned int flags)
> > TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs)
> > TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs)
> >
> > +TASK_PFA_TEST(SPREAD_PAGE, spread_page)
> > +TASK_PFA_SET(SPREAD_PAGE, spread_page)
> > +TASK_PFA_CLEAR(SPREAD_PAGE, spread_page)
> > +
> > +TASK_PFA_TEST(SPREAD_SLAB, spread_slab)
> > +TASK_PFA_SET(SPREAD_SLAB, spread_slab)
> > +TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab)
> > +
>
> I wonder how adding 3 macro lines differs from 3 inlined functions.
> Personally, from LXR (source code browser) point of view, inlined functions
> are more friendly than macros. Also, I wonder about the cost of extracting
> macros in a file which is likely included by every file but referenced
> by few files. Speak of SPREAD_PAGE and SPREAD_SLAB, they should be defined
> as inlined functions in include/linux/cpuset.h rather than as macros in
> include/linux/sched.h ?

I think sched.h is fine along w/ inlines for other flags but yeah we
might be better off just open-coding them.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-09-23 15:41    [W:0.100 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site