lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Jul 2022 14:42:40 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Cc:     Alistair Popple <apopple@...dia.com>, linux-mm@...ck.org,
        akpm@...ux-foundation.org, Wei Xu <weixugc@...gle.com>,
        Yang Shi <shy828301@...il.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Tim C Chen <tim.c.chen@...el.com>,
        Michal Hocko <mhocko@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Hesham Almatary <hesham.almatary@...wei.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Johannes Weiner <hannes@...xchg.org>, jvgediya.oss@...il.com
Subject: Re: [PATCH v10 3/8] mm/demotion: Add hotplug callbacks to handle
 new numa node onlined

"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com> writes:

> "Huang, Ying" <ying.huang@...el.com> writes:
>
>> Aneesh Kumar K V <aneesh.kumar@...ux.ibm.com> writes:
>>
>>> On 7/26/22 9:33 AM, Huang, Ying wrote:
>>>> "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com> writes:

[snip]

>>>>>  
>>>>> +static struct memory_tier *__node_get_memory_tier(int node)
>>>>> +{
>>>>> +	struct memory_tier *memtier;
>>>>> +
>>>>> +	list_for_each_entry(memtier, &memory_tiers, list) {
>>>>> +		if (node_isset(node, memtier->nodelist))
>>>>> +			return memtier;
>>>>> +	}
>>>>> +	return NULL;
>>>>> +}
>>>>> +
>>>>> +static void init_node_memory_tier(int node)
>>>> 
>>>> set_node_memory_tier()?
>>>
>>> That was done based on feedback from Alistair 
>>>
>>> https://lore.kernel.org/linux-mm/87h73iapg1.fsf@nvdebian.thelocal
>>>
>>>> 
>>>>> +{
>>>>> +	int perf_level;
>>>>> +	struct memory_tier *memtier;
>>>>> +
>>>>> +	mutex_lock(&memory_tier_lock);
>>>>> +
>>>>> +	memtier = __node_get_memory_tier(node);
>>>>> +	if (!memtier) {
>>>>> +		perf_level = node_devices[node]->perf_level;
>>>>> +		memtier = find_create_memory_tier(perf_level);
>>>>> +		node_set(node, memtier->nodelist);
>>>>> +	}
>>
>> It's related to Alistair's comments too.  When will memtier != NULL
>> here?  We may need just VM_WARN_ON() here?
>
> When the platform driver sets memory tier directly. With the old code
> it can happen when dax/kmem register a node to a memory tier. With
> memory_type proposal this can happen if the node is part of memory
> type that is already added to a memory tier. 

Let's look at what it looks like with memory_type in place.

Best Regards,
Huang, Ying

>>
>>>>> +	mutex_unlock(&memory_tier_lock);
>>>>> +}
>>>>> +

[snip]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ