Re: [PATCH] mm: evict streaming IO cache first

From: KAMEZAWA Hiroyuki
Date: Mon Nov 17 2008 - 01:55:21 EST


On Mon, 17 Nov 2008 15:39:20 +0900
"KOSAKI Motohiro" <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:

> rewote by div to mul changing.
>
>
> file recent scanned.
> %file = IO_cost * ------------ * -------------
> anon + file recent rotated.
>
>
Ah, sorry.

> > 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.
>
"few" ?
85Mbytes of used swap while 1.2GBytes of free memory in Gene Heskett's report.
Hmm..

How about resetting zone->recent_scanned/rotated to be some value calculated from
INACTIVE_ANON/INACTIVE_FILE at some time (when the system is enough idle) ?

Thanks,
-Kame



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