Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2780165ybc; Mon, 18 Nov 2019 04:38:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwII9JpB1dIGEBkN1DI2RuHFnpbCWi+fqHE4/eXEh9eSz6Uwr1nooID3hcgk97HBxvwLfKi X-Received: by 2002:adf:e4c5:: with SMTP id v5mr27645388wrm.106.1574080717223; Mon, 18 Nov 2019 04:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574080717; cv=none; d=google.com; s=arc-20160816; b=oaYmsryQhkvG25nvLTL4k51uREb3vC8ni35JouoiZN7wQp2lThm3r5yMoeDrFQiinD 6EgSFaQA/v8vMszrjcR2DedeU48SAkdf2BUvPFgRgtYj4zGuPA6x3cvhNabRIZ7b4MY5 jquvyVaXeOrjusPcqkJKykkIPOfUGAnkZqiUD2K2W/L1zyt5uOMi5aVwDpw7OJS87ngN /FH3i6g4QBUfpIOm6LrSVVyCG/x7Hb8M/whX02lEz/IZ+rCVVIBln2CQ08u2ibN0CxzQ yvtuFZ4PooDaUsBnpO6TEPhrQQGYKMfuCzSRx6OkakiITVvBjhrGZ8/bCZQWV3Zv1/iO /cVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=85/7YFaxkit/qDvj6KxyLGhebHuLl4W62LvFcfhY4kc=; b=urC/X9b5tXzn5peUQku2xWKp7OfvhohC4rycVxaHZMeSyVRZTMORMRnGrDThL6Gd6j gwuuHzXTIZXnimFQchheNp5IFtIb4R7mKr7zMr4xAefTvuionY8nDXvvmMdYWTEnxnwl z69F3/Q9nr8RFBNHQzZ5s5/bs5w3uMfdf8MjcV+YiE0cR29YOdK461FlQaw2kWLFP+U4 qcEfLuJemTUzwC4DkybubA6iL1wz9hnWz5RXe7Q7Nv7m0ohEVmSZEHVP5ZGHjmoaA3Gy nyMpXGaqCYiJFWnLJgFdSMVxsDfUOZTleSChgDtzADaPij7lne4EOTm2kVItjLTUT63T BrAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iwsSa4k8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si6708127edr.154.2019.11.18.04.38.12; Mon, 18 Nov 2019 04:38:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iwsSa4k8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfKRMey (ORCPT + 99 others); Mon, 18 Nov 2019 07:34:54 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:40950 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfKRMey (ORCPT ); Mon, 18 Nov 2019 07:34:54 -0500 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 Content-Transfer-Encoding: 8bit In-Reply-To: <296c7202-930e-4027-2e92-b8c64a908d88@linux.alibaba.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 18, 2019 at 08:31:50PM +0800, Alex Shi wrote: > > > 在 2019/11/18 下午8:14, Matthew Wilcox 写道: > >> 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 code 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 point, > > but we have call chains which don't use it, and so it adds complexity. > > 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 static helper here, no distub for anyothers. > > Even though it's static, there may be other callers within the same file. > > 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. > > > > But it's no one else using this function now. and no one get disturb, right? It's non sense to consider a 'possibility' issue. It is not nonsense to consider the complexity of the mm! Your patch makes it harder to understand unnecessarily. Please be considerate of the other programmers who must build on what you have created.