From: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Denys Vlasenko <vda.linux-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
bblum-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC][PATCH] flexible array implementation
Date: Tue, 21 Jul 2009 10:25:30 -0700 [thread overview]
Message-ID: <1248197130.13249.5520.camel@nimitz> (raw)
In-Reply-To: <1158166a0907210957p6fb73ed7pc7f5bb9f9ad6eac2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, 2009-07-21 at 18:57 +0200, Denys Vlasenko wrote:
> On Tue, Jul 21, 2009 at 6:03 PM, Dave Hansen<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
> > +static inline struct flex_array_part *
> > +__fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags)
> > +{
> > + struct flex_array_part *part = NULL;
> > + if (part_nr > __nr_part_ptrs())
> > + return NULL;
> > + part = fa->parts[part_nr];
> > + if (!part) {
> > + part = kmalloc(FLEX_ARRAY_PART_SIZE, flags);
> > + if (!part)
> > + return NULL;
> > + fa->parts[part_nr] = part;
> > + }
> > + return part;
> > +}
>
> This is far too big to be an inline.
Yeah, I guess I should just leave it to the compiler to inline it since
it's only used in one place.
-- Dave
WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: akpm@linux-foundation.org, containers@lists.linux-foundation.org,
bblum@google.com, linux-kernel@vger.kernel.org,
menage@google.com
Subject: Re: [RFC][PATCH] flexible array implementation
Date: Tue, 21 Jul 2009 10:25:30 -0700 [thread overview]
Message-ID: <1248197130.13249.5520.camel@nimitz> (raw)
In-Reply-To: <1158166a0907210957p6fb73ed7pc7f5bb9f9ad6eac2@mail.gmail.com>
On Tue, 2009-07-21 at 18:57 +0200, Denys Vlasenko wrote:
> On Tue, Jul 21, 2009 at 6:03 PM, Dave Hansen<dave@linux.vnet.ibm.com> wrote:
> > +static inline struct flex_array_part *
> > +__fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags)
> > +{
> > + struct flex_array_part *part = NULL;
> > + if (part_nr > __nr_part_ptrs())
> > + return NULL;
> > + part = fa->parts[part_nr];
> > + if (!part) {
> > + part = kmalloc(FLEX_ARRAY_PART_SIZE, flags);
> > + if (!part)
> > + return NULL;
> > + fa->parts[part_nr] = part;
> > + }
> > + return part;
> > +}
>
> This is far too big to be an inline.
Yeah, I guess I should just leave it to the compiler to inline it since
it's only used in one place.
-- Dave
next prev parent reply other threads:[~2009-07-21 17:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 16:03 [RFC][PATCH] flexible array implementation Dave Hansen
2009-07-21 16:47 ` Mike Waychison
[not found] ` <4A65F13D.6060506-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2009-07-21 17:22 ` Dave Hansen
2009-07-21 17:22 ` Dave Hansen
2009-07-21 16:47 ` Mike Waychison
2009-07-21 16:57 ` Denys Vlasenko
[not found] ` <1158166a0907210957p6fb73ed7pc7f5bb9f9ad6eac2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-07-21 17:25 ` Dave Hansen [this message]
2009-07-21 17:25 ` Dave Hansen
2009-07-21 16:57 ` Denys Vlasenko
2009-07-21 20:18 ` Andrew Morton
2009-07-21 21:56 ` Dave Hansen
2009-07-21 22:33 ` Andrew Morton
2009-07-21 22:33 ` Andrew Morton
[not found] ` <20090721131839.27f3a5aa.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-07-21 21:56 ` Dave Hansen
2009-07-21 20:18 ` Andrew Morton
2009-07-21 20:28 ` Paul Menage
2009-07-21 20:28 ` Paul Menage
-- strict thread matches above, loose matches on Subject: below --
2009-07-21 16:03 Dave Hansen
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=1248197130.13249.5520.camel@nimitz \
--to=dave-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=bblum-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=vda.linux-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.