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.3 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 B41F8C4363D for ; Tue, 22 Sep 2020 03:41:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F74023A5B for ; Tue, 22 Sep 2020 03:41:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F74023A5B 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 9CE1E6B00AF; Mon, 21 Sep 2020 23:41:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 957656B00B0; Mon, 21 Sep 2020 23:41:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F7476B00B1; Mon, 21 Sep 2020 23:41:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 637CB6B00AF for ; Mon, 21 Sep 2020 23:41:18 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 339DD3626 for ; Tue, 22 Sep 2020 03:41:18 +0000 (UTC) X-FDA: 77289297036.24.snow85_6004a492714a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 11F181A4A0 for ; Tue, 22 Sep 2020 03:41:18 +0000 (UTC) X-HE-Tag: snow85_6004a492714a X-Filterd-Recvd-Size: 2812 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Sep 2020 03:41:16 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0U9k1-kp_1600746071; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U9k1-kp_1600746071) by smtp.aliyun-inc.com(127.0.0.1); Tue, 22 Sep 2020 11:41:12 +0800 Subject: Re: [PATCH v18 15/32] mm/lru: move lock into lru_note_cost To: Hugh Dickins Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com References: <1598273705-69124-1-git-send-email-alex.shi@linux.alibaba.com> <1598273705-69124-16-git-send-email-alex.shi@linux.alibaba.com> From: Alex Shi Message-ID: <323ae796-a547-3ac3-b4fd-68a4ac180690@linux.alibaba.com> Date: Tue, 22 Sep 2020 11:39:05 +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=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/9/22 =C9=CF=CE=E76:03, Hugh Dickins =D0=B4=B5=C0: >> Acked-by: Hugh Dickins >> >> In your lruv19 github tree, you have merged 14/32 into this one: thank= s. > Grr, I've only just started, and already missed some of my notes. >=20 > I wanted to point out that this patch does introduce an extra unlock+lo= ck > in shrink_inactive_list(), even in a !CONFIG_MEMCG build. I think you'= ve > done the right thing for now, keeping it simple, and maybe nobody will > notice the extra overhead; but I expect us to replace lru_note_cost() > by lru_note_cost_unlock_irq() later on, expecting the caller to do the > initial lock_irq(). >=20 > lru_note_cost_page() looks redundant to me, but you're right not to > delete it here, unless Johannes asks you to add that in: that's his > business, and it may be dependent on the XXX at its callsite. >=20 Thanks for comments! And got your point. so I will leave this patch alone= . Thanks!