Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cf744bc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
  ...
parents b5283926 7f8998c7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -85,14 +85,6 @@ Description:
		will be compacted. When it completes, memory will be freed
		into blocks which have as many contiguous pages as possible

What:		/sys/devices/system/node/nodeX/scan_unevictable_pages
Date:		October 2008
Contact:	Lee Schermerhorn <lee.schermerhorn@hp.com>
Description:
		When set, it triggers scanning the node's unevictable lists
		and move any pages that have become evictable onto the respective
		zone's inactive list. See mm/vmscan.c

What:		/sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
Date:		December 2009
Contact:	Lee Schermerhorn <lee.schermerhorn@hp.com>
+27 −5
Original line number Diff line number Diff line
@@ -77,11 +77,14 @@ What: /sys/block/zram<id>/notify_free
Date:		August 2010
Contact:	Nitin Gupta <ngupta@vflare.org>
Description:
		The notify_free file is read-only and specifies the number of
		swap slot free notifications received by this device. These
		notifications are sent to a swap block device when a swap slot
		is freed. This statistic is applicable only when this disk is
		being used as a swap disk.
		The notify_free file is read-only. Depending on device usage
		scenario it may account a) the number of pages freed because
		of swap slot free notifications or b) the number of pages freed
		because of REQ_DISCARD requests sent by bio. The former ones
		are sent to a swap block device when a swap slot is freed, which
		implies that this disk is being used as a swap disk. The latter
		ones are sent by filesystem mounted with discard option,
		whenever some data blocks are getting discarded.

What:		/sys/block/zram<id>/zero_pages
Date:		August 2010
@@ -119,3 +122,22 @@ Description:
		efficiency can be calculated using compr_data_size and this
		statistic.
		Unit: bytes

What:		/sys/block/zram<id>/mem_used_max
Date:		August 2014
Contact:	Minchan Kim <minchan@kernel.org>
Description:
		The mem_used_max file is read/write and specifies the amount
		of maximum memory zram have consumed to store compressed data.
		For resetting the value, you should write "0". Otherwise,
		you could see -EINVAL.
		Unit: bytes

What:		/sys/block/zram<id>/mem_limit
Date:		August 2014
Contact:	Minchan Kim <minchan@kernel.org>
Description:
		The mem_limit file is read/write and specifies the maximum
		amount of memory ZRAM can use to store the compressed data.  The
		limit could be changed in run time and "0" means disable the
		limit.  No limit is the initial state.  Unit: bytes
+8 −0
Original line number Diff line number Diff line
@@ -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/valid_zones
Date:           July 2014
Contact:	Zhang Zhen <zhenzhang.zhang@huawei.com>
Description:
		The file /sys/devices/system/memory/memoryX/valid_zones	is
		read-only and is designed to show which zone this memory
		block can be onlined to.

What:		/sys/devices/system/memoryX/nodeY
Date:		October 2009
Contact:	Linux Memory Management list <linux-mm@kvack.org>
+21 −4
Original line number Diff line number Diff line
@@ -74,14 +74,30 @@ There is little point creating a zram of greater than twice the size of memory
since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the
size of the disk when not in use so a huge zram is wasteful.

5) Activate:
5) Set memory limit: Optional
	Set memory limit by writing the value to sysfs node 'mem_limit'.
	The value can be either in bytes or you can use mem suffixes.
	In addition, you could change the value in runtime.
	Examples:
	    # limit /dev/zram0 with 50MB memory
	    echo $((50*1024*1024)) > /sys/block/zram0/mem_limit

	    # Using mem suffixes
	    echo 256K > /sys/block/zram0/mem_limit
	    echo 512M > /sys/block/zram0/mem_limit
	    echo 1G > /sys/block/zram0/mem_limit

	    # To disable memory limit
	    echo 0 > /sys/block/zram0/mem_limit

6) Activate:
	mkswap /dev/zram0
	swapon /dev/zram0

	mkfs.ext4 /dev/zram1
	mount /dev/zram1 /tmp

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

7) Deactivate:
8) Deactivate:
	swapoff /dev/zram0
	umount /dev/zram1

8) Reset:
9) Reset:
	Write any positive value to 'reset' sysfs node
	echo 1 > /sys/block/zram0/reset
	echo 1 > /sys/block/zram1/reset
+11 −6
Original line number Diff line number Diff line
@@ -656,7 +656,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			Sets the size of kernel global memory area for
			contiguous memory allocations and optionally the
			placement constraint by the physical address range of
			memory allocations. For more information, see
			memory allocations. A value of 0 disables CMA
			altogether. For more information, see
			include/linux/dma-contiguous.h

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

	slram=		[HW,MTD]

	slab_nomerge	[MM]
			Disable merging of slabs with similar size. May be
			necessary if there is some reason to distinguish
			allocs to different slabs. Debug options disable
			merging on their own.
			For more information see Documentation/vm/slub.txt.

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

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

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