aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:26:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:26:14 -0400
commit0cf744bc7ae8e0072159a901f6e1a159bbc30ffa (patch)
treefc8222a3a5af4f42226070c3f76462cfcf0b4e50 /Documentation
parentb528392669415dc1e53a047215e5ad6c2de879fc (diff)
parent7f8998c7aef3ac9c5f3f2943e083dfa6302e90d0 (diff)
Merge branch 'akpm' (fixes from Andrew Morton)
Merge patch-bomb from Andrew Morton: - part of OCFS2 (review is laggy again) - procfs - slab - all of MM - zram, zbud - various other random things: arch, filesystems. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (164 commits) nosave: consolidate __nosave_{begin,end} in <asm/sections.h> include/linux/screen_info.h: remove unused ORIG_* macros kernel/sys.c: compat sysinfo syscall: fix undefined behavior kernel/sys.c: whitespace fixes acct: eliminate compile warning kernel/async.c: switch to pr_foo() include/linux/blkdev.h: use NULL instead of zero include/linux/kernel.h: deduplicate code implementing clamp* macros include/linux/kernel.h: rewrite min3, max3 and clamp using min and max alpha: use Kbuild logic to include <asm-generic/sections.h> frv: remove deprecated IRQF_DISABLED frv: remove unused cpuinfo_frv and friends to fix future build error zbud: avoid accessing last unused freelist zsmalloc: simplify init_zspage free obj linking mm/zsmalloc.c: correct comment for fullness group computation zram: use notify_free to account all free notifications zram: report maximum used memory zram: zram memory size limitation zsmalloc: change return value unit of zs_get_total_size_bytes zsmalloc: move pages_allocated to zs_pool ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-devices-node8
-rw-r--r--Documentation/ABI/testing/sysfs-block-zram32
-rw-r--r--Documentation/ABI/testing/sysfs-devices-memory8
-rw-r--r--Documentation/blockdev/zram.txt25
-rw-r--r--Documentation/kernel-parameters.txt17
-rw-r--r--Documentation/memory-hotplug.txt11
6 files changed, 77 insertions, 24 deletions
diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node
index ce259c13c36a..5b2d0f08867c 100644
--- a/Documentation/ABI/stable/sysfs-devices-node
+++ b/Documentation/ABI/stable/sysfs-devices-node
@@ -85,14 +85,6 @@ Description:
85 will be compacted. When it completes, memory will be freed 85 will be compacted. When it completes, memory will be freed
86 into blocks which have as many contiguous pages as possible 86 into blocks which have as many contiguous pages as possible
87 87
88What: /sys/devices/system/node/nodeX/scan_unevictable_pages
89Date: October 2008
90Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
91Description:
92 When set, it triggers scanning the node's unevictable lists
93 and move any pages that have become evictable onto the respective
94 zone's inactive list. See mm/vmscan.c
95
96What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/ 88What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
97Date: December 2009 89Date: December 2009
98Contact: Lee Schermerhorn <lee.schermerhorn@hp.com> 90Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram
index 70ec992514d0..a6148eaf91e5 100644
--- a/Documentation/ABI/testing/sysfs-block-zram
+++ b/Documentation/ABI/testing/sysfs-block-zram
@@ -77,11 +77,14 @@ What: /sys/block/zram<id>/notify_free
77Date: August 2010 77Date: August 2010
78Contact: Nitin Gupta <ngupta@vflare.org> 78Contact: Nitin Gupta <ngupta@vflare.org>
79Description: 79Description:
80 The notify_free file is read-only and specifies the number of 80 The notify_free file is read-only. Depending on device usage
81 swap slot free notifications received by this device. These 81 scenario it may account a) the number of pages freed because
82 notifications are sent to a swap block device when a swap slot 82 of swap slot free notifications or b) the number of pages freed
83 is freed. This statistic is applicable only when this disk is 83 because of REQ_DISCARD requests sent by bio. The former ones
84 being used as a swap disk. 84 are sent to a swap block device when a swap slot is freed, which
85 implies that this disk is being used as a swap disk. The latter
86 ones are sent by filesystem mounted with discard option,
87 whenever some data blocks are getting discarded.
85 88
86What: /sys/block/zram<id>/zero_pages 89What: /sys/block/zram<id>/zero_pages
87Date: August 2010 90Date: August 2010
@@ -119,3 +122,22 @@ Description:
119 efficiency can be calculated using compr_data_size and this 122 efficiency can be calculated using compr_data_size and this
120 statistic. 123 statistic.
121 Unit: bytes 124 Unit: bytes
125
126What: /sys/block/zram<id>/mem_used_max
127Date: August 2014
128Contact: Minchan Kim <minchan@kernel.org>
129Description:
130 The mem_used_max file is read/write and specifies the amount
131 of maximum memory zram have consumed to store compressed data.
132 For resetting the value, you should write "0". Otherwise,
133 you could see -EINVAL.
134 Unit: bytes
135
136What: /sys/block/zram<id>/mem_limit
137Date: August 2014
138Contact: Minchan Kim <minchan@kernel.org>
139Description:
140 The mem_limit file is read/write and specifies the maximum
141 amount of memory ZRAM can use to store the compressed data. The
142 limit could be changed in run time and "0" means disable the
143 limit. No limit is the initial state. Unit: bytes
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
index 7405de26ee60..deef3b5723cf 100644
--- a/Documentation/ABI/testing/sysfs-devices-memory
+++ b/Documentation/ABI/testing/sysfs-devices-memory
@@ -61,6 +61,14 @@ Users: hotplug memory remove tools
61 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 61 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
62 62
63 63
64What: /sys/devices/system/memory/memoryX/valid_zones
65Date: July 2014
66Contact: Zhang Zhen <zhenzhang.zhang@huawei.com>
67Description:
68 The file /sys/devices/system/memory/memoryX/valid_zones is
69 read-only and is designed to show which zone this memory
70 block can be onlined to.
71
64What: /sys/devices/system/memoryX/nodeY 72What: /sys/devices/system/memoryX/nodeY
65Date: October 2009 73Date: October 2009
66Contact: Linux Memory Management list <linux-mm@kvack.org> 74Contact: Linux Memory Management list <linux-mm@kvack.org>
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
index 0595c3f56ccf..7fcf9c6592ec 100644
--- a/Documentation/blockdev/zram.txt
+++ b/Documentation/blockdev/zram.txt
@@ -74,14 +74,30 @@ There is little point creating a zram of greater than twice the size of memory
74since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the 74since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the
75size of the disk when not in use so a huge zram is wasteful. 75size of the disk when not in use so a huge zram is wasteful.
76 76
775) Activate: 775) Set memory limit: Optional
78 Set memory limit by writing the value to sysfs node 'mem_limit'.
79 The value can be either in bytes or you can use mem suffixes.
80 In addition, you could change the value in runtime.
81 Examples:
82 # limit /dev/zram0 with 50MB memory
83 echo $((50*1024*1024)) > /sys/block/zram0/mem_limit
84
85 # Using mem suffixes
86 echo 256K > /sys/block/zram0/mem_limit
87 echo 512M > /sys/block/zram0/mem_limit
88 echo 1G > /sys/block/zram0/mem_limit
89
90 # To disable memory limit
91 echo 0 > /sys/block/zram0/mem_limit
92
936) Activate:
78 mkswap /dev/zram0 94 mkswap /dev/zram0
79 swapon /dev/zram0 95 swapon /dev/zram0
80 96
81 mkfs.ext4 /dev/zram1 97 mkfs.ext4 /dev/zram1
82 mount /dev/zram1 /tmp 98 mount /dev/zram1 /tmp
83 99
846) Stats: 1007) Stats:
85 Per-device statistics are exported as various nodes under 101 Per-device statistics are exported as various nodes under
86 /sys/block/zram<id>/ 102 /sys/block/zram<id>/
87 disksize 103 disksize
@@ -95,12 +111,13 @@ size of the disk when not in use so a huge zram is wasteful.
95 orig_data_size 111 orig_data_size
96 compr_data_size 112 compr_data_size
97 mem_used_total 113 mem_used_total
114 mem_used_max
98 115
997) Deactivate: 1168) Deactivate:
100 swapoff /dev/zram0 117 swapoff /dev/zram0
101 umount /dev/zram1 118 umount /dev/zram1
102 119
1038) Reset: 1209) Reset:
104 Write any positive value to 'reset' sysfs node 121 Write any positive value to 'reset' sysfs node
105 echo 1 > /sys/block/zram0/reset 122 echo 1 > /sys/block/zram0/reset
106 echo 1 > /sys/block/zram1/reset 123 echo 1 > /sys/block/zram1/reset
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index cc4ab2517abc..41f7ec1fcf61 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -656,7 +656,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
656 Sets the size of kernel global memory area for 656 Sets the size of kernel global memory area for
657 contiguous memory allocations and optionally the 657 contiguous memory allocations and optionally the
658 placement constraint by the physical address range of 658 placement constraint by the physical address range of
659 memory allocations. For more information, see 659 memory allocations. A value of 0 disables CMA
660 altogether. For more information, see
660 include/linux/dma-contiguous.h 661 include/linux/dma-contiguous.h
661 662
662 cmo_free_hint= [PPC] Format: { yes | no } 663 cmo_free_hint= [PPC] Format: { yes | no }
@@ -3158,6 +3159,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3158 3159
3159 slram= [HW,MTD] 3160 slram= [HW,MTD]
3160 3161
3162 slab_nomerge [MM]
3163 Disable merging of slabs with similar size. May be
3164 necessary if there is some reason to distinguish
3165 allocs to different slabs. Debug options disable
3166 merging on their own.
3167 For more information see Documentation/vm/slub.txt.
3168
3161 slab_max_order= [MM, SLAB] 3169 slab_max_order= [MM, SLAB]
3162 Determines the maximum allowed order for slabs. 3170 Determines the maximum allowed order for slabs.
3163 A high setting may cause OOMs due to memory 3171 A high setting may cause OOMs due to memory
@@ -3193,11 +3201,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3193 For more information see Documentation/vm/slub.txt. 3201 For more information see Documentation/vm/slub.txt.
3194 3202
3195 slub_nomerge [MM, SLUB] 3203 slub_nomerge [MM, SLUB]
3196 Disable merging of slabs with similar size. May be 3204 Same with slab_nomerge. This is supported for legacy.
3197 necessary if there is some reason to distinguish 3205 See slab_nomerge for more information.
3198 allocs to different slabs. Debug options disable
3199 merging on their own.
3200 For more information see Documentation/vm/slub.txt.
3201 3206
3202 smart2= [HW] 3207 smart2= [HW]
3203 Format: <io1>[,<io2>[,...,<io8>]] 3208 Format: <io1>[,<io2>[,...,<io8>]]
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 45134dc23854..ea03abfc97e9 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -155,6 +155,7 @@ Under each memory block, you can see 4 files:
155/sys/devices/system/memory/memoryXXX/phys_device 155/sys/devices/system/memory/memoryXXX/phys_device
156/sys/devices/system/memory/memoryXXX/state 156/sys/devices/system/memory/memoryXXX/state
157/sys/devices/system/memory/memoryXXX/removable 157/sys/devices/system/memory/memoryXXX/removable
158/sys/devices/system/memory/memoryXXX/valid_zones
158 159
159'phys_index' : read-only and contains memory block id, same as XXX. 160'phys_index' : read-only and contains memory block id, same as XXX.
160'state' : read-write 161'state' : read-write
@@ -170,6 +171,15 @@ Under each memory block, you can see 4 files:
170 block is removable and a value of 0 indicates that 171 block is removable and a value of 0 indicates that
171 it is not removable. A memory block is removable only if 172 it is not removable. A memory block is removable only if
172 every section in the block is removable. 173 every section in the block is removable.
174'valid_zones' : read-only: designed to show which zones this memory block
175 can be onlined to.
176 The first column shows it's default zone.
177 "memory6/valid_zones: Normal Movable" shows this memoryblock
178 can be onlined to ZONE_NORMAL by default and to ZONE_MOVABLE
179 by online_movable.
180 "memory7/valid_zones: Movable Normal" shows this memoryblock
181 can be onlined to ZONE_MOVABLE by default and to ZONE_NORMAL
182 by online_kernel.
173 183
174NOTE: 184NOTE:
175 These directories/files appear after physical memory hotplug phase. 185 These directories/files appear after physical memory hotplug phase.
@@ -408,7 +418,6 @@ node if necessary.
408 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like 418 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like
409 sysctl or new control file. 419 sysctl or new control file.
410 - showing memory block and physical device relationship. 420 - showing memory block and physical device relationship.
411 - showing memory block is under ZONE_MOVABLE or not
412 - test and make it better memory offlining. 421 - test and make it better memory offlining.
413 - support HugeTLB page migration and offlining. 422 - support HugeTLB page migration and offlining.
414 - memmap removing at memory offline. 423 - memmap removing at memory offline.