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=-7.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham 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 7DF8BC3F2C6 for ; Tue, 3 Mar 2020 04:11:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8EAB2465E for ; Tue, 3 Mar 2020 04:11:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8EAB2465E 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 6ECF56B000D; Mon, 2 Mar 2020 23:11:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 678436B000E; Mon, 2 Mar 2020 23:11:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 540936B0010; Mon, 2 Mar 2020 23:11:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id 35D966B000D for ; Mon, 2 Mar 2020 23:11:41 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0EA1A18ECE for ; Tue, 3 Mar 2020 04:11:41 +0000 (UTC) X-FDA: 76552727202.18.boot73_65e925fdf0b37 X-HE-Tag: boot73_65e925fdf0b37 X-Filterd-Recvd-Size: 2790 Received: from out4436.biz.mail.alibaba.com (out4436.biz.mail.alibaba.com [47.88.44.36]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Mar 2020 04:11:39 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04452;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0TrWPslU_1583208694; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TrWPslU_1583208694) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Mar 2020 12:11:35 +0800 Subject: Re: [PATCH v9 07/20] mm/lru: introduce TestClearPageLRU To: Andrew Morton Cc: cgroups@vger.kernel.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, Michal Hocko , Vladimir Davydov , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <1583146830-169516-1-git-send-email-alex.shi@linux.alibaba.com> <1583146830-169516-8-git-send-email-alex.shi@linux.alibaba.com> <20200302141144.b30abe0d89306fd387e13a92@linux-foundation.org> From: Alex Shi Message-ID: <9cacdc21-9c1f-2a17-05cb-e9cf2959cef5@linux.alibaba.com> Date: Tue, 3 Mar 2020 12:11:34 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200302141144.b30abe0d89306fd387e13a92@linux-foundation.org> Content-Type: text/plain; charset=gbk 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: =D4=DA 2020/3/3 =C9=CF=CE=E76:11, Andrew Morton =D0=B4=B5=C0: >> - if (PageLRU(page)) { >> + if (TestClearPageLRU(page)) { >> lruvec =3D mem_cgroup_page_lruvec(page, pgdat); >> - ClearPageLRU(page); >> del_page_from_lru_list(page, lruvec, page_lru(page)); >> } else >=20 > The code will now get exclusive access of the page->flags cacheline and > will dirty that cacheline, even for !PageLRU() pages. What is the > performance impact of this? >=20 Hi Andrew, Thanks a lot for comments! I was tested the whole patchset with fengguang's case-lru-file-readtwice https://git.kernel.org/pub/scm/linux/kernel/git/wfg/vm-scalability.git/ which is most sensitive case on PageLRU I found. There are no clear perfo= rmance drop. On this single patch, I just test the same case again, there is still no = perf drop. some data is here on my 96 threads machine: no lock_dep w lock_dep and few other debug option w this patch, 50.96MB/s 32.93MB/s w/o this patch, 50.50MB/s 33.53MB/s And also no any warning from Intel 0day yet. Thanks a lot! Alex