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

Commit 5ce1a70e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (more incoming from Andrew)

Merge second patch-bomb from Andrew Morton:

 - A little DM fix

 - the MM queue

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (154 commits)
  ksm: allocate roots when needed
  mm: cleanup "swapcache" in do_swap_page
  mm,ksm: swapoff might need to copy
  mm,ksm: FOLL_MIGRATION do migration_entry_wait
  ksm: shrink 32-bit rmap_item back to 32 bytes
  ksm: treat unstable nid like in stable tree
  ksm: add some comments
  tmpfs: fix mempolicy object leaks
  tmpfs: fix use-after-free of mempolicy object
  mm/fadvise.c: drain all pagevecs if POSIX_FADV_DONTNEED fails to discard all pages
  mm: export mmu notifier invalidates
  mm: accelerate mm_populate() treatment of THP pages
  mm: use long type for page counts in mm_populate() and get_user_pages()
  mm: accurately document nr_free_*_pages functions with code comments
  HWPOISON: change order of error_states[]'s elements
  HWPOISON: fix misjudgement of page_action() for errors on mlocked pages
  memcg: stop warning on memcg_propagate_kmem
  net: change type of virtio_chan->p9_max_pages
  vmscan: change type of vm_total_pages to unsigned long
  fs/nfsd: change type of max_delegations, nfsd_drc_max_mem and nfsd_drc_mem_used
  ...
parents 9d3cae26 ef53d16c
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
What:		/sys/kernel/mm/ksm
Date:		September 2009
KernelVersion:	2.6.32
Contact:	Linux memory management mailing list <linux-mm@kvack.org>
Description:	Interface for Kernel Samepage Merging (KSM)

What:		/sys/kernel/mm/ksm/full_scans
What:		/sys/kernel/mm/ksm/pages_shared
What:		/sys/kernel/mm/ksm/pages_sharing
What:		/sys/kernel/mm/ksm/pages_to_scan
What:		/sys/kernel/mm/ksm/pages_unshared
What:		/sys/kernel/mm/ksm/pages_volatile
What:		/sys/kernel/mm/ksm/run
What:		/sys/kernel/mm/ksm/sleep_millisecs
Date:		September 2009
Contact:	Linux memory management mailing list <linux-mm@kvack.org>
Description:	Kernel Samepage Merging daemon sysfs interface

		full_scans: how many times all mergeable areas have been
		scanned.

		pages_shared: how many shared pages are being used.

		pages_sharing: how many more sites are sharing them i.e. how
		much saved.

		pages_to_scan: how many present pages to scan before ksmd goes
		to sleep.

		pages_unshared: how many pages unique but repeatedly checked
		for merging.

		pages_volatile: how many pages changing too fast to be placed
		in a tree.

		run: write 0 to disable ksm, read 0 while ksm is disabled.
			write 1 to run ksm, read 1 while ksm is running.
			write 2 to disable ksm and unmerge all its pages.

		sleep_millisecs: how many milliseconds ksm should sleep between
		scans.

		See Documentation/vm/ksm.txt for more information.

What:		/sys/kernel/mm/ksm/merge_across_nodes
Date:		January 2013
KernelVersion:	3.9
Contact:	Linux memory management mailing list <linux-mm@kvack.org>
Description:	Control merging pages across different NUMA nodes.

		When it is set to 0 only pages from the same node are merged,
		otherwise pages from all nodes can be merged together (default).
+36 −0
Original line number Diff line number Diff line
@@ -1640,6 +1640,42 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			that the amount of memory usable for all allocations
			is not too small.

	movablemem_map=acpi
			[KNL,X86,IA-64,PPC] This parameter is similar to
			memmap except it specifies the memory map of
			ZONE_MOVABLE.
			This option inform the kernel to use Hot Pluggable bit
			in flags from SRAT from ACPI BIOS to determine which
			memory devices could be hotplugged. The corresponding
			memory ranges will be set as ZONE_MOVABLE.
			NOTE: Whatever node the kernel resides in will always
			      be un-hotpluggable.

	movablemem_map=nn[KMG]@ss[KMG]
			[KNL,X86,IA-64,PPC] This parameter is similar to
			memmap except it specifies the memory map of
			ZONE_MOVABLE.
			If user specifies memory ranges, the info in SRAT will
			be ingored. And it works like the following:
			- If more ranges are all within one node, then from
			  lowest ss to the end of the node will be ZONE_MOVABLE.
			- If a range is within a node, then from ss to the end
			  of the node will be ZONE_MOVABLE.
			- If a range covers two or more nodes, then from ss to
			  the end of the 1st node will be ZONE_MOVABLE, and all
			  the rest nodes will only have ZONE_MOVABLE.
			If memmap is specified at the same time, the
			movablemem_map will be limited within the memmap
			areas. If kernelcore or movablecore is also specified,
			movablemem_map will have higher priority to be
			satisfied. So the administrator should be careful that
			the amount of movablemem_map areas are not too large.
			Otherwise kernel won't have enough memory to start.
			NOTE: We don't stop users specifying the node the
			      kernel resides in as hotpluggable so that this
			      option can be used as a workaround of firmware
                              bugs.

	MTD_Partition=	[MTD]
			Format: <name>,<region-number>,<size>,<offset>

+15 −0
Original line number Diff line number Diff line
@@ -58,6 +58,21 @@ sleep_millisecs - how many milliseconds ksmd should sleep before next scan
                   e.g. "echo 20 > /sys/kernel/mm/ksm/sleep_millisecs"
                   Default: 20 (chosen for demonstration purposes)

merge_across_nodes - specifies if pages from different numa nodes can be merged.
                   When set to 0, ksm merges only pages which physically
                   reside in the memory area of same NUMA node. That brings
                   lower latency to access of shared pages. Systems with more
                   nodes, at significant NUMA distances, are likely to benefit
                   from the lower latency of setting 0. Smaller systems, which
                   need to minimize memory usage, are likely to benefit from
                   the greater sharing of setting 1 (default). You may wish to
                   compare how your system performs under each setting, before
                   deciding on which to use. merge_across_nodes setting can be
                   changed only when there are no ksm shared pages in system:
                   set run 2 to unmerge pages first, then to 1 after changing
                   merge_across_nodes, to remerge according to the new setting.
                   Default: 1 (merging across nodes as in earlier releases)

run              - set 0 to stop ksmd from running but keep merged pages,
                   set 1 to run ksmd e.g. "echo 1 > /sys/kernel/mm/ksm/run",
                   set 2 to stop ksmd and unmerge all pages currently merged,
+3 −0
Original line number Diff line number Diff line
@@ -434,4 +434,7 @@ int __meminit vmemmap_populate(struct page *start_page,
	return 0;
}
#endif	/* CONFIG_ARM64_64K_PAGES */
void vmemmap_free(struct page *memmap, unsigned long nr_pages)
{
}
#endif	/* CONFIG_SPARSEMEM_VMEMMAP */
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ void show_mem(unsigned int filter)
	printk(KERN_INFO "%d pages swap cached\n", total_cached);
	printk(KERN_INFO "Total of %ld pages in page table cache\n",
	       quicklist_total_size());
	printk(KERN_INFO "%d free buffer pages\n", nr_free_buffer_pages());
	printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages());
}


Loading