Re: [patch 05/19] split LRU lists into anon & file sets

From: Lee Schermerhorn
Date: Wed Jan 30 2008 - 09:43:19 EST


On Wed, 2008-01-30 at 17:57 +0900, KOSAKI Motohiro wrote:
> Hi Rik, Lee
>
> I found number of scan pages calculation bug.
>
> 1. wrong calculation order
>
> ap *= rotate_sum / (zone->recent_rotated_anon + 1);
>
> when recent_rotated_anon = 100 and recent_rotated_file = 0,
>
> rotate_sum / (zone->recent_rotated_anon + 1)
> = 100 / 101
> = 0
>
> at that time, ap become 0.
>
> 2. wrong fraction omission
>
> nr[l] = zone->nr_scan[l] * percent[file] / 100;
>
> when percent is very small,
> nr[l] become 0.
>
> Test Result:
> (1) $ ./hackbench 150 process 1000
> (2) # sync; echo 3 > /proc/sys/vm/drop_caches
> $ dd if=tmp10G of=/dev/null
> $ ./hackbench 150 process 1000
>
> rvr-split-lru + revert patch of previous mail
> (1) 83.014
> (2) 717.009
>
> rvr-split-lru + revert patch of previous mail + below patch
> (1) 61.965
> (2) 85.444 !!
>
>
> Now, We got 1000% performance improvement against 2.6.24-rc8-mm1 :)
>
>
>
> - kosaki
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>

<snip>

Kosaki-san:

Rik is currently out on holiday and I've been traveling. Just getting
back to rebasing to 24-rc8-mm1. Thank you for your efforts in testing
and tracking down the regressions. I will add your fixes into my tree
and try them out and let you know. Rik mentioned to me that he has a
fix for the "get_scan_ratio()" calculation that is causing us to OOM
kill prematurely--i.e., when we still have lots of swap space to evict
swappable anon. I don't know if it's similar to what you have posted.
Have to wait and see what he says. Meantime, we'll try your patches.

Again, thank you.

Regards,
Lee



--
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/