From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 651F9C433E0 for ; Thu, 6 Aug 2020 01:54:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 33B3F21744 for ; Thu, 6 Aug 2020 01:54:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33B3F21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C44CF6B0002; Wed, 5 Aug 2020 21:54:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF59D6B0005; Wed, 5 Aug 2020 21:54:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0BD26B0006; Wed, 5 Aug 2020 21:54:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 97A136B0002 for ; Wed, 5 Aug 2020 21:54:39 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 207BB1DE6 for ; Thu, 6 Aug 2020 01:54:39 +0000 (UTC) X-FDA: 77118474678.26.trade06_1e0b61026fb3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id E78B01804B66A for ; Thu, 6 Aug 2020 01:54:38 +0000 (UTC) X-HE-Tag: trade06_1e0b61026fb3 X-Filterd-Recvd-Size: 3438 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Thu, 6 Aug 2020 01:54:37 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0U4t6vRJ_1596678867; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U4t6vRJ_1596678867) by smtp.aliyun-inc.com(127.0.0.1); Thu, 06 Aug 2020 09:54:28 +0800 Subject: Re: [PATCH v17 13/21] mm/lru: introduce TestClearPageLRU 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@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" , Rong Chen , Michal Hocko , Vladimir Davydov 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> From: Alex Shi Message-ID: Date: Thu, 6 Aug 2020 09:54:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: E78B01804B66A X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: =E5=9C=A8 2020/8/6 =E4=B8=8A=E5=8D=886:43, Alexander Duyck =E5=86=99=E9=81= =93: >> @@ -878,9 +877,8 @@ void release_pages(struct page **pages, int nr) >> spin_lock_irqsave(&locked_pgdat->lru_l= ock, flags); >> } >> >> - lruvec =3D mem_cgroup_page_lruvec(page, locked= _pgdat); >> - VM_BUG_ON_PAGE(!PageLRU(page), page); >> __ClearPageLRU(page); >> + lruvec =3D 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 usi= ng, 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