Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp996911pxa; Wed, 5 Aug 2020 18:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDxYV1WsleuDClkqiEtZ1FmKC7PWnBaazjICZMWHWG/JfPApXvIpkStQHuMXc79GePTtXi X-Received: by 2002:a17:906:348a:: with SMTP id g10mr1994344ejb.551.1596679035759; Wed, 05 Aug 2020 18:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596679035; cv=none; d=google.com; s=arc-20160816; b=iX4CYm8szJdhX5oLRtwc8+ueQl91DbmqXDnjOcerEy/lJcsuQA5Zp2gPl6g2RxkQ+d 2hVwxxO7ixiFgwiv5PlWGF8PaRI4Bcbmj3V0i8Rqmu3Mo6RpgGp66TMy8CljJGJakAsQ O9EJSU8hVzZv/1f9l4a0T+o6WZk8nBMGNcNonpqeT5cW/TFN0bY2Uq6Eo6RikWr5H+7B ZLXh6PO3DlMKv77V/Eg3HGDgnXS/QASerKTz+kbw4+RXCNoqmiCzD6me1L/E9EUO19Hf GkA5l0A4aktUH8dg29lne+G0Nhrzeg9XflIBlZOxTay1pQ08NMpRWhGLGdneanbhCl6i GSgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=u+XKjVcehcY7uupJJFwC3pA9osJDNBgOYpLdmjRh6o0=; b=Js+DEXQtLGBHj6/+XPg4gwvN5SeMgC2uO+N8BsetLoxR6jUn2rh1+wdkNj0iHHmRdL U5T1F4HdDRhdyYdKUZG9nWnPGGkRMtNxvXVuLUReQGoWCQ7ORmZ7ZEncjPpVjfDFjPZm bBqRAgFnWGk5ts+8aMMLjZjrHDSZczhZndjHFyd+7sAgjYw1zDLPg46/sOZ3zBqfxrfA 6E7TA7pb6cH/kuX4SJJ5odtYSs9idKdFiKVQDNzyyVv6u2n5chOx/QXX4F/L4HzqRor4 3s7Txto+SDdS0A70znEkzvXqJbG/Ozh4FRB6I5m7xJGMdFqIXcyIjXySaF35OvG03xyJ hX9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si2517951ejb.34.2020.08.05.18.56.52; Wed, 05 Aug 2020 18:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgHFByd (ORCPT + 99 others); Wed, 5 Aug 2020 21:54:33 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:50662 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgHFByc (ORCPT ); Wed, 5 Aug 2020 21:54:32 -0400 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 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