[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49F7209E.2090405@redhat.com>
Date: Tue, 28 Apr 2009 11:28:30 -0400
From: Rik van Riel <riel@...hat.com>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
CC: Elladan <elladan@...imo.com>, linux-kernel@...r.kernel.org,
linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Swappiness vs. mmap() and interactive response
KOSAKI Motohiro wrote:
>> Next, I set the following:
>>
>> echo 0 > /proc/sys/vm/swappiness
>>
>> ... hoping it would prevent paging out of the UI in favor of file data that's
>> only used once. It did appear to help to a small degree, but not much. The
>> system is still effectively unusable while a file copy is going on.
>>
>> From this, I diagnosed that most likely, the kernel was paging out all my
>> application file mmap() data (such as my executables and shared libraries) in
>> favor of total garbage VM load from the file copy.
I believe your analysis is correct.
When merging the split LRU code upstream, some code was changed
(for scalability reasons) that results in active file pages being
moved to the inactive list any time we evict inactive file pages.
Even if the active file pages are referenced, they are not
protected from the streaming IO.
However, the use-once policy in the VM depends on the active
pages being protected from streaming IO.
A little before the decision to no longer honor the referenced
bit on active file pages was made, we dropped an ugly patch (by
me) after deciding it was just too much of a hack. However, now
that we have _no_ protection for active file pages against large
amounts of streaming IO, we may want to reinstate something like
it. Hopefully in a prettier way...
The old patch is attached for inspiration, discussion and maybe
testing :)
--
All rights reversed.
View attachment "evict-cache-first.patch" of type "text/plain" (2986 bytes)
Powered by blists - more mailing lists