From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Per-cpu patches on top of PDA stuff... Date: Tue, 19 Sep 2006 13:13:37 +1000 Message-ID: <1158635617.21726.8.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.osdl.org Errors-To: virtualization-bounces@lists.osdl.org To: Jeremy Fitzhardinge , virtualization Cc: Andrew Morton , Andi Kleen , Ingo Molnar List-Id: virtualization@lists.linuxfoundation.org Hi Jeremy, all, Sorry this took so long, spent last week in Japan at OSDL conf then netconf. After several false starts, I ended up with a very simple implementation, which clashes significantly with your work since then 8(. I've pushed the patches anyway, but it's going to be significant work for me to re-merge them, so I wanted your feedback first. The first patch simply changes the GDTs to be a straight per-cpu variable. I notice that you did a similar thing with your patches, but this is simpler and avoids wasting space in the UP case. It's a bit tricky since we've never referred to per-cpu vars from asm before, but since we're only referring to the pre-setup versions, it's ok. The second patch changes gs to be the per-cpu offset, and by implication, avoids using it altogether on UP. This avoids a special "pda" structure, instead allowing all per-cpu variables to be accessed this way. It avoids __thread, which I gave up after creating a horribly complicated patch which still didn't quite work, and was no more efficient if we want the kernel to run under Xen anyway. I really think this is the way to go, and I'll start work on merging now. Cheers! Rusty. -- = Help! Save Australia from the worst of the DMCA: http://linux.org.au/law