Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3666232pxk; Mon, 21 Sep 2020 22:15:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnlZjTclzfEhXgp3wEjZZQ0/Pwi+xEBGw90rvUM4Y3jn3+7gc6wmLHOvcVyYw8EhL/J6g4 X-Received: by 2002:a17:906:fb15:: with SMTP id lz21mr2898231ejb.185.1600751731638; Mon, 21 Sep 2020 22:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600751731; cv=none; d=google.com; s=arc-20160816; b=qEUuQuUM7bqxJowH4C4rJgwbQGVVHvDarm/D24q3a3JUECrjk7csgrzoibzWQOZlre m3D1YiGaqVnduPYRn3gbteSj/rCdy7EaQwbx9m2tD1CNLpIkgLD9AQXNukYNsLVP6rJn rB0TSulBT1FSYoHRzGb168fIiAJiRnn1sxySTvFNa2whvAl6JI7SXLWa2VvUvemOcPuv 5A5tHkeBzn14F5Go7EQafGrNcNJG6321BHzNYmcH6TmKF4DQ5Ynu6GUERGIJ3/eRra8T nY7ZU1A02VyOjI7/WszXhCv5r9wOJ6VR8oGA52VJ4azqMrrH161/ayDLojnb0bjhR7Or ZHog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=b+agj4D0BBLR3nrGQuOhVG0YK5wF5gx0YO+8F4BsP68=; b=raPKHSkfX+yAIP+6AFGlzTf7dSSD+Q74OSkRhyJOC2vKj7nxu5htnYs6WV4bXR70Kd B8rG8qe3WIr/Jb+k7nKwFwII2mA6uld8shI1OxP6L6IYgIEr3lHclBB1lriH3PEzpebY CosjWulCnFdwfxzx8/DwUbHBofKLy7tF9roIYiMwdznzoXgoro0TdG2Pb0/3R8a6JwKz mHpKRzbaREYYNhJ3VpCm8rqpkuzlqQEP6ViEsl7EW2XbpTNJYxMeNV3OA3aZD2MePALe au/mi9Y47eXEjGp86dRXqt6Bi2RuY4UTAWlrpdnnwjDmhFwKusebZaSOnL89kAgMxGz9 zHCw== 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 gj16si10053247ejb.382.2020.09.21.22.15.08; Mon, 21 Sep 2020 22:15:31 -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 S1728634AbgIVDlP (ORCPT + 99 others); Mon, 21 Sep 2020 23:41:15 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:60106 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgIVDlP (ORCPT ); Mon, 21 Sep 2020 23:41:15 -0400 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: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/9/22 ????6:03, Hugh Dickins ะด??: >> Acked-by: Hugh Dickins >> >> In your lruv19 github tree, you have merged 14/32 into this one: thanks. > Grr, I've only just started, and already missed some of my notes. > > I wanted to point out that this patch does introduce an extra unlock+lock > 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(). > > 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. > Thanks for comments! And got your point. so I will leave this patch alone. Thanks!