lkml.org 
[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 17 Nov 2008 15:39:20 +0900
From"KOSAKI Motohiro" <>
SubjectRe: [PATCH] mm: evict streaming IO cache first
2008/11/17 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>:
> On Sun, 16 Nov 2008 20:47:20 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> On Sun, 16 Nov 2008 16:20:26 -0500 Rik van Riel <riel@redhat.com> wrote:
>> Anyway, we need to do something.
>>
>> Shouldn't get_scan_ratio() be handling this case already?
>>
> Hmm, could I make a question ?
>
> I think
>
>  - recent_rolated[LRU_FILE] is incremented when file cache is moved from
>    ACTIVE_FILE to INACTIVE_FILE.
>  - recent_scanned[LRU_FILE] is sum of scanning numbers on INACTIVE/ACTIVE list
>    of file.
>  - file caches are added to INACITVE_FILE, at first.
>  - get_scan_ratio() calculates %file to be
>
>                         file        recent rotated.
>   %file = IO_cost * ------------ / -------------
>                      anon + file    recent scanned.

rewote by div to mul changing.


                        file               recent scanned.
  %file = IO_cost * ------------ * -------------
                     anon + file       recent rotated.

> But when "files are used by streaming or some touch once application",
> there is no rotation because they are in INACTIVE FILE at first add_to_lru().
> But recent_rotated will not increase while recent_scanned goes bigger and bigger.

Yup.

> Then %file goes to 0 rapidly.

I think reverse.

The problem is, when streaming access started right after, recent
scanned isn't so much.
then %file don't reach 100%.

then, few anon pages swaped out althouth memory pressure isn't so heavy.


\
 
 \ /
  Last update: 2008-11-17 07:41    [from the cache]
©2003-2008