Skip to content

Commit 0cf744b

Browse files
committed
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 ...
2 parents b528392 + 7f8998c commit 0cf744b

177 files changed

Lines changed: 4103 additions & 2866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/ABI/stable/sysfs-devices-node‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ Description:
8585
will be compacted. When it completes, memory will be freed
8686
into blocks which have as many contiguous pages as possible
8787

88-
What: /sys/devices/system/node/nodeX/scan_unevictable_pages
89-
Date: October 2008
90-
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
91-
Description:
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-
9688
What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
9789
Date: December 2009
9890
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>

‎Documentation/ABI/testing/sysfs-block-zram‎

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ What: /sys/block/zram<id>/notify_free
7777
Date: August 2010
7878
Contact: Nitin Gupta <ngupta@vflare.org>
7979
Description:
80-
The notify_free file is read-only and specifies the number of
81-
swap slot free notifications received by this device. These
82-
notifications are sent to a swap block device when a swap slot
83-
is freed. This statistic is applicable only when this disk is
84-
being used as a swap disk.
80+
The notify_free file is read-only. Depending on device usage
81+
scenario it may account a) the number of pages freed because
82+
of swap slot free notifications or b) the number of pages freed
83+
because of REQ_DISCARD requests sent by bio. The former ones
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.
8588

8689
What: /sys/block/zram<id>/zero_pages
8790
Date: August 2010
@@ -119,3 +122,22 @@ Description:
119122
efficiency can be calculated using compr_data_size and this
120123
statistic.
121124
Unit: bytes
125+
126+
What: /sys/block/zram<id>/mem_used_max
127+
Date: August 2014
128+
Contact: Minchan Kim <minchan@kernel.org>
129+
Description:
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+
136+
What: /sys/block/zram<id>/mem_limit
137+
Date: August 2014
138+
Contact: Minchan Kim <minchan@kernel.org>
139+
Description:
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

‎Documentation/ABI/testing/sysfs-devices-memory‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ Users: hotplug memory remove tools
6161
http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
6262

6363

64+
What: /sys/devices/system/memory/memoryX/valid_zones
65+
Date: July 2014
66+
Contact: Zhang Zhen <zhenzhang.zhang@huawei.com>
67+
Description:
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+
6472
What: /sys/devices/system/memoryX/nodeY
6573
Date: October 2009
6674
Contact: Linux Memory Management list <linux-mm@kvack.org>

‎Documentation/blockdev/zram.txt‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,30 @@ There is little point creating a zram of greater than twice the size of memory
7474
since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the
7575
size of the disk when not in use so a huge zram is wasteful.
7676

77-
5) Activate:
77+
5) 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+
93+
6) Activate:
7894
mkswap /dev/zram0
7995
swapon /dev/zram0
8096

8197
mkfs.ext4 /dev/zram1
8298
mount /dev/zram1 /tmp
8399

84-
6) Stats:
100+
7) Stats:
85101
Per-device statistics are exported as various nodes under
86102
/sys/block/zram<id>/
87103
disksize
@@ -95,12 +111,13 @@ size of the disk when not in use so a huge zram is wasteful.
95111
orig_data_size
96112
compr_data_size
97113
mem_used_total
114+
mem_used_max
98115

99-
7) Deactivate:
116+
8) Deactivate:
100117
swapoff /dev/zram0
101118
umount /dev/zram1
102119

103-
8) Reset:
120+
9) Reset:
104121
Write any positive value to 'reset' sysfs node
105122
echo 1 > /sys/block/zram0/reset
106123
echo 1 > /sys/block/zram1/reset

‎Documentation/kernel-parameters.txt‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
656656
Sets the size of kernel global memory area for
657657
contiguous memory allocations and optionally the
658658
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
660661
include/linux/dma-contiguous.h
661662

662663
cmo_free_hint= [PPC] Format: { yes | no }
@@ -3158,6 +3159,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
31583159

31593160
slram= [HW,MTD]
31603161

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+
31613169
slab_max_order= [MM, SLAB]
31623170
Determines the maximum allowed order for slabs.
31633171
A high setting may cause OOMs due to memory
@@ -3193,11 +3201,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
31933201
For more information see Documentation/vm/slub.txt.
31943202

31953203
slub_nomerge [MM, SLUB]
3196-
Disable merging of slabs with similar size. May be
3197-
necessary if there is some reason to distinguish
3198-
allocs to different slabs. Debug options disable
3199-
merging on their own.
3200-
For more information see Documentation/vm/slub.txt.
3204+
Same with slab_nomerge. This is supported for legacy.
3205+
See slab_nomerge for more information.
32013206

32023207
smart2= [HW]
32033208
Format: <io1>[,<io2>[,...,<io8>]]

‎Documentation/memory-hotplug.txt‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Under each memory block, you can see 4 files:
155155
/sys/devices/system/memory/memoryXXX/phys_device
156156
/sys/devices/system/memory/memoryXXX/state
157157
/sys/devices/system/memory/memoryXXX/removable
158+
/sys/devices/system/memory/memoryXXX/valid_zones
158159

159160
'phys_index' : read-only and contains memory block id, same as XXX.
160161
'state' : read-write
@@ -170,6 +171,15 @@ Under each memory block, you can see 4 files:
170171
block is removable and a value of 0 indicates that
171172
it is not removable. A memory block is removable only if
172173
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.
173183

174184
NOTE:
175185
These directories/files appear after physical memory hotplug phase.
@@ -408,7 +418,6 @@ node if necessary.
408418
- allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like
409419
sysctl or new control file.
410420
- showing memory block and physical device relationship.
411-
- showing memory block is under ZONE_MOVABLE or not
412421
- test and make it better memory offlining.
413422
- support HugeTLB page migration and offlining.
414423
- memmap removing at memory offline.

‎arch/alpha/include/asm/Kbuild‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ generic-y += irq_work.h
88
generic-y += mcs_spinlock.h
99
generic-y += preempt.h
1010
generic-y += scatterlist.h
11+
generic-y += sections.h
1112
generic-y += trace_clock.h

‎arch/alpha/include/asm/sections.h‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎arch/arm/Kconfig‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ config ARM
1414
select CLONE_BACKWARDS
1515
select CPU_PM if (SUSPEND || CPU_IDLE)
1616
select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
17+
select GENERIC_ALLOCATOR
1718
select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
1819
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
1920
select GENERIC_IDLE_POLL_SETUP
@@ -61,6 +62,7 @@ config ARM
6162
select HAVE_PERF_EVENTS
6263
select HAVE_PERF_REGS
6364
select HAVE_PERF_USER_STACK_DUMP
65+
select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE)
6466
select HAVE_REGS_AND_STACK_ACCESS_API
6567
select HAVE_SYSCALL_TRACEPOINTS
6668
select HAVE_UID16
@@ -1659,6 +1661,10 @@ config ARCH_SELECT_MEMORY_MODEL
16591661
config HAVE_ARCH_PFN_VALID
16601662
def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
16611663

1664+
config HAVE_GENERIC_RCU_GUP
1665+
def_bool y
1666+
depends on ARM_LPAE
1667+
16621668
config HIGHMEM
16631669
bool "High Memory Support"
16641670
depends on MMU

‎arch/arm/include/asm/pgtable-2level.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
182182
#define pmd_addr_end(addr,end) (end)
183183

184184
#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
185+
#define pte_special(pte) (0)
186+
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
185187

186188
/*
187189
* We don't have huge page support for short descriptors, for the moment

0 commit comments

Comments
 (0)