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]
Message-ID: <02d8fc61-80c4-4689-b2fc-822b546a9032@fujitsu.com>
Date:   Thu, 2 Nov 2023 08:15:03 +0000
From:   "Zhijian Li (Fujitsu)" <lizhijian@...itsu.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "ying.huang@...el.com" <ying.huang@...el.com>,
        "Yasunori Gotou (Fujitsu)" <y-goto@...itsu.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC 4/4] drivers/base/node: add demote_src and demote_dst
 to numastat



On 02/11/2023 13:40, Greg Kroah-Hartman wrote:
>> index 27e8502548a7..d3fc70599b6a 100644
>> --- a/drivers/base/node.c
>> +++ b/drivers/base/node.c
>> @@ -496,20 +496,32 @@ static DEVICE_ATTR(meminfo, 0444, node_read_meminfo, NULL);
>>   static ssize_t node_read_numastat(struct device *dev,
>>   				  struct device_attribute *attr, char *buf)
>>   {
>> +	struct pglist_data *pgdat = NODE_DATA(dev->id);
>> +	unsigned long demote_src, demote_dst;
>> +
>>   	fold_vm_numa_events();
>> +	demote_src = node_page_state_pages(pgdat, PGDEMOTE_SRC_KSWAPD) +
>> +		     node_page_state_pages(pgdat, PGDEMOTE_SRC_DIRECT) +
>> +		     node_page_state_pages(pgdat, PGDEMOTE_SRC_KHUGEPAGED);
>> +	demote_dst = node_page_state_pages(pgdat, PGDEMOTE_DST_KSWAPD) +
>> +		     node_page_state_pages(pgdat, PGDEMOTE_DST_DIRECT) +
>> +		     node_page_state_pages(pgdat, PGDEMOTE_DST_KHUGEPAGED);
>>   	return sysfs_emit(buf,
>>   			  "numa_hit %lu\n"
>>   			  "numa_miss %lu\n"
>>   			  "numa_foreign %lu\n"
>>   			  "interleave_hit %lu\n"
>>   			  "local_node %lu\n"
>> -			  "other_node %lu\n",
>> +			  "other_node %lu\n"
>> +			  "demote_src %lu\n"
>> +			  "demote_dst %lu\n",
> This sysfs file is already a total abuse of sysfs so please, do NOT make
> it worse by adding more fields, that's just wrong and something I can
> not take at all for obvious reasons.
> 

Alright, thank you for your feedback. We will reconsider other options if necessary.

Thanks
Zhijian


> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ