From: Sheng Yong <shengyong1@huawei.com>
To: akpm@linux-foundation.org, gregkh@linuxfoundation.org,
nfont@austin.ibm.com
Cc: linux-mm@kvack.org, zhenzhang.zhang@huawei.com
Subject: [RFC PATCH 2/2] mem-hotplug: add description of sysfs `range' attribute
Date: Mon, 2 Mar 2015 04:05:00 +0000 [thread overview]
Message-ID: <1425269100-15842-2-git-send-email-shengyong1@huawei.com> (raw)
In-Reply-To: <1425269100-15842-1-git-send-email-shengyong1@huawei.com>
Add description of sysfs `range' attribute, which is designed to show the
memory holes in a memory section.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
Documentation/ABI/testing/sysfs-devices-memory | 8 ++++++++
Documentation/memory-hotplug.txt | 12 ++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
index deef3b5..15629f5 100644
--- a/Documentation/ABI/testing/sysfs-devices-memory
+++ b/Documentation/ABI/testing/sysfs-devices-memory
@@ -69,6 +69,14 @@ Description:
read-only and is designed to show which zone this memory
block can be onlined to.
+What: /sys/devices/system/memory/memoryX/range
+Date: Feb 2015
+Contact: Sheng Yong <shengyong1@huawei.com>
+Description:
+ The file /sys/devices/system/memory/memoryX/range is
+ read-only and is designed to show memory holes in one
+ memory section.
+
What: /sys/devices/system/memoryX/nodeY
Date: October 2009
Contact: Linux Memory Management list <linux-mm@kvack.org>
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index ea03abf..d59724b 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -140,22 +140,22 @@ is described under /sys/devices/system/memory as
For the memory block covered by the sysfs directory. It is expected that all
memory sections in this range are present and no memory holes exist in the
-range. Currently there is no way to determine if there is a memory hole, but
-the existence of one should not affect the hotplug capabilities of the memory
-block.
+range. However, if there is a memory hole, the existence of one should not
+affect the hotplug capabilities of the memory block.
For example, assume 1GiB memory block size. A device for a memory starting at
0x100000000 is /sys/device/system/memory/memory4
(0x100000000 / 1Gib = 4)
This device covers address range [0x100000000 ... 0x140000000)
-Under each memory block, you can see 4 files:
+Under each memory block, you can see 6 files:
/sys/devices/system/memory/memoryXXX/phys_index
/sys/devices/system/memory/memoryXXX/phys_device
/sys/devices/system/memory/memoryXXX/state
/sys/devices/system/memory/memoryXXX/removable
/sys/devices/system/memory/memoryXXX/valid_zones
+/sys/devices/system/memory/memoryXXX/range
'phys_index' : read-only and contains memory block id, same as XXX.
'state' : read-write
@@ -180,6 +180,10 @@ Under each memory block, you can see 4 files:
"memory7/valid_zones: Movable Normal" shows this memoryblock
can be onlined to ZONE_MOVABLE by default and to ZONE_NORMAL
by online_kernel.
+'range' : read-only: designed to show memory holes in a memory
+ section.
+ Each line shows the start and end physical address of a
+ memory area.
NOTE:
These directories/files appear after physical memory hotplug phase.
--
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-03-02 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 4:04 [RFC PATCH 1/2] mem-hotplug: introduce " Sheng Yong
2015-03-02 4:05 ` Sheng Yong [this message]
2015-03-02 9:17 ` Naoya Horiguchi
2015-03-02 12:29 ` shengyong
2015-03-07 4:26 ` shengyong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425269100-15842-2-git-send-email-shengyong1@huawei.com \
--to=shengyong1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-mm@kvack.org \
--cc=nfont@austin.ibm.com \
--cc=zhenzhang.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox