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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AFB8C433EF for ; Tue, 28 Sep 2021 00:47:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09E8B611BD for ; Tue, 28 Sep 2021 00:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238370AbhI1AtD (ORCPT ); Mon, 27 Sep 2021 20:49:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238236AbhI1AtC (ORCPT ); Mon, 27 Sep 2021 20:49:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31C28611C0; Tue, 28 Sep 2021 00:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1632790043; bh=XQMXYqgv1DilxuDhTVnlqoDru7v0POHEvK/WxsTQwlE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Dzq1JA+OQze0EoDBpuzE2SrFyQr8Ta6E+ZmgxapKntxbUaQ35hK2efdHIcCaaEgSB o0OKBJ+1NN8joCiAYPR4Mbi4AlinkYrNCYNQNHkRHRY/ZjFpQSPF2dv7cTyc/42Et8 c4utfcZoXQyfZGrheqLs6uF5MiZrKWLqoKSNvasc= Date: Mon, 27 Sep 2021 17:47:22 -0700 From: Andrew Morton To: Huang Ying Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Dave Hansen , Yang Shi , Zi Yan , Michal Hocko , Wei Xu , Oscar Salvador , David Rientjes , Dan Williams , David Hildenbrand , Greg Thelen , Keith Busch Subject: Re: [PATCH -V2] mm/migrate: fix CPUHP state to update node demotion order Message-Id: <20210927174722.6ca9bc6a63bb50da7754bdaf@linux-foundation.org> In-Reply-To: <20210927081100.475075-1-ying.huang@intel.com> References: <20210927081100.475075-1-ying.huang@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Sep 2021 16:11:00 +0800 Huang Ying wrote: > The node demotion order needs to be updated during CPU hotplug. > Because whether a NUMA node has CPU may influence the demotion order. > The update function should be called during CPU online/offline after > the node_states[N_CPU] has been updated. That is done in > CPUHP_AP_ONLINE_DYN during CPU online and in CPUHP_MM_VMSTAT_DEAD > during CPU offline. But in commit 884a6e5d1f93 ("mm/migrate: update > node demotion order on hotplug events"), the function to update node > demotion order is called in CPUHP_AP_ONLINE_DYN during CPU > online/offline. This doesn't satisfy the order requirement. What are the user-visible runtime effects of this error? > So in > this patch, we added CPUHP_AP_MM_DEMOTION_ONLINE and > CPUHP_MM_DEMOTION_DEAD to be called after CPUHP_AP_ONLINE_DYN and > CPUHP_MM_VMSTAT_DEAD during CPU online and offline, and register the > update function on them. > > Fixes: 884a6e5d1f93 ("mm/migrate: update node demotion order on hotplug events") > Signed-off-by: "Huang, Ying" > Cc: Thomas Gleixner > Cc: Dave Hansen > Cc: Yang Shi > Cc: Zi Yan > Cc: Michal Hocko > Cc: Wei Xu > Cc: Oscar Salvador > Cc: David Rientjes > Cc: Dan Williams > Cc: David Hildenbrand > Cc: Greg Thelen > Cc: Keith Busch >