lkml.org 
[lkml]   [2021]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -V8 02/10] mm/numa: automatically generate node migration order
From
Date
On 6/19/21 1:18 AM, Huang, Ying wrote:
>>> int next_demotion_node(int node)
>>> {
>>> - return node_demotion[node];
>>> + /*
>>> + * node_demotion[] is updated without excluding
>>> + * this function from running. READ_ONCE() avoids
>>> + * reading multiple, inconsistent 'node' values
>>> + * during an update.
>>> + */
>>> + return READ_ONCE(node_demotion[node]);
>>> }
>> Is it necessary to have two separate patches to add node_demotion and
>> next_demotion_node() then modify it immediately? Maybe merge Patch 1 into 2?
>>
>> Hmm, I just checked Patch 3 and it changes node_demotion again and uses RCU.
>> I guess it might be much simpler to just introduce node_demotion with RCU
>> in this patch and Patch 3 only takes care of hotplug events.
> Hi, Dave,
>
> What do you think about this?
>

Squashing them seems like a good idea to me.

\
 
 \ /
  Last update: 2021-06-21 21:53    [W:1.531 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site