lkml.org 
[lkml]   [2013]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd
On Thu, Apr 11, 2013 at 09:14:19AM +0900, Kamezawa Hiroyuki wrote:
> >
> >nr[lru] at the end there is pages remaining to be scanned not pages
> >scanned already.
>
> yes.
>
> >Did you mean something like this?
> >
> >nr[lru] = scantarget[lru] * percentage / 100 - (scantarget[lru] - nr[lru])
> >
>
> For clarification, this "percentage" means the ratio of remaining scan target of
> another LRU. So, *scanned* percentage is "100 - percentage", right ?
>

Yes, correct.

> If I understand the changelog correctly, you'd like to keep
>
> scantarget[anon] : scantarget[file]
> == really_scanned_num[anon] : really_scanned_num[file]
>

Yes.

> even if we stop scanning in the middle of scantarget. And you introduced "percentage"
> to make sure that both scantarget should be done in the same ratio.
>

Yes.

> So...another lru should scan scantarget[x] * (100 - percentage)/100 in total.
>
> nr[lru] = scantarget[lru] * (100 - percentage)/100 - (scantarget[lru] - nr[lru])
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
> proportionally adjusted scan target already scanned num
>
> = nr[lru] - scantarget[lru] * percentage/100.
>

Yes, you are completely correct. This preserves the original ratio of
anon:file scanning properly.

--
Mel Gorman
SUSE Labs


\
 
 \ /
  Last update: 2013-04-11 11:41    [W:0.089 / U:1.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site