Thread (4 messages) 4 messages, 4 authors, 2001-01-18

Re: swapout selection change in pre1

From: Roman Zippel <hidden>
Date: 2001-01-18 15:38:54

Hi,

Rik van Riel wrote:
quoted
Reverse mapping is basically not simple at all. For each page table entry,
you need a

      struct reverse_map {
              /* actual pte pointer is implied by location,
                 if you implement this cleverly, but still
                 needed, of course */
              struct reverse_map *prev, *next;
              struct vm_struct *vma;
      };
Actually, you need only 2 pointers per page.

struct reverse_map {
        pte_t * pte;
        struct reverse_map * next;
};
To keep memory usage low and to still be reasonably fast, we could
restrict the size of a vma to two mmu levels and cache a pointer to the
pmd table in the vma, so you have less to lookup in the page table. It
would also speed up normal mapping/unmapping of entries for
architectures with more than 2 mmu levels. Generic mm code had mostly
only to deal with two mmu levels and e.g could call "pmd =
pmd_alloc_vma(vma, address);" instead of "pgd = pgd_offset(mm, address);
pmd = pmd_alloc(pgd, address);". No idea if this is fast enough for
balancing, but it would simplify other parts. :-)

bye, Roman
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help