linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	Yang Shi <shy828301@gmail.com>,  Zi Yan <ziy@nvidia.com>,
	 Michal Hocko <mhocko@suse.com>,  Wei Xu <weixugc@google.com>,
	 Oscar Salvador <osalvador@suse.de>,
	 David Rientjes <rientjes@google.com>,
	 Dan Williams <dan.j.williams@intel.com>,
	 David Hildenbrand <david@redhat.com>,
	 Greg Thelen <gthelen@google.com>,
	 Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] mm/migrate: fix CPUHP state to update node demotion order
Date: Tue, 21 Sep 2021 14:41:29 +0800	[thread overview]
Message-ID: <877dfactwm.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <87lf3r7mqr.ffs@tglx> (Thomas Gleixner's message of "Mon, 20 Sep 2021 09:02:52 +0200")

Thomas Gleixner <tglx@linutronix.de> writes:

> On Sat, Sep 18 2021 at 10:58, Huang Ying wrote:
>> @@ -72,6 +72,7 @@ enum cpuhp_state {
>>  	CPUHP_SLUB_DEAD,
>>  	CPUHP_DEBUG_OBJ_DEAD,
>>  	CPUHP_MM_WRITEBACK_DEAD,
>> +	CPUHP_MM_DEMOTION_OFFLINE,
>
> Please keep the _DEAD convention in that section. The plugged CPU is
> already gone.

Sure.  Will do that.

>>  	CPUHP_MM_VMSTAT_DEAD,
>>  	CPUHP_SOFTIRQ_DEAD,
>>  	CPUHP_NET_MVNETA_DEAD,
>> @@ -240,6 +241,7 @@ enum cpuhp_state {
>>  	CPUHP_AP_BASE_CACHEINFO_ONLINE,
>>  	CPUHP_AP_ONLINE_DYN,
>>  	CPUHP_AP_ONLINE_DYN_END		= CPUHP_AP_ONLINE_DYN + 30,
>> +	CPUHP_AP_MM_DEMOTION_ONLINE,
>
> Are there any ordering requirements of these states vs. other CPU
> hotplug states?
>
> If not, then please use the dynamically allocated states.
>
> If so, then please add a comment:
>
> +	/* Must be before CPUHP_XXX and after CPUHP_YYY */
> +	CPUHP_MM_DEMOTION_OFFLINE,

The callbacks need to be called after node_states[N_CPU] has been
updated during CPU online/offline.  While node_states[N_CPU] is updated
in CPUHP_AP_ONLINE_DYN and CPUHP_MM_VMSTAT_DEAD.  So the new state must
be before CPUHP_MM_VMSTAT_DEAD for offline and after CPUHP_AP_ONLINE_DYN
for online.  I will update the patch and add the comments.

Best Regards,
Huang, Ying


      reply	other threads:[~2021-09-21  6:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18  2:58 Huang Ying
2021-09-18  4:04 ` Mika Penttilä
2021-09-18  6:56   ` Huang, Ying
2021-09-20  7:02 ` Thomas Gleixner
2021-09-21  6:41   ` Huang, Ying [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dfactwm.fsf@yhuang6-desk2.ccr.corp.intel.com \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=gthelen@google.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=rientjes@google.com \
    --cc=shy828301@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=weixugc@google.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox