mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] mm/filemap.c: ra_submit inline
Date: Fri, 21 Mar 2014 17:20:39 +0100	[thread overview]
Message-ID: <20140321172039.1dee73effddbce3473aa152b@skynet.be> (raw)
In-Reply-To: <20140320145829.fa212e2f15c3199383f3fd11@linux-foundation.org>

On Thu, 20 Mar 2014 14:58:29 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Thu, 20 Mar 2014 22:53:25 +0100 Fabian Frederick <fabf@skynet.be> wrote:
> 
> > f9acc8c7b35a10 ("readahead: sanify file_ra_state names")
> > left ra_submit with a single function call.
> > 
> > Add 'inline' to save some stack (suggested by Andrew Morton).
> > 
> > --- a/mm/readahead.c
> > +++ b/mm/readahead.c
> > @@ -246,7 +246,7 @@ unsigned long max_sane_readahead(unsigned long nr)
> >  /*
> >   * Submit IO for the read-ahead request in file_ra_state.
> >   */
> > -unsigned long ra_submit(struct file_ra_state *ra,
> > +inline unsigned long ra_submit(struct file_ra_state *ra,
> >  		       struct address_space *mapping, struct file *filp)
> >  {
> >  	int actual;
> 
> The ra_submit() callsite in filemap.c will not be able to inline this
> function because its definition is unavailable at compilation time.
> 
> ra_submit() should be made static inline and moved into a header file
> which all callers include.  Probably in mm.h's /* readahead */ section.

Unfortunately, this means __do_page_cache_readahead needs being referenced there which gives the same conclusion : remove its static prefix or I am missing something ?

      reply	other threads:[~2014-03-21 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 21:53 Fabian Frederick
2014-03-20 21:58 ` Andrew Morton
2014-03-21 16:20   ` Fabian Frederick [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=20140321172039.1dee73effddbce3473aa152b@skynet.be \
    --to=fabf@skynet.be \
    --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

all inboxes | Powered by JetHome®