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: <20140822151622.6786c1089548ea5ceb3732bf@linux-foundation.org>
Date:	Fri, 22 Aug 2014 15:16:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Zhang Zhen <zhenzhang.zhang@...wei.com>
Cc:	Toshi Kani <toshi.kani@...com>,
	Dave Hansen <dave.hansen@...el.com>,
	David Rientjes <rientjes@...gle.com>,
	<isimatu.yasuaki@...fujitsu.com>, <n-horiguchi@...jp.nec.com>,
	<wangnan0@...wei.com>, <linux-kernel@...r.kernel.org>,
	Linux MM <linux-mm@...ck.org>
Subject: Re: [PATCH v2] memory-hotplug: add sysfs zones_online_to attribute

On Mon, 18 Aug 2014 11:25:36 +0800 Zhang Zhen <zhenzhang.zhang@...wei.com> wrote:

> On 2014/8/16 5:37, Toshi Kani wrote:
> > On Wed, 2014-08-13 at 12:10 +0800, Zhang Zhen wrote:
> >> Currently memory-hotplug has two limits:
> >> 1. If the memory block is in ZONE_NORMAL, you can change it to
> >> ZONE_MOVABLE, but this memory block must be adjacent to ZONE_MOVABLE.
> >> 2. If the memory block is in ZONE_MOVABLE, you can change it to
> >> ZONE_NORMAL, but this memory block must be adjacent to ZONE_NORMAL.
> >>
> >> With this patch, we can easy to know a memory block can be onlined to
> >> which zone, and don't need to know the above two limits.
> >>
> >> Updated the related Documentation.
> >>
> >> Change v1 -> v2:
> >> - optimize the implementation following Dave Hansen's suggestion
> >>
> >> Signed-off-by: Zhang Zhen <zhenzhang.zhang@...wei.com>
> >> ---
> >>  Documentation/ABI/testing/sysfs-devices-memory |  8 ++++
> >>  Documentation/memory-hotplug.txt               |  4 +-
> >>  drivers/base/memory.c                          | 62 ++++++++++++++++++++++++++
> >>  include/linux/memory_hotplug.h                 |  1 +
> >>  mm/memory_hotplug.c                            |  2 +-
> >>  5 files changed, 75 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
> >> index 7405de2..2b2a1d7 100644
> >> --- a/Documentation/ABI/testing/sysfs-devices-memory
> >> +++ b/Documentation/ABI/testing/sysfs-devices-memory
> >> @@ -61,6 +61,14 @@ Users:		hotplug memory remove tools
> >>  		http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
> >>
> >>
> >> +What:           /sys/devices/system/memory/memoryX/zones_online_to
> > 
> > I think this name is a bit confusing.  How about "valid_online_types"?
> > 
> Thanks for your suggestion.
> 
> This patch has been added to -mm tree.
> If most people think so, i would like to modify the interface name.
> If not, let's leave it as it is.

Yes, the name could be better.  Do we actually need "online" in there? 
How about "valid_zones"?

Also, it's not really clear to me why we need this sysfs file at all. 
Do people really read sysfs files, make onlining decisions and manually
type in commands?  Or is this stuff all automated?  If the latter then
the script can take care of all this?  For example, attempt to online
the memory into the desired zone and report failure if that didn't
succeed?

IOW, please update the changelog to show

a) example output from
   /sys/devices/system/memory/memoryX/whatever-we-call-it and

b) example use-cases which help reviewers understand why this
   feature will be valuable to users.

Also, please do address the error which Yasuaki Ishimatsu identified.

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