lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] module: kzalloc mod->ref
Date
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.


\
 
 \ /
  Last update: 2009-01-28 13:27    [W:0.050 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site