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>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1404091734060.1857@chino.kir.corp.google.com>
Date:	Wed, 9 Apr 2014 17:41:25 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
cc:	drepper@...il.com, anatol.pomozov@...il.com, jkosina@...e.cz,
	akpm@...ux-foundation.org, xemul@...allels.com,
	paul.gortmaker@...driver.com, linux-kernel@...r.kernel.org
Subject: Re: NUMA node information for pages

On Tue, 8 Apr 2014, Naoya Horiguchi wrote:

> memory hotplug is done in memory block basis, so if we get info from under
> /sys/devices/system/memory/memory<ID> it should be memory hotplug-aware
> (/sys/devices/system/memory/memory<ID>/state shows online/offline status.)
> 
> And IIUC, "pfn-node_id" mapping might be already available for userspace.
> /sys/devices/system/memory/block_size_bytes exports memory block size,
> so we can simply map pfn (physical address) into memory block ID by
> (physicall address)/(memory block size), then we can find associated node
> from /sys/devices/system/memory/memory<ID>
> 
>   $ ls -l /sys/devices/system/memory/memory0
>   ...
>   lrwxrwxrwx 1 root root    0 Apr  8 00:15 node0 -> ../../node/node0
> 

That's only possible with sparsemem and if you have memory hotplug 
enabled.  I'm thinking that Ulrich is looking for a solution that won't 
have such a dependency and work for all memory models (including one that 
disables NUMA and simply represents all memory as one big node).

 [ And that block_size_bytes file is absolutely horrid, why are we
   exporting all this information in hex and not telling anybody? ]

I'd much prefer a single change that works for everybody and userspace can 
rely on exporting accurate information as long as sysfs is mounted, and 
not even need to rely on getpagesize() to convert from pfn to physical 
address: just simple {start,end}_phys_addr files added to 
/sys/devices/system/node/nodeN/ for node N.  Online information can 
already be parsed for these ranges from /sys/devices/system/node/online.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ