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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 30D18C432C3 for ; Mon, 18 Nov 2019 12:34:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E9FDF2075E for ; Mon, 18 Nov 2019 12:34:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iwsSa4k8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9FDF2075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7D1766B0003; Mon, 18 Nov 2019 07:34:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 75B386B0008; Mon, 18 Nov 2019 07:34:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 623C56B000A; Mon, 18 Nov 2019 07:34:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0005.hostedemail.com [216.40.44.5]) by kanga.kvack.org (Postfix) with ESMTP id 473266B0003 for ; Mon, 18 Nov 2019 07:34:56 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id C97F4440D for ; Mon, 18 Nov 2019 12:34:55 +0000 (UTC) X-FDA: 76169342550.04.roll80_480c3ec79cb1d X-HE-Tag: roll80_480c3ec79cb1d X-Filterd-Recvd-Size: 4768 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Nov 2019 12:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=85/7YFaxkit/qDvj6KxyLGhebHuLl4W62LvFcfhY4kc=; b=iwsSa4k8B14FS+/bfhQjei4YR5 p4nLcN8rzX2+c5PHXqOvWXOMGdQKwODjRXJzL7WiJ+1gPKNDP8qwt7PknNKKYYAxfVFsGtTbX3zdD X07M3Ir8GiCktqJhJ9aIfFAhbyZ2LaFADcQBTG8hWf+5GGMUHLcMkKkyOC6iwGpwQakuRgWLJRjUc 9+LGJ8149NvYnR5LJQK1sF4mzZuuoeQHeSdvD/DBhjFeyWCpeba0eYyM5mkpSShF6rcuaqP7s1kK/ 4aeo5CpuO7AzGdLFUuIGo04tIq0+RRDKRWppDEobOktjrY7l8JcY/3+Ch4zuMfUQWq55T72LK/5ky iQZF+pKw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWgF2-000374-Rg; Mon, 18 Nov 2019 12:34:52 +0000 Date: Mon, 18 Nov 2019 04:34:52 -0800 From: Matthew Wilcox To: Alex Shi Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, Johannes Weiner , Michal Hocko , Vladimir Davydov , Roman Gushchin , Shakeel Butt , Chris Down , Thomas Gleixner , Vlastimil Babka , Qian Cai , Andrey Ryabinin , "Kirill A. Shutemov" , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrea Arcangeli , David Rientjes , "Aneesh Kumar K.V" , swkhack , "Potyra, Stefan" , Mike Rapoport , Stephen Rothwell , Colin Ian King , Jason Gunthorpe , Mauro Carvalho Chehab , Peng Fan , Nikolay Borisov , Ira Weiny , Kirill Tkhai , Yafang Shao Subject: Re: [PATCH v3 3/7] mm/lru: replace pgdat lru_lock with lruvec lock Message-ID: <20191118123452.GM20752@bombadil.infradead.org> References: <1573874106-23802-1-git-send-email-alex.shi@linux.alibaba.com> <1573874106-23802-4-git-send-email-alex.shi@linux.alibaba.com> <20191116043806.GD20752@bombadil.infradead.org> <0bfa9a03-b095-df83-9cfd-146da9aab89a@linux.alibaba.com> <20191118121451.GG20752@bombadil.infradead.org> <296c7202-930e-4027-2e92-b8c64a908d88@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <296c7202-930e-4027-2e92-b8c64a908d88@linux.alibaba.com> User-Agent: Mutt/1.12.1 (2019-06-15) 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: On Mon, Nov 18, 2019 at 08:31:50PM +0800, Alex Shi wrote: >=20 >=20 > =E5=9C=A8 2019/11/18 =E4=B8=8B=E5=8D=888:14, Matthew Wilcox =E5=86=99=E9= =81=93: > >> Hi Matthew, > >> > >> Thanks for comments! > >> > >> Here, the irqflags is bound, and belong to lruvec, merging them into= together helps us to take them as whole, and thus reduce a unnecessary c= ode clues. > > It's not bound to the lruvec, though. Call chain A uses it and call = chain > > B doesn't. If it was always used by every call chain, I'd see your p= oint, > > but we have call chains which don't use it, and so it adds complexity= . >=20 > Where is the call chain B, please? Every call chain that uses lock_page_lruvec_irq(). > >> As your concern for a 'new' caller, since __split_huge_page is a sta= tic helper here, no distub for anyothers. > > Even though it's static, there may be other callers within the same f= ile. > > Or somebody may decide to make it non-static in the future. I think = it's > > actually clearer to keep the irqflags as a separate parameter. > >=20 >=20 > But it's no one else using this function now. and no one get disturb, r= ight? It's non sense to consider a 'possibility' issue. It is not nonsense to consider the complexity of the mm! Your patch make= s it harder to understand unnecessarily. Please be considerate of the othe= r programmers who must build on what you have created.