lkml.org 
[lkml]   [2009]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] respect the referenced bit of KVM guest pages?
Wu Fengguang wrote:
> On Fri, Aug 07, 2009 at 05:09:55AM +0800, Jeff Dike wrote:
>> Side question -
>> Is there a good reason for this to be in shrink_active_list()
>> as opposed to __isolate_lru_page?
>>
>> if (unlikely(!page_evictable(page, NULL))) {
>> putback_lru_page(page);
>> continue;
>> }
>>
>> Maybe we want to minimize the amount of code under the lru lock or
>> avoid duplicate logic in the isolate_page functions.
>
> I guess the quick test means to avoid the expensive page_referenced()
> call that follows it. But that should be mostly one shot cost - the
> unevictable pages are unlikely to cycle in active/inactive list again
> and again.

Please read what putback_lru_page does.

It moves the page onto the unevictable list, so that
it will not end up in this scan again.

>> But if there are important mlock-heavy workloads, this could make the
>> scan come up empty, or at least emptier than we might like.
>
> Yes, if the above 'if' block is removed, the inactive lists might get
> more expensive to reclaim.

Why?

--
All rights reversed.


\
 
 \ /
  Last update: 2009-08-16 05:57    [W:0.157 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site