public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Introduce down_killable()
Date: Fri, 18 Apr 2008 16:55:09 -0600	[thread overview]
Message-ID: <20080418225508.GF20637@parisc-linux.org> (raw)
In-Reply-To: <20080418153455.4d0bee30.akpm@linux-foundation.org>

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."

      reply	other threads:[~2008-04-18 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080418225508.GF20637@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox