[Devel] Re: [PATCH 1/3] nitpick: make simple functions inline

2011-12-16 Thread KOSAKI Motohiro
> -static int notify_on_release(const struct cgroup *cgrp) > +static inline int notify_on_release(const struct cgroup *cgrp) > { > return test_bit(CGRP_NOTIFY_ON_RELEASE,&cgrp->flags); > } > > -static int clone_children(const struct cgroup *cgrp) > +static inline int clone_children(const

[Devel] Re: [PATCH 1/3] nitpick: make simple functions inline

2011-12-13 Thread Li Zefan
22:45, Glauber Costa wrote: > Those are quite simple bit-testing functions that are > only used within this file. Not reason for them not to > be inline. > It's better to leave the optimization decision to gcc. And I've confirmed they are inlined by gcc in my box. (btw, please add "cgroup" pref

[Devel] Re: [PATCH 1/3] nitpick: make simple functions inline

2011-12-12 Thread Tejun Heo
Hello, On Sun, Dec 11, 2011 at 09:44:54PM +0100, Glauber Costa wrote: > On 12/11/2011 07:55 PM, KOSAKI Motohiro wrote: > > Can you please tell us which compiler failed automatic inlining? > > I suspect gcc is enough sane and we don't need this patch. > > Of course we don't need, that's the very d

[Devel] Re: [PATCH 1/3] nitpick: make simple functions inline

2011-12-11 Thread Glauber Costa
On 12/11/2011 07:55 PM, KOSAKI Motohiro wrote: >> -static int notify_on_release(const struct cgroup *cgrp) >> +static inline int notify_on_release(const struct cgroup *cgrp) >>{ >> return test_bit(CGRP_NOTIFY_ON_RELEASE,&cgrp->flags); >>} >> >> -static int clone_children(const struct c