lkml.org 
[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] 2.5.1-pre5: per-cpu areas
Date
In message <20020318083511.A19810@wotan.suse.de> you write:
> On Sun, Mar 17, 2002 at 06:17:32PM +1100, Rusty Russell wrote:
> > On Fri, 15 Mar 2002 10:13:09 +0100
> > Andi Kleen <ak@suse.de> wrote:
> >
> > > On Fri, Mar 15, 2002 at 03:07:27PM +1100, Rusty Russell wrote:
> > > > They must return an lvalue, otherwise they're useless for 50% of cases
> > > > (ie. assignment). x86_64 can still use its own mechanism for
> > > > arch-specific per-cpu data, of course.
> > >
> > > Assignment should use an own macro (set_this_cpu()) or use per_cpu().
> >
> > So, we'd have "get_this_cpu(x)" and "set_this_cpu(x, y)". So far, so good.
> >
> > struct myinfo
> > {
> > int x;
> > int y;
> > };
> >
> > static struct myinfo mystuff __per_cpu_data;
> >
> > Now how do we set mystuff.x on this CPU?
>
> set_this_cpu(mystuff.x, y) could be eventually supported properly, it just
> needs compiler work (and before that can use address calculation & reference)

I think the effort would be better spent on teaching the compiler
about these special variables, and how to do efficient assignments on
them.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.057 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site