I should add a clarification regarding the per-cpu info. I think the
distinction should be as a separate PML4 entry and not a PDP entry. This
way the kernel can have a single PDP/PD hierarchy that is shared across
all cpus.
The per-cpu magic can be statically hardwired for each cpu via a PML4
entry and maybe a few other pages (per-cpu) creating a PDP/PD
hierarchy. There are two ways to do it.
(1) We can map a page containing the address of the per-cpu globaldata
structure and use %fs in the trap code:
movq $SOME_FIXED_CONSTANT_ADDRESS,%fs
(2) We can map the actual per-cpu globaldata to a fixed address and access
it directly.
Either way will work. I will note that the system code expects 'mycpu'
to be a variable kernel space address representing the location of the
globaldata structure in kernel space and it will get confusde if
'mycpu' returns the same fixed address on every cpu. So the %fs method
may be the best way to go so we don't have to run through all the system
code changing the expectations for 'mycpu'.
-MattHi Matt, just to make sure: when you talking about the globaldata, it is per-cpu, not globaldata for the whole system, am I right? is the CPU_prvspace in machine/globaldata.h the array to keep the per-cpu globaldata? More questions coming :) yyh
Hi Matt, lots of things hang me around by the department open house. thanks for your suggestions. some of them i am not fully understand, but prefer to hold my questions until i see that it starting to trouble me :). will start with the simple solution first and then move on to something complicated. yyh
just for curious: what is recursive pml4 mapping, found from freebsd pmap.h also, freebsd only have a page of PML4 entries, about 4K/64=64 entries, not all 512 (2**9).
You don't have to play such games on AMD64 -- the swapgs instruction is normally used by traps and system calls to load a well-defined address base for that. Note that gs is expected to be used for, but that is a minor detail. Joerg
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tim Tassonis | reiser4 for 2.6.27-rc1 |
| monstr | [PATCH 20/52] [microblaze] heartbeat file |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| David Kastrup | Terminology question about remote branches. |
| Pascal Obry | git svn and the post-receive hook |
| Giuseppe Bilotta | git-svn tags and branches |
| Thomas Glanzmann | fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Andrei Pirvan | apache 1.3.29 + PHP 5.2.6 on OpenBSD 4.4 |
| Richard Stallman | Real men don't attack straw men |
| Jason Dixon | DCBSDCon 2009 - Three Weeks Left |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| John P Poet | Realtek 8111C transmit timed out |
| Gerrit Renker | [PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set... |
| Joerg Roedel | [PATCH 08/10] x86: add checks for sync_single* code |
