From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Tue, 19 Apr 2011 02:36:10 +0700 Subject: Contents of CR3 register when a kernel thread is executed In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 18/04/2011, limp wrote: > Hi all, > > I am trying to understand in what extend the PGD (page global directory) > value stored in the CR3 register indicate the running process/thread by the > Linux scheduler. > > I know that each process has its own PGD value but what I am confused about > is the value of CR3 register when kernel threads are scheduled. kernel thread(s) simply borrow latest scheduled process's PGD ( that means, the entire address space)....this is done to save unneccessary TLB flush since kernel thread operates in kernel space and that's the same to all processes -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com