From: Andi Kleen <ak@suse.de>
To: rohitseth@google.com
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC, patch] i386: vgetcpu(), take 2
Date: Thu, 22 Jun 2006 01:29:47 +0200 [thread overview]
Message-ID: <200606220129.47546.ak@suse.de> (raw)
In-Reply-To: <1150931922.6885.72.camel@galaxy.corp.google.com>
On Thursday 22 June 2006 01:18, Rohit Seth wrote:
> On Thu, 2006-06-22 at 01:05 +0200, Andi Kleen wrote:
> > On Thursday 22 June 2006 00:59, Rohit Seth wrote:
>
> > > I was thinking of storing it is base address part of the descriptor and
> > > then using the memory load to read it in vsyscall. (Keeping the p bit
> > > to zero in the descriptor).
> >
> > I'm still not sure where and for what you want to use this. In user space
> > or in kernel space? And what information should be stored in there?
> >
>
> Store the kernel virtual pointer in gdt to access pda in (proposed)
> vgetcpu in vsyscall.
> Using this pointer we can easily reach the cpu and
> node numbers and any other information that is there in pda. For the
> cpu and node numbers this will get rid of the need to do a serializing
> operation cpuid.
>
> Does it make any sense?
Ok to spell it out (please correct me if I misinterpreted you). You want to:
- Split PDA into kernel part and user exportable part
- Export user exportable part to ring 3
- Put base address of user exportable part into GDT
- Access it using that.
I don't think it can work because the GDT only supports 32bit
base addresses for code/data segments in long mode and you can't put
a kernel virtual address into 32bit (only user space there)
And you can't get at at the base address anyways because they
are ignored in long mode (except for fs/gs). For fs/gs you would
need to save/restore them to reuse them which would be slow.
You can't also just put them into fs/gs because those are
already reserved for user space.
Also I don't know what other information other than cpu/node
would be useful, so just using the 20 bits of limit seems plenty to me.
-Andi
next prev parent reply other threads:[~2006-06-21 23:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 7:27 [RFC, patch] i386: vgetcpu(), take 2 Chuck Ebbert
2006-06-21 8:15 ` Ingo Molnar
2006-06-21 17:38 ` Artur Skawina
2006-06-28 5:44 ` Paul Jackson
2006-06-28 8:53 ` Andi Kleen
2006-06-28 9:00 ` Ingo Molnar
2006-06-29 8:47 ` Paul Jackson
2006-06-21 9:26 ` Andi Kleen
2006-06-21 9:35 ` Ingo Molnar
2006-06-21 21:54 ` Rohit Seth
2006-06-21 22:21 ` Andi Kleen
2006-06-21 22:59 ` Rohit Seth
2006-06-21 23:05 ` Andi Kleen
2006-06-21 23:18 ` Rohit Seth
2006-06-21 23:29 ` Andi Kleen [this message]
2006-06-22 0:55 ` Rohit Seth
2006-06-22 8:08 ` Andi Kleen
2006-06-22 21:06 ` Rohit Seth
2006-06-22 22:14 ` Andi Kleen
2006-06-22 23:10 ` Rohit Seth
2006-06-23 12:42 ` [discuss] " Andi Kleen
2006-06-24 2:06 ` Rohit Seth
2006-06-24 8:42 ` Andi Kleen
2006-06-27 1:13 ` Rohit Seth
-- strict thread matches above, loose matches on Subject: below --
2006-06-21 12:24 Chuck Ebbert
2006-06-21 17:14 ` Andi Kleen
2006-06-21 17:27 ` Linus Torvalds
2006-06-21 17:50 ` Andi Kleen
2006-06-22 12:23 Chuck Ebbert
2006-06-22 12:44 ` Andi Kleen
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=200606220129.47546.ak@suse.de \
--to=ak@suse.de \
--cc=76306.1226@compuserve.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rohitseth@google.com \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox