Re: [PATCH] mm/vmscan.c:shrink_list(): check PageSwapCache() after add_to_swap()

Andrew Morton
2004-01-28T21:44:25Z

Nikita Danilov <Nikita@Namesys.COM> wrote:
>
> Hello,
>
> shrink_list() checks PageSwapCache() before calling add_to_swap(), this
> means that anonymous page that is going to be added to the swap right
> now these checks return false and:
>
> (*) it will be unaccounted for in nr_mapped, and
>
> (*) it won't be written to the swap if gfp_flags include __GFP_IO but
> not __GFP_FS.
>
> (Both will happen only on the next round of scanning.)

OK. Does it make a measurable change in any benchmarks?

> Patch below just moves may_enter_fs initialization down. I am not sure
> about (*nr_mapped) increase though.

nr_mapped seems OK.