[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36307d7a-6e39-b1dd-64e8-95ec59f16867@intel.com>
Date: Mon, 21 Jun 2021 12:53:04 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: "Huang, Ying" <ying.huang@...el.com>, Zi Yan <ziy@...dia.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Yang Shi <shy828301@...il.com>, Michal Hocko <mhocko@...e.com>,
Wei Xu <weixugc@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Dan Williams <dan.j.williams@...el.com>,
David Hildenbrand <david@...hat.com>,
osalvador <osalvador@...e.de>
Subject: Re: [PATCH -V8 02/10] mm/numa: automatically generate node migration
order
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.
Powered by blists - more mailing lists