summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
commit1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (patch)
treec03e7a25ef13eea62f1547914a76e5c68f3f4c28 /Documentation
parent80dcc31fbe55932ac9204daee5f2ebc0c49b6da3 (diff)
parente4b0db72be2487bae0e3251c22f82c104f7c1cfd (diff)
Merge branch 'akpm' (patches from Andrew)
Merge first patchbomb from Andrew Morton: - arch/sh updates - ocfs2 updates - kernel/watchdog feature - about half of mm/ * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (122 commits) Documentation: update arch list in the 'memtest' entry Kconfig: memtest: update number of test patterns up to 17 arm: add support for memtest arm64: add support for memtest memtest: use phys_addr_t for physical addresses mm: move memtest under mm mm, hugetlb: abort __get_user_pages if current has been oom killed mm, mempool: do not allow atomic resizing memcg: print cgroup information when system panics due to panic_on_oom mm: numa: remove migrate_ratelimited mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE mm: split ET_DYN ASLR from mmap ASLR s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE mm: expose arch_mmap_rnd when available s390: standardize mmap_rnd() usage powerpc: standardize mmap_rnd() usage mips: extract logic for mmap_rnd() arm64: standardize mmap_rnd() usage x86: standardize mmap_rnd() usage arm: factor out mmap ASLR into mmap_rnd ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/cma/debugfs.txt21
-rw-r--r--Documentation/kernel-parameters.txt10
-rw-r--r--Documentation/sysctl/kernel.txt62
-rw-r--r--Documentation/vm/cleancache.txt4
-rw-r--r--Documentation/vm/unevictable-lru.txt26
5 files changed, 90 insertions, 33 deletions
diff --git a/Documentation/cma/debugfs.txt b/Documentation/cma/debugfs.txt
new file mode 100644
index 000000000000..6cef20a8cedc
--- /dev/null
+++ b/Documentation/cma/debugfs.txt
@@ -0,0 +1,21 @@
1The CMA debugfs interface is useful to retrieve basic information out of the
2different CMA areas and to test allocation/release in each of the areas.
3
4Each CMA zone represents a directory under <debugfs>/cma/, indexed by the
5kernel's CMA index. So the first CMA zone would be:
6
7 <debugfs>/cma/cma-0
8
9The structure of the files created under that directory is as follows:
10
11 - [RO] base_pfn: The base PFN (Page Frame Number) of the zone.
12 - [RO] count: Amount of memory in the CMA area.
13 - [RO] order_per_bit: Order of pages represented by one bit.
14 - [RO] bitmap: The bitmap of page states in the zone.
15 - [WO] alloc: Allocate N pages from that CMA area. For example:
16
17 echo 5 > <debugfs>/cma/cma-2/alloc
18
19would try to allocate 5 pages from the cma-2 area.
20
21 - [WO] free: Free N pages from that CMA area, similar to the above.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 05c36118f8d7..327556349757 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1989,7 +1989,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1989 seconds. Use this parameter to check at some 1989 seconds. Use this parameter to check at some
1990 other rate. 0 disables periodic checking. 1990 other rate. 0 disables periodic checking.
1991 1991
1992 memtest= [KNL,X86] Enable memtest 1992 memtest= [KNL,X86,ARM] Enable memtest
1993 Format: <integer> 1993 Format: <integer>
1994 default : 0 <disable> 1994 default : 0 <disable>
1995 Specifies the number of memtest passes to be 1995 Specifies the number of memtest passes to be
@@ -2236,8 +2236,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2236 2236
2237 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels 2237 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels
2238 Format: [panic,][nopanic,][num] 2238 Format: [panic,][nopanic,][num]
2239 Valid num: 0 2239 Valid num: 0 or 1
2240 0 - turn nmi_watchdog off 2240 0 - turn nmi_watchdog off
2241 1 - turn nmi_watchdog on
2241 When panic is specified, panic when an NMI watchdog 2242 When panic is specified, panic when an NMI watchdog
2242 timeout occurs (or 'nopanic' to override the opposite 2243 timeout occurs (or 'nopanic' to override the opposite
2243 default). 2244 default).
@@ -2322,6 +2323,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2322 register save and restore. The kernel will only save 2323 register save and restore. The kernel will only save
2323 legacy floating-point registers on task switch. 2324 legacy floating-point registers on task switch.
2324 2325
2326 nohugeiomap [KNL,x86] Disable kernel huge I/O mappings.
2327
2325 noxsave [BUGS=X86] Disables x86 extended register state save 2328 noxsave [BUGS=X86] Disables x86 extended register state save
2326 and restore using xsave. The kernel will fallback to 2329 and restore using xsave. The kernel will fallback to
2327 enabling legacy floating-point and sse state. 2330 enabling legacy floating-point and sse state.
@@ -2464,7 +2467,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2464 2467
2465 nousb [USB] Disable the USB subsystem 2468 nousb [USB] Disable the USB subsystem
2466 2469
2467 nowatchdog [KNL] Disable the lockup detector (NMI watchdog). 2470 nowatchdog [KNL] Disable both lockup detectors, i.e.
2471 soft-lockup and NMI watchdog (hard-lockup).
2468 2472
2469 nowb [ARM] 2473 nowb [ARM]
2470 2474
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 83ab25660fc9..99d7eb3a1416 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -77,12 +77,14 @@ show up in /proc/sys/kernel:
77- shmmax [ sysv ipc ] 77- shmmax [ sysv ipc ]
78- shmmni 78- shmmni
79- softlockup_all_cpu_backtrace 79- softlockup_all_cpu_backtrace
80- soft_watchdog
80- stop-a [ SPARC only ] 81- stop-a [ SPARC only ]
81- sysrq ==> Documentation/sysrq.txt 82- sysrq ==> Documentation/sysrq.txt
82- sysctl_writes_strict 83- sysctl_writes_strict
83- tainted 84- tainted
84- threads-max 85- threads-max
85- unknown_nmi_panic 86- unknown_nmi_panic
87- watchdog
86- watchdog_thresh 88- watchdog_thresh
87- version 89- version
88 90
@@ -417,16 +419,23 @@ successful IPC object allocation.
417 419
418nmi_watchdog: 420nmi_watchdog:
419 421
420Enables/Disables the NMI watchdog on x86 systems. When the value is 422This parameter can be used to control the NMI watchdog
421non-zero the NMI watchdog is enabled and will continuously test all 423(i.e. the hard lockup detector) on x86 systems.
422online cpus to determine whether or not they are still functioning
423properly. Currently, passing "nmi_watchdog=" parameter at boot time is
424required for this function to work.
425 424
426If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel 425 0 - disable the hard lockup detector
427parameter), the NMI watchdog shares registers with oprofile. By 426 1 - enable the hard lockup detector
428disabling the NMI watchdog, oprofile may have more registers to 427
429utilize. 428The hard lockup detector monitors each CPU for its ability to respond to
429timer interrupts. The mechanism utilizes CPU performance counter registers
430that are programmed to generate Non-Maskable Interrupts (NMIs) periodically
431while a CPU is busy. Hence, the alternative name 'NMI watchdog'.
432
433The NMI watchdog is disabled by default if the kernel is running as a guest
434in a KVM virtual machine. This default can be overridden by adding
435
436 nmi_watchdog=1
437
438to the guest kernel command line (see Documentation/kernel-parameters.txt).
430 439
431============================================================== 440==============================================================
432 441
@@ -816,6 +825,22 @@ NMI.
816 825
817============================================================== 826==============================================================
818 827
828soft_watchdog
829
830This parameter can be used to control the soft lockup detector.
831
832 0 - disable the soft lockup detector
833 1 - enable the soft lockup detector
834
835The soft lockup detector monitors CPUs for threads that are hogging the CPUs
836without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads
837from running. The mechanism depends on the CPUs ability to respond to timer
838interrupts which are needed for the 'watchdog/N' threads to be woken up by
839the watchdog timer function, otherwise the NMI watchdog - if enabled - can
840detect a hard lockup condition.
841
842==============================================================
843
819tainted: 844tainted:
820 845
821Non-zero if the kernel has been tainted. Numeric values, which 846Non-zero if the kernel has been tainted. Numeric values, which
@@ -858,6 +883,25 @@ example. If a system hangs up, try pressing the NMI switch.
858 883
859============================================================== 884==============================================================
860 885
886watchdog:
887
888This parameter can be used to disable or enable the soft lockup detector
889_and_ the NMI watchdog (i.e. the hard lockup detector) at the same time.
890
891 0 - disable both lockup detectors
892 1 - enable both lockup detectors
893
894The soft lockup detector and the NMI watchdog can also be disabled or
895enabled individually, using the soft_watchdog and nmi_watchdog parameters.
896If the watchdog parameter is read, for example by executing
897
898 cat /proc/sys/kernel/watchdog
899
900the output of this command (0 or 1) shows the logical OR of soft_watchdog
901and nmi_watchdog.
902
903==============================================================
904
861watchdog_thresh: 905watchdog_thresh:
862 906
863This value can be used to control the frequency of hrtimer and NMI 907This value can be used to control the frequency of hrtimer and NMI
diff --git a/Documentation/vm/cleancache.txt b/Documentation/vm/cleancache.txt
index 01d76282444e..e4b49df7a048 100644
--- a/Documentation/vm/cleancache.txt
+++ b/Documentation/vm/cleancache.txt
@@ -28,9 +28,7 @@ IMPLEMENTATION OVERVIEW
28A cleancache "backend" that provides transcendent memory registers itself 28A cleancache "backend" that provides transcendent memory registers itself
29to the kernel's cleancache "frontend" by calling cleancache_register_ops, 29to the kernel's cleancache "frontend" by calling cleancache_register_ops,
30passing a pointer to a cleancache_ops structure with funcs set appropriately. 30passing a pointer to a cleancache_ops structure with funcs set appropriately.
31Note that cleancache_register_ops returns the previous settings so that 31The functions provided must conform to certain semantics as follows:
32chaining can be performed if desired. The functions provided must conform to
33certain semantics as follows:
34 32
35Most important, cleancache is "ephemeral". Pages which are copied into 33Most important, cleancache is "ephemeral". Pages which are copied into
36cleancache have an indefinite lifetime which is completely unknowable 34cleancache have an indefinite lifetime which is completely unknowable
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 744f82f86c58..86cb4624fc5a 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -317,7 +317,7 @@ If the VMA passes some filtering as described in "Filtering Special Vmas"
317below, mlock_fixup() will attempt to merge the VMA with its neighbors or split 317below, mlock_fixup() will attempt to merge the VMA with its neighbors or split
318off a subset of the VMA if the range does not cover the entire VMA. Once the 318off a subset of the VMA if the range does not cover the entire VMA. Once the
319VMA has been merged or split or neither, mlock_fixup() will call 319VMA has been merged or split or neither, mlock_fixup() will call
320__mlock_vma_pages_range() to fault in the pages via get_user_pages() and to 320populate_vma_page_range() to fault in the pages via get_user_pages() and to
321mark the pages as mlocked via mlock_vma_page(). 321mark the pages as mlocked via mlock_vma_page().
322 322
323Note that the VMA being mlocked might be mapped with PROT_NONE. In this case, 323Note that the VMA being mlocked might be mapped with PROT_NONE. In this case,
@@ -327,7 +327,7 @@ fault path or in vmscan.
327 327
328Also note that a page returned by get_user_pages() could be truncated or 328Also note that a page returned by get_user_pages() could be truncated or
329migrated out from under us, while we're trying to mlock it. To detect this, 329migrated out from under us, while we're trying to mlock it. To detect this,
330__mlock_vma_pages_range() checks page_mapping() after acquiring the page lock. 330populate_vma_page_range() checks page_mapping() after acquiring the page lock.
331If the page is still associated with its mapping, we'll go ahead and call 331If the page is still associated with its mapping, we'll go ahead and call
332mlock_vma_page(). If the mapping is gone, we just unlock the page and move on. 332mlock_vma_page(). If the mapping is gone, we just unlock the page and move on.
333In the worst case, this will result in a page mapped in a VM_LOCKED VMA 333In the worst case, this will result in a page mapped in a VM_LOCKED VMA
@@ -392,7 +392,7 @@ ignored for munlock.
392 392
393If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the 393If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the
394specified range. The range is then munlocked via the function 394specified range. The range is then munlocked via the function
395__mlock_vma_pages_range() - the same function used to mlock a VMA range - 395populate_vma_page_range() - the same function used to mlock a VMA range -
396passing a flag to indicate that munlock() is being performed. 396passing a flag to indicate that munlock() is being performed.
397 397
398Because the VMA access protections could have been changed to PROT_NONE after 398Because the VMA access protections could have been changed to PROT_NONE after
@@ -402,7 +402,7 @@ get_user_pages() was enhanced to accept a flag to ignore the permissions when
402fetching the pages - all of which should be resident as a result of previous 402fetching the pages - all of which should be resident as a result of previous
403mlocking. 403mlocking.
404 404
405For munlock(), __mlock_vma_pages_range() unlocks individual pages by calling 405For munlock(), populate_vma_page_range() unlocks individual pages by calling
406munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked 406munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked
407flag using TestClearPageMlocked(). As with mlock_vma_page(), 407flag using TestClearPageMlocked(). As with mlock_vma_page(),
408munlock_vma_page() use the Test*PageMlocked() function to handle the case where 408munlock_vma_page() use the Test*PageMlocked() function to handle the case where
@@ -463,21 +463,11 @@ populate the page table.
463 463
464To mlock a range of memory under the unevictable/mlock infrastructure, the 464To mlock a range of memory under the unevictable/mlock infrastructure, the
465mmap() handler and task address space expansion functions call 465mmap() handler and task address space expansion functions call
466mlock_vma_pages_range() specifying the vma and the address range to mlock. 466populate_vma_page_range() specifying the vma and the address range to mlock.
467mlock_vma_pages_range() filters VMAs like mlock_fixup(), as described above in 467
468"Filtering Special VMAs". It will clear the VM_LOCKED flag, which will have 468The callers of populate_vma_page_range() will have already added the memory range
469already been set by the caller, in filtered VMAs. Thus these VMA's need not be
470visited for munlock when the region is unmapped.
471
472For "normal" VMAs, mlock_vma_pages_range() calls __mlock_vma_pages_range() to
473fault/allocate the pages and mlock them. Again, like mlock_fixup(),
474mlock_vma_pages_range() downgrades the mmap semaphore to read mode before
475attempting to fault/allocate and mlock the pages and "upgrades" the semaphore
476back to write mode before returning.
477
478The callers of mlock_vma_pages_range() will have already added the memory range
479to be mlocked to the task's "locked_vm". To account for filtered VMAs, 469to be mlocked to the task's "locked_vm". To account for filtered VMAs,
480mlock_vma_pages_range() returns the number of pages NOT mlocked. All of the 470populate_vma_page_range() returns the number of pages NOT mlocked. All of the
481callers then subtract a non-negative return value from the task's locked_vm. A 471callers then subtract a non-negative return value from the task's locked_vm. A
482negative return value represent an error - for example, from get_user_pages() 472negative return value represent an error - for example, from get_user_pages()
483attempting to fault in a VMA with PROT_NONE access. In this case, we leave the 473attempting to fault in a VMA with PROT_NONE access. In this case, we leave the