[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190712071359.GN29483@dhcp22.suse.cz>
Date: Fri, 12 Jul 2019 09:13:59 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Kuo-Hsin Yang <vovoy@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Minchan Kim <minchan@...nel.org>,
Sonny Rao <sonnyrao@...omium.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
stable@...r.kernel.org
Subject: Re: [PATCH] mm: vmscan: scan anonymous pages on file refaults
On Fri 05-07-19 20:45:05, Kuo-Hsin Yang wrote:
> With 4 processes accessing non-overlapping parts of a large file, 30316
> pages swapped out with this patch, 5152 pages swapped out without this
> patch. The swapout number is small comparing to pgpgin.
which is 5 times more swapout. This may be seen to be a lot for
workloads that prefer no swapping (e.g. large in memory databases) with
an occasional heavy IO (e.g. backup). And I am worried those would
regress. I do agree that the current behavior is far from optimal
because the trashing is real. I believe that we really need a different
approach. Johannes has brought this up few years back (sorry I do not
have a link handy) but it was essentially about implementing refault
logic to anonymous memory and swap out based on the refault price. If
there is effectively no swapin then it simply makes more sense to swap
out rather than refault a page cache.
That being said, I am not nacking the patch. Let's see whether something
regresses as there is a no clear cut for the proper behavior. But I am
bringing that up because we really need a better and more robust plan
for the future.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists