From: Rusty Russell <rusty@rustcorp.com.au>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH 3/7] Improve alloc_percpu: expose percpu_modalloc and percpu_modfree
Date: Tue, 18 Nov 2008 08:54:52 +1030 [thread overview]
Message-ID: <200811180854.52492.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20081117134713.GA8949@logfs.org>
On Tuesday 18 November 2008 00:17:13 Jörn Engel wrote:
> On Mon, 17 November 2008 13:28:32 +0000, Rusty Russell wrote:
> > +static inline void *percpu_modalloc(unsigned long size, unsigned long align)
> > +{
> > + return kzalloc(size);
> > +}
>
> You didn't test the patches much, did you? :)
No, not UP :) I'd spent over four hours on them, so I figured it was time to
post them and get some concrete discussion.
Compiled and tested now, thanks!
Rusty.
cpualloc: Fixes for CONFIG_SMP=n
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff -r 275b441d957b include/linux/percpu.h
--- a/include/linux/percpu.h Mon Nov 17 23:42:27 2008 +1030
+++ b/include/linux/percpu.h Tue Nov 18 08:52:05 2008 +1030
@@ -79,12 +79,16 @@
#else
static inline void *__alloc_percpu(unsigned long size, unsigned long align)
{
- return kzalloc(size);
+ return kzalloc(size, GFP_KERNEL);
}
static inline void free_percpu(void *pcpuptr)
{
kfree(pcpuptr);
+}
+
+static inline void percpu_alloc_init(void)
+{
}
#endif /* CONFIG_SMP */
next prev parent reply other threads:[~2008-11-17 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 5:48 [PATCH 3/7] Improve alloc_percpu: expose percpu_modalloc and percpu_modfree Rusty Russell
2008-11-17 13:47 ` Jörn Engel
2008-11-17 22:24 ` Rusty Russell [this message]
2008-11-18 9:44 ` Jörn Engel
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=200811180854.52492.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=joern@logfs.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