[lkml]   [2009]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] respect the referenced bit of KVM guest pages?
On 08/05/2009 05:15 PM, Rik van Riel wrote:
>> If that's indeed the case, we can have the EPT ageing mechanism give
>> pages a bit more time around by using an available bit in the EPT
>> PTEs to return accessed on the first pass and not-accessed on the
>> second.
> Can we find out which pages are EPT pages?

No need to (see below).

> If so, we could unmap them when they get moved from the
> active to the inactive list, and soft fault them back in
> on access, emulating the referenced bit for EPT pages and
> making page replacement on them work like it should.

It should be easy to implement via the mmu notifier callback: when the
mm calls clear_flush_young(), mark it as young, and unmap it from the
EPT pagetable.

> Your approximation of pretending the page is accessed the
> first time and pretending it's not the second time sounds
> like it will just lead to less efficient FIFO replacement,
> not to anything even vaguely approximating LRU.

Right, it's just a hack that gives EPT pages higher priority, like the
original patch suggested. Note that LRU for VMs is not a good
algorithm, since the VM will also reference the least recently used
page, leading to thrashing.

error compiling committee.c: too many arguments to function

 \ /
  Last update: 2009-08-05 17:11    [W:0.127 / U:0.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site