From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Takashi Iwai <tiwai@suse.de>, Ingo Molnar <mingo@redhat.com>,
Tejun Heo <tj@kernel.org>, Kyle McMartin <kyle@infradead.org>,
linux-kernel@vger.kernel.org, Eric Dumazet <dada1@cosmosbay.com>
Subject: Re: [PATCH] module: kzalloc mod->ref
Date: Wed, 28 Jan 2009 22:54:50 +1030 [thread overview]
Message-ID: <200901282254.51238.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090127131534.GG23121@elte.hu>
On Tuesday 27 January 2009 23:45:34 Ingo Molnar wrote:
>
> * Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> > @@ -344,8 +339,11 @@ struct module
> > /* Destruction function. */
> > void (*exit)(void);
> >
> > - /* Reference counts */
> > - struct module_ref ref[NR_CPUS];
> > +#ifdef CONFIG_SMP
> > + char *refptr;
> > +#else
> > + local_t ref;
> > +#endif
>
> hm, that construct looks rather ugly. Is there no way to provide a clean
> data type and APIs for this that just work symmetrically on both SMP and
> UP?
Part of me agreed when I first read it, but unification means UP would do an alloc as well. Neater, but less efficient.
But maybe these days UP means embedded, and hence no modules anyway :)
Hope that clarifies,
Rusty.
next prev parent reply other threads:[~2009-01-28 12:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 3:35 [PATCH] module: kzalloc mod->ref Kyle McMartin
2009-01-14 5:54 ` [PATCHv2] " Kyle McMartin
2009-01-14 9:09 ` [PATCH] " Takashi Iwai
2009-01-14 15:58 ` Kyle McMartin
2009-01-14 16:25 ` Takashi Iwai
2009-01-14 19:29 ` Valdis.Kletnieks
2009-01-14 20:37 ` Takashi Iwai
2009-01-14 20:53 ` Kyle McMartin
2009-01-14 17:51 ` richard kennedy
2009-01-14 18:17 ` Kyle McMartin
[not found] ` <200901151303.20006.rusty@rustcorp.com.au>
2009-01-25 15:52 ` Richard Kennedy
[not found] ` <200901151521.47326.rusty@rustcorp.com.au>
2009-01-15 6:03 ` Kyle McMartin
[not found] ` <200901261751.21817.rusty@rustcorp.com.au>
2009-01-27 1:36 ` Rusty Russell
2009-01-27 1:58 ` Tejun Heo
2009-01-27 13:15 ` Ingo Molnar
2009-01-28 12:24 ` Rusty Russell [this message]
2009-01-14 10:15 ` richard kennedy
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=200901282254.51238.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=dada1@cosmosbay.com \
--cc=kyle@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tiwai@suse.de \
--cc=tj@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 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.