From: Alex Shi Subject: [PATCH v3 2/7] mm/lruvec: add irqsave flags into lruvec struct Date: Sat, 16 Nov 2019 11:15:01 +0800 Message-ID: <1573874106-23802-3-git-send-email-alex.shi@linux.alibaba.com> References: <1573874106-23802-1-git-send-email-alex.shi@linux.alibaba.com> Return-path: In-Reply-To: <1573874106-23802-1-git-send-email-alex.shi@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: alex.shi@linux.alibaba.com, 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 Cc: Vlastimil Babka , Dan Williams , Michal Hocko , Wei Yang , Johannes Weiner , Arun KS , Rong Chen We need a irqflags vaiable to save state when do irqsave action, declare it here would make code more clear/clean. Rong Chen reported the 'irqflags' variable need move to the tail of lruvec struct otherwise it causes 18% regressions of vm-scalability testing on his machine. So add the flags and lru_lock to both near struct tail, even I have no clue of this perf losing. Originally-from: Hugh Dickins Signed-off-by: Alex Shi Cc: Andrew Morton Cc: Vlastimil Babka Cc: Dan Williams Cc: Michal Hocko Cc: Mel Gorman Cc: Wei Yang Cc: Johannes Weiner Cc: Arun KS Cc: Tejun Heo Cc: Konstantin Khlebnikov CC: Rong Chen Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- include/linux/mmzone.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index a13b8a602ee5..9b8b8daf4e03 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -269,6 +269,8 @@ struct lruvec { unsigned long flags; /* per lruvec lru_lock for memcg */ spinlock_t lru_lock; + /* flags for irqsave */ + unsigned long irqflags; #ifdef CONFIG_MEMCG struct pglist_data *pgdat; #endif -- 1.8.3.1