From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Shi Subject: Re: [PATCH v16 00/22] per memcg lru_lock Date: Mon, 20 Jul 2020 11:01:10 +0800 Message-ID: <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> References: <1594429136-20002-1-git-send-email-alex.shi@linux.alibaba.com> <57c619e7-da7e-198e-3de8-530bf19b9450@linux.alibaba.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8" To: Hugh Dickins Cc: Alexander Duyck , Andrew Morton , Mel Gorman , Tejun Heo , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" 在 2020/7/19 下午11:23, Hugh Dickins 写道: > I noticed that 5.8-rc5, with lrulock v16 applied, took significantly > longer to run loads than without it applied, when there should have been > only slight differences in system time. Comparing /proc/vmstat, something > that stood out was "pgrotated 0" for the patched kernels, which led here: > > If pagevec_lru_move_fn() is now to TestClearPageLRU (I have still not > decided whether that's good or not, but assume here that it is good), > then functions called though it must be changed not to expect PageLRU! > > Signed-off-by: Hugh Dickins Good catch! Thanks a lot, Hugh! except 6 changes should apply, looks we add one more in swap.c file to stop !PageRLU further actions! Many Thanks! Alex @@ -649,7 +647,7 @@ void deactivate_file_page(struct page *page) * In a workload with many unevictable page such as mprotect, * unevictable page deactivation for accelerating reclaim is pointless. */ - if (PageUnevictable(page)) + if (PageUnevictable(page) || !PageLRU(page)) return; if (likely(get_page_unless_zero(page))) {