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 25751C432C0 for ; Fri, 22 Nov 2019 06:46:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DAC6D20674 for ; Fri, 22 Nov 2019 06:46:52 +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="EjUXwdtN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAC6D20674 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 4C6176B04AE; Fri, 22 Nov 2019 01:46:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4776A6B04AF; Fri, 22 Nov 2019 01:46:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33F5B6B04B0; Fri, 22 Nov 2019 01:46:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 1C01F6B04AE for ; Fri, 22 Nov 2019 01:46:52 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id BBE402473 for ; Fri, 22 Nov 2019 06:46:51 +0000 (UTC) X-FDA: 76182980622.28.brake56_1ec3177454a1e X-HE-Tag: brake56_1ec3177454a1e X-Filterd-Recvd-Size: 2949 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 Nov 2019 06:46:51 +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-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=56NFxkQajPmvDuPj0+mInO1dB9fS9ic2p3t8jjTTnT8=; b=EjUXwdtNnarR65rFcGxuixa2O e7UMLMjrC758Xq1yeX6ddusBTj36Wzx3nKqKwEWkTt/f30C1Oi+1S+efS4YieSrU3XWOqQgqzRAp7 hnFB5NFxatYKTBlTm200UgQHvnqlmKasGp/4GdRbSRDeNgEbxv1PXlaXRcqVp8dvyhwhyDmWa1npX 0MUJo17reqmttsVjpgr9kybJWBvj8xpAG9VdCyM/vF0HKLXhtA7SfIEke6JxzvXUPot5Y7FB3ayU7 VI4rz7FUkVuP3mEkPNL1cu6Q7kO1O7SrzH2wKLYIhTda/+iaffzu+TT7YKgOj5TnanRJ0VOwNvhjk j5LmPxgmQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iY2iL-0006WV-KR; Fri, 22 Nov 2019 06:46:45 +0000 Date: Thu, 21 Nov 2019 22:46:45 -0800 From: Christoph Hellwig 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, willy@infradead.org, Vlastimil Babka , Dan Williams , Michal Hocko , Wei Yang , Johannes Weiner , Arun KS , Rong Chen Subject: Re: [PATCH v3 2/7] mm/lruvec: add irqsave flags into lruvec struct Message-ID: <20191122064645.GA11261@infradead.org> References: <1573874106-23802-1-git-send-email-alex.shi@linux.alibaba.com> <1573874106-23802-3-git-send-email-alex.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573874106-23802-3-git-send-email-alex.shi@linux.alibaba.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Sat, Nov 16, 2019 at 11:15:01AM +0800, Alex Shi wrote: > We need a irqflags vaiable to save state when do irqsave action, declare > it here would make code more clear/clean. This patch is wrong on multiple levels. Adding a field without the users is completely pointless. And as a general pattern we never add the irqsave flags to sturctures. They are an intimate part of the calling conventions, and storing them in a structure will lead to subtile bugs.