public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Introduce down_killable()
       [not found] <200804181705.m3IH56W4007130@hera.kernel.org>
@ 2008-04-18 22:34 ` Andrew Morton
  2008-04-18 22:55   ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2008-04-18 22:34 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linux Kernel Mailing List

On Fri, 18 Apr 2008 17:05:06 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> --- a/kernel/semaphore.c
> +++ b/kernel/semaphore.c
> @@ -34,6 +34,7 @@
>  
>  static noinline void __down(struct semaphore *sem);
>  static noinline int __down_interruptible(struct semaphore *sem);
> +static noinline int __down_killable(struct semaphore *sem);
>  static noinline void __up(struct semaphore *sem);

What is the reason for all the noinlines in this file?

Something to do with getting proper wchan output?  I guess it doesn't hurt
from a documentation POV, but did you find that it was actually necessary?

IOW: is gcc now capable of secretly inlining functions which are defined
further ahead in the compilation unit?


(did you actually "test" the wchan stuff, btw?)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Introduce down_killable()
  2008-04-18 22:34 ` Introduce down_killable() Andrew Morton
@ 2008-04-18 22:55   ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2008-04-18 22:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List

On Fri, Apr 18, 2008 at 03:34:55PM -0700, Andrew Morton wrote:
> On Fri, 18 Apr 2008 17:05:06 GMT
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
> 
> > --- a/kernel/semaphore.c
> > +++ b/kernel/semaphore.c
> > @@ -34,6 +34,7 @@
> >  
> >  static noinline void __down(struct semaphore *sem);
> >  static noinline int __down_interruptible(struct semaphore *sem);
> > +static noinline int __down_killable(struct semaphore *sem);
> >  static noinline void __up(struct semaphore *sem);
> 
> What is the reason for all the noinlines in this file?

Copied from kernel/mutex.c ;-)

The reason is to make sure that __down_interruptible (et al) are
out-of-line from down_interruptible, and that __down_common is inlined
into __down_interruptible().

> Something to do with getting proper wchan output?  I guess it doesn't hurt
> from a documentation POV, but did you find that it was actually necessary?
> 
> IOW: is gcc now capable of secretly inlining functions which are defined
> further ahead in the compilation unit?

With -funit-at-a-time, I believe it is capable of that.

> (did you actually "test" the wchan stuff, btw?)

I tested that wchan still produces the right output, yes.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-18 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200804181705.m3IH56W4007130@hera.kernel.org>
2008-04-18 22:34 ` Introduce down_killable() Andrew Morton
2008-04-18 22:55   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox