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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E3CDC433EF for ; Wed, 16 Feb 2022 08:49:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F7576B0078; Wed, 16 Feb 2022 03:49:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A7756B007D; Wed, 16 Feb 2022 03:49:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 76F436B007E; Wed, 16 Feb 2022 03:49:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id 67D406B0078 for ; Wed, 16 Feb 2022 03:49:07 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1CE5E8B758 for ; Wed, 16 Feb 2022 08:49:07 +0000 (UTC) X-FDA: 79148018334.31.94FCD00 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf05.hostedemail.com (Postfix) with ESMTP id 83554100005 for ; Wed, 16 Feb 2022 08:49:06 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4ED9F1F383; Wed, 16 Feb 2022 08:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645001345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fz8Fcg3DetJc33zyxaPnbTe2xNfylmTXx0ZDiKry/OI=; b=NXSh1XpyU7pEPODc/7T4RBPIq4il7OEqZH2+lAc+NGFH4eR1YdFLOAs0UHaw9Gv6oDGT2K lblF2PWUXBasw66aDJUnli6wX8CQO/tQ+HfzWamm0CLZXRqau2tHWUY86Y/hm6+6tRTGw0 jgiYpTmlAvTFnZqWCLpISMtAwuyEUds= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645001345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fz8Fcg3DetJc33zyxaPnbTe2xNfylmTXx0ZDiKry/OI=; b=QmkOCE2qEjbi3r8p55Qzv9QCmnF/f6hylmXm6JLXOIkpELVdGQbtEywORsipnAkYiB3gLz xknEmHcJgkHMxZAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3E7CC13A7C; Wed, 16 Feb 2022 08:49:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id w+DjCoC6DGKjWgAAMHmgww (envelope-from ); Wed, 16 Feb 2022 08:49:04 +0000 Date: Wed, 16 Feb 2022 09:49:02 +0100 From: Oscar Salvador To: Huang Ying Cc: Peter Zijlstra , Mel Gorman , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Feng Tang , Yang Shi , Baolin Wang , Johannes Weiner , Michal Hocko , Rik van Riel , Dave Hansen , Zi Yan , Wei Xu , Shakeel Butt , zhongjiang-ali Subject: Re: [PATCH -V12 1/3] NUMA Balancing: add page promotion counter Message-ID: References: <20220216073815.2505536-1-ying.huang@intel.com> <20220216073815.2505536-2-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220216073815.2505536-2-ying.huang@intel.com> X-Stat-Signature: 9pgqhcp7j6q8rbqn3ikwpnjucenj3h8s X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 83554100005 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=NXSh1Xpy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=QmkOCE2q; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf05.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de X-Rspam-User: X-HE-Tag: 1645001346-231302 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 Wed, Feb 16, 2022 at 03:38:13PM +0800, Huang Ying wrote: > In a system with multiple memory types, e.g. DRAM and PMEM, the CPU > and DRAM in one socket will be put in one NUMA node as before, while > the PMEM will be put in another NUMA node as described in the > description of the commit c221c0b0308f ("device-dax: "Hotplug" > persistent memory for use like normal RAM"). So, the NUMA balancing > mechanism will identify all PMEM accesses as remote access and try to > promote the PMEM pages to DRAM. > > To distinguish the number of the inter-type promoted pages from that > of the inter-socket migrated pages. A new vmstat count is added. The > counter is per-node (count in the target node). So this can be used > to identify promotion imbalance among the NUMA nodes. > > Signed-off-by: "Huang, Ying" > Reviewed-by: Yang Shi > Tested-by: Baolin Wang > Reviewed-by: Baolin Wang > Acked-by: Johannes Weiner > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Rik van Riel > Cc: Mel Gorman > Cc: Peter Zijlstra > Cc: Dave Hansen > Cc: Zi Yan > Cc: Wei Xu > Cc: osalvador > Cc: Shakeel Butt > Cc: zhongjiang-ali > Cc: linux-kernel@vger.kernel.org > Cc: linux-mm@kvack.org > --- ... > @@ -2072,6 +2072,7 @@ int migrate_misplaced_page(struct page *page, struct vm_area_struct *vma, > pg_data_t *pgdat = NODE_DATA(node); > int isolated; > int nr_remaining; > + int nr_succeeded; I think we should make this consistent and make it "unsigned int". That is what migrate_pages() expects, and what the other caller using nr_succeeded (demote_page_list()) already uses. Unless there is a strong reason not to do so. Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs