On Friday 02 March 2007 08:41, Mulyadi Santosa wrote: > Hello.. > > >> Note those pages now could have two mapping (if they lies inside normal > >> and DMA zone), one is via identity mapping, one is that process's own > >> mapping > > > > Does that mean that kernel memory is swappable/context switched. I.e. > > when the process is "current", he can address the same physical address > > the kernel will when the process is still in the run queue but not > > "current". > > Sorry, I don't understand what you're saying here. Could you elaborate? Well, i was wondering if kernel memory is swappable. > > >> If the kernel wants more, it can do so via temporary mapping (kmap()). > >> By doing it, the highmem pages will be temporarily mapped in the area > >> slightly beyond the end of kernel identity mapping (AFAIK, this is the > >> one we know as the upper 128 MB area, use for vmalloc, fixed linear > > > > I think vmalloc also takes first from the normal zone (since it actually > > uses kmalloc IIRC). > > No, you misunderstood me. I was talking about the "mapping" window, a > place where pages are mapped before they can be accessed. Of course > vmalloc() itself can get free pages from any zone including normal zone. I was also referring to the window. I.e. via the identity mapping. I.e. I am not sure that vmalloc only uses the last 128mb, i.e. 3.8 - 4gb virtual memory addresses. > > In addition, i understand that in (no pae) x86 32bit you have 1MB of 4 > > bytes entries that can be referenced by the MMU (which, i think, can only > > address 1gb of ram pages). > > Not sure if I get this part.... are you referencing about the overall > size of page table entries (PTE)? Yes. I understood that each one is 4 bytes and you have about 1 million of those that can be used at any one time by the MMU (i think). > What about the kernel space? Is it changing when process is switching? > No, it stays there because every processes are practically use the same > kernel mapping for the upper 1GB space. I forgot the details nor which > part of kernel codes that doing this, so that's the best I can descibe > right now. The thing is, IIRC when i saw the description of MMU capabilities, i did some calculations and the page tables the MMU can address at any one time are at most 1gb. If the kernel space is 1GB, what is left for the applications. They will need to address their 0-3gb address space. Even worse, is that from what i understand you are saying. Each application should also have the kernel page tables of 1gb with it. Thus, each application page tables should be able to address 4gb of virtual memory. I have a feeling i did not understand how many virtual pages the MMU can address. Can anyone correct me/clarify? -- Regards, Tzahi. -- Tzahi Fadida Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info WARNING TO SPAMMERS: see at http://members.lycos.co.uk/my2nis/spamwarning.html -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ