From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Shi Subject: Re: [PATCH v17 13/21] mm/lru: introduce TestClearPageLRU Date: Thu, 6 Aug 2020 09:54:08 +0800 Message-ID: References: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> <1595681998-19193-14-git-send-email-alex.shi@linux.alibaba.com> <9b906469-38fb-8a4e-9a47-d617c7669579@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: Alexander Duyck Cc: Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , 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" , Rong Chen , Michal Hocko , Vladimir Davydov 在 2020/8/6 上午6:43, Alexander Duyck 写道: >> @@ -878,9 +877,8 @@ void release_pages(struct page **pages, int nr) >> spin_lock_irqsave(&locked_pgdat->lru_lock, flags); >> } >> >> - lruvec = mem_cgroup_page_lruvec(page, locked_pgdat); >> - VM_BUG_ON_PAGE(!PageLRU(page), page); >> __ClearPageLRU(page); >> + lruvec = mem_cgroup_page_lruvec(page, locked_pgdat); >> del_page_from_lru_list(page, lruvec, page_off_lru(page)); >> } >> > The more I look at this piece it seems like this change wasn't really > necessary. If anything it seems like it could catch potential bugs as > it was testing for the PageLRU flag before and then clearing it > manually anyway. In addition it doesn't reduce the critical path by > any significant amount so I am not sure these changes are providing > any benefit. Don't know hat kind of bug do you mean here, since the page is no one using, means no one could ClearPageLRU in other place, so if you like to keep the VM_BUG_ON_PAGE, that should be ok. Thanks! Alex