Re: [PATCH 01/16] mm: delayed page activation

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

 



Wu Fengguang writes:
 > When a page is referenced the second time in inactive_list, mark it with
 > PG_activate instead of moving it into active_list immediately. The actual
 > moving work is delayed to vmscan time.
 > 
 > This implies two essential changes:
 > - keeps the adjecency of pages in lru;

But this change destroys LRU ordering: at the time when shrink_list()
inspects PG_activate bit, information about order in which
mark_page_accessed() was called against pages is lost. E.g., suppose
inactive list initially contained pages

     /* head */ (P1, P2, P3) /* tail */

all of them referenced. Then mark_page_accessed(), is called against P1,
P2, and P3 (in that order). With the old code active list would end up 

     /* head */ (P3, P2, P1) /* tail */

which corresponds to LRU. With delayed page activation, pages are moved
to head of the active list in the order they are analyzed by
shrink_list(), which gives

     /* head */ (P1, P2, P3) /* tail */

on the active list, that is _inverse_ LRU order.

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux