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

VM questions



Hi all,

Some questions:

1. Section 5.3 of UtLVMM says:

       A technique called lazy TLB is employed which avoids unnecessary TLB
       flushes by processes which do not access the userspace page tables.
       The call to switch_mm(), which results in a TLB flush, is avoided by
       "borrowing" the mm_struct used by the previous task and placing it
       in task_struct->active_mm.

   a) What exactly is meant by, and could you provide an example of, a
      process that wants a mm_struct but won't access the userspace page
      tables? What's the point? Doesn't any access to the underlying memory
      pointed to by the mm_struct hit a page table?
   b) If the "userspace page tables" aren't referenced, does that mean that
      the vm_area_struct of the mm_struct won't be used? If so, then what
      values in the mm_struct *are* used?

2. vm_area_struct has a vm_file pointer which UtLVMM describes in section
   5.4 as "The struct file pointer to the file being mapped". And section
   5.4.1 says that it's possible that a "region is backed by a file".

   a) Is vm_file only for memory mapped files, or shared libraries, or the
      executable file, or all of the above, or more, or what?
   b) Are such pages that are covered by the "regions" already backed by 
      a file in need of swapping or not?

3. What is "anonymous" memory? Can you provide examples?

4. vm_area_struct and address_space both have pointers for file operations.
   In line with question 2 above, I'm assuming that the address_space's
   pointers are used with whatever files are applicable (according to the
   answer to 2b). What then is the use for the file operations pointers in
   the vm_area_struct? Are *they* used by the swapper?

As you can see I'm totally confused ;) Please help.

Thanks,
Kirk


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