lkml.org 
[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -V11 2/9] mm/migrate: update node demotion order on hotplug events
On Tue, Mar 08, 2022 at 09:07:20AM -0800, Dave Hansen wrote:
> On 3/8/22 02:27, Oscar Salvador wrote:
> > @@ -2043,7 +2044,12 @@ static void __init init_cpu_node_state(void)
> > static int vmstat_cpu_online(unsigned int cpu)
> > {
> > refresh_zone_stat_thresholds();
> > - node_set_state(cpu_to_node(cpu), N_CPU);
> > +
> > + if (!node_state(cpu_to_node(cpu), N_CPU)) {
> > + node_set_state(cpu_to_node(cpu), N_CPU);
> > + set_migration_target_nodes();
> > + }
> > +
> > return 0;
> > }
> >
> > @@ -2066,6 +2072,8 @@ static int vmstat_cpu_dead(unsigned int cpu)
> > return 0;
> >
> > node_clear_state(node, N_CPU);
> > + set_migration_target_nodes();
> > +
> > return 0;
> > }
>
> Yeah, those callbacks do look like they're reinventing the wheel. This
> is a much more direct way of doing it.

Then let me play a bit more with it and I can cook a patch unless
someone feels strong against it.

Thanks

--
Oscar Salvador
SUSE Labs

\
 
 \ /
  Last update: 2022-03-08 19:58    [W:0.317 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site