[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48767717.9030100@goop.org>
Date: Thu, 10 Jul 2008 13:54:47 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
CC: Mike Travis <travis@....com>, "H. Peter Anvin" <hpa@...or.com>,
Arjan van de Ven <arjan@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Jack Steiner <steiner@....com>, linux-kernel@...r.kernel.org,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [RFC 00/15] x86_64: Optimize percpu accesses
Eric W. Biederman wrote:
> Jeremy Fitzhardinge <jeremy@...p.org> writes:
>
>
>> No, that sounds like a bad idea. For one, how would you enforce it? How would
>> you check for it? It's one of those things that would mostly work and then fail
>> very rarely.
>>
>
> Well the easiest way would be to avoid the letting people take the address of
> per cpu memory, and just provide macros to read/write it. We are 90% of the
> way there already so it isn't a big jump.
>
Well, the x86_X_percpu api is there. But per_cpu() and get_cpu_var()
both explicitly return lvalues which can have their addresses taken.
>> Secondly, I depend on it. I register a percpu structure with Xen to share
>> per-vcpu specific information (interrupt mask, time info, runstate stats, etc).
>>
>
> Well even virtual allocation is likely to break the Xen sharing case as you
> would at least need to compute the physical address and pass it to Xen.
>
Right. At the moment it assumes that the percpu variable is in the
linear mapping, but it could easily do a pagetable walk if necessary.
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists