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:	Wed, 05 Nov 2008 13:03:44 -0800
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Gary Hade <garyhade@...ibm.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, y-goto@...fujitsu.com,
	pbadari@...ibm.com, mel@....ul.ie, lcm@...ibm.com, mingo@...e.hu,
	greg@...ah.com, nish.aravamudan@...il.com
Subject: Re: [PATCH] [REPOST #2] mm: show node to memory section
	relationship with symlinks in sysfs

On Wed, 2008-11-05 at 12:36 -0800, Andrew Morton wrote:
> Dumb question: why do this with a symlink forest instead of, say, cat
> /proc/sys/vm/mem-sections?

The basic problem is that we on/offline memory based on sections and not
nodes.  But, physically, people care about nodes.

So, the question we're answering is "to which sections does this node's
memory belong?".  We could just put all this data in one big file and
have:

$ cat /proc/sys/vm/mem-sections?
node: section numbers
0: 1 2 3 4 5
1: 5 6 7 8
2: 99 100 101 102

But, we have the nodes in sysfs and we also have the sections in sysfs
and I don't want Greg to be mean to me.  He's scary.  We could simply
dump the section numbers in sysfs, but the first thing userspace is
going to do is:

for section in /sys/devices/system/node/node1/memory*; do
	nr=$(cat $section)
	cat foo > /sys/devices/system/memory/memory$nr/bar
done

Making the symlinks makes it harder for us to screw this process up,
both in the kernel and in userspace.  Plus, symlinks are easy to code up
in sysfs. 

-- Dave

--
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