Re: PGD Modification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/11/06, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi Bahadir....sorry for this late reply...

No problem.. ;-)

Let me put this thing clearer, you mean what will happen if kernel space
mapping changes? I haven't done close observation about it, but from what I
read in UTLK, the kernel does "deferred" update of master kernel Page Global
Directory.

Mulyadi

Yes I mean't the kernel mappings. This is probably quite
arch-specific, but AFAIK a PGD is maintained for each process, and
since the kernel area is fixed, (assuming 1G/3G mapping) it only
requires changing the (cr0 on x86?) pgd pointer register and a
tlb/cache flush upon a context switch.

I was expecting that the kernel memory allocators, (buddy/slab and
anything else allocation related) would change the kernel mappings
frequently if not always, when  some memory is allocated to user or
kernel space. The question is, is it really frequent, if at all?

If the whole of physical memory (up to 4GB in a 32-bit system) is
virtually mapped to the kernel at initialisation, then any time
userland wants memory, tables need modification. Else if it is
partially mapped, as kernel runs out of mapped memory, tables (most
possibly pgds, since they map for bigger chunks) would need
modification. Does anyone know how this is done precisely, say, on
x86?

Back to your comment, lazy modification makes sense, since pgds won't
need updating unless the process it belongs to is scheduled to run.

It's been one of my longer emails for a while ;-)

Thanks,
Bahadir

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux