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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 5DCEEC43460 for ; Thu, 22 Apr 2021 12:19:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7D6B36144E for ; Thu, 22 Apr 2021 12:19:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D6B36144E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C849C6B006C; Thu, 22 Apr 2021 08:19:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C34736B006E; Thu, 22 Apr 2021 08:19:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD5DA6B0070; Thu, 22 Apr 2021 08:19:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 8D1026B006C for ; Thu, 22 Apr 2021 08:19:56 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3D42834A3 for ; Thu, 22 Apr 2021 12:19:56 +0000 (UTC) X-FDA: 78059909592.17.9F41BA9 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf10.hostedemail.com (Postfix) with ESMTP id B26FF40002ED for ; Thu, 22 Apr 2021 12:19:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6F664AF1A; Thu, 22 Apr 2021 12:19:54 +0000 (UTC) Subject: Re: [PATCH 1/9] mm/page_alloc: Split per cpu page lists and zone stats To: Mel Gorman , Andrew Morton Cc: Chuck Lever , Jesper Dangaard Brouer , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Michal Hocko , Linux-MM , Linux-RT-Users , LKML References: <20210422111441.24318-1-mgorman@techsingularity.net> <20210422111441.24318-2-mgorman@techsingularity.net> From: Vlastimil Babka Message-ID: <45156f57-2fa9-71c8-aea5-d06d457c0236@suse.cz> Date: Thu, 22 Apr 2021 14:19:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210422111441.24318-2-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: B26FF40002ED X-Stat-Signature: izuwf1ysgsk47o9qbc5oamdggrcowrgz Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1619093987-587949 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 4/22/21 1:14 PM, Mel Gorman wrote: > The per-cpu page allocator lists and the per-cpu vmstat deltas are stored > in the same struct per_cpu_pages even though vmstats have no direct impact > on the per-cpu page lists. This is inconsistent because the vmstats for a > node are stored on a dedicated structure. The bigger issue is that the > per_cpu_pages structure is not cache-aligned and stat updates either > cache conflict with adjacent per-cpu lists incurring a runtime cost or > padding is required incurring a memory cost. > > This patch splits the per-cpu pagelists and the vmstat deltas into separate > structures. It's mostly a mechanical conversion but some variable renaming > is done to clearly distinguish the per-cpu pages structure (pcp) from > the vmstats (pzstats). > > Superficially, this appears to increase the size of the per_cpu_pages > structure but the movement of expire fills a structure hole so there is > no impact overall. > > [lkp@intel.com: Check struct per_cpu_zonestat has a non-zero size] > [vbabka@suse.cz: Init zone->per_cpu_zonestats properly] > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka