Re: PGD Modification

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

 



Hi Bahadir....sorry for this late reply...

> AFAIK Linux has per-process pgds (Page Global Directory). When a
> kernel mapping changes such that a pmd mapping must be changed on the
> pgd, is this done one by one to every per-process pgd on the system?
> Is this not a frequent case? Are kernel mappings rarely changed? For
> example kmalloc/kfree could cause a new page to be mapped/removed that
> could cause change of a pmd mapping on the current (and I presume
> every other) pgd.

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. In short, whatever is changing inside kernel space, all user space 
processes will be aware of it. So, if a mapping is gone, it's gone from user 
space's point of view, it there is new one, user space will know too and so 
on.

However (again, it's IMHO), it doesn't mean the user space will receive some 
kind of "announcement" if a mapping is created/modified/gone. It's up to the 
coordination between kernel and user space to work on it. For example, 
kfree()-ing an used kernel buffer that still transfer a data to user space is 
a bad thing... user space will lost the virtual address of the kernel buffer 
and the copy in progress will be crippled.

regards,

Mulyadi


--
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