diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:17 -0400 |
commit | 1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (patch) | |
tree | c03e7a25ef13eea62f1547914a76e5c68f3f4c28 /Documentation | |
parent | 80dcc31fbe55932ac9204daee5f2ebc0c49b6da3 (diff) | |
parent | e4b0db72be2487bae0e3251c22f82c104f7c1cfd (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.txt | 21 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 10 | ||||
-rw-r--r-- | Documentation/sysctl/kernel.txt | 62 | ||||
-rw-r--r-- | Documentation/vm/cleancache.txt | 4 | ||||
-rw-r--r-- | Documentation/vm/unevictable-lru.txt | 26 |
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 @@ | |||
1 | The CMA debugfs interface is useful to retrieve basic information out of the | ||
2 | different CMA areas and to test allocation/release in each of the areas. | ||
3 | |||
4 | Each CMA zone represents a directory under <debugfs>/cma/, indexed by the | ||
5 | kernel's CMA index. So the first CMA zone would be: | ||
6 | |||
7 | <debugfs>/cma/cma-0 | ||
8 | |||
9 | The 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 | |||
19 | would 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 | ||
418 | nmi_watchdog: | 420 | nmi_watchdog: |
419 | 421 | ||
420 | Enables/Disables the NMI watchdog on x86 systems. When the value is | 422 | This parameter can be used to control the NMI watchdog |
421 | non-zero the NMI watchdog is enabled and will continuously test all | 423 | (i.e. the hard lockup detector) on x86 systems. |
422 | online cpus to determine whether or not they are still functioning | ||
423 | properly. Currently, passing "nmi_watchdog=" parameter at boot time is | ||
424 | required for this function to work. | ||
425 | 424 | ||
426 | If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel | 425 | 0 - disable the hard lockup detector |
427 | parameter), the NMI watchdog shares registers with oprofile. By | 426 | 1 - enable the hard lockup detector |
428 | disabling the NMI watchdog, oprofile may have more registers to | 427 | |
429 | utilize. | 428 | The hard lockup detector monitors each CPU for its ability to respond to |
429 | timer interrupts. The mechanism utilizes CPU performance counter registers | ||
430 | that are programmed to generate Non-Maskable Interrupts (NMIs) periodically | ||
431 | while a CPU is busy. Hence, the alternative name 'NMI watchdog'. | ||
432 | |||
433 | The NMI watchdog is disabled by default if the kernel is running as a guest | ||
434 | in a KVM virtual machine. This default can be overridden by adding | ||
435 | |||
436 | nmi_watchdog=1 | ||
437 | |||
438 | to 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 | ||
828 | soft_watchdog | ||
829 | |||
830 | This 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 | |||
835 | The soft lockup detector monitors CPUs for threads that are hogging the CPUs | ||
836 | without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads | ||
837 | from running. The mechanism depends on the CPUs ability to respond to timer | ||
838 | interrupts which are needed for the 'watchdog/N' threads to be woken up by | ||
839 | the watchdog timer function, otherwise the NMI watchdog - if enabled - can | ||
840 | detect a hard lockup condition. | ||
841 | |||
842 | ============================================================== | ||
843 | |||
819 | tainted: | 844 | tainted: |
820 | 845 | ||
821 | Non-zero if the kernel has been tainted. Numeric values, which | 846 | Non-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 | ||
886 | watchdog: | ||
887 | |||
888 | This 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 | |||
894 | The soft lockup detector and the NMI watchdog can also be disabled or | ||
895 | enabled individually, using the soft_watchdog and nmi_watchdog parameters. | ||
896 | If the watchdog parameter is read, for example by executing | ||
897 | |||
898 | cat /proc/sys/kernel/watchdog | ||
899 | |||
900 | the output of this command (0 or 1) shows the logical OR of soft_watchdog | ||
901 | and nmi_watchdog. | ||
902 | |||
903 | ============================================================== | ||
904 | |||
861 | watchdog_thresh: | 905 | watchdog_thresh: |
862 | 906 | ||
863 | This value can be used to control the frequency of hrtimer and NMI | 907 | This 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 | |||
28 | A cleancache "backend" that provides transcendent memory registers itself | 28 | A cleancache "backend" that provides transcendent memory registers itself |
29 | to the kernel's cleancache "frontend" by calling cleancache_register_ops, | 29 | to the kernel's cleancache "frontend" by calling cleancache_register_ops, |
30 | passing a pointer to a cleancache_ops structure with funcs set appropriately. | 30 | passing a pointer to a cleancache_ops structure with funcs set appropriately. |
31 | Note that cleancache_register_ops returns the previous settings so that | 31 | The functions provided must conform to certain semantics as follows: |
32 | chaining can be performed if desired. The functions provided must conform to | ||
33 | certain semantics as follows: | ||
34 | 32 | ||
35 | Most important, cleancache is "ephemeral". Pages which are copied into | 33 | Most important, cleancache is "ephemeral". Pages which are copied into |
36 | cleancache have an indefinite lifetime which is completely unknowable | 34 | cleancache 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" | |||
317 | below, mlock_fixup() will attempt to merge the VMA with its neighbors or split | 317 | below, mlock_fixup() will attempt to merge the VMA with its neighbors or split |
318 | off a subset of the VMA if the range does not cover the entire VMA. Once the | 318 | off a subset of the VMA if the range does not cover the entire VMA. Once the |
319 | VMA has been merged or split or neither, mlock_fixup() will call | 319 | VMA 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 | 320 | populate_vma_page_range() to fault in the pages via get_user_pages() and to |
321 | mark the pages as mlocked via mlock_vma_page(). | 321 | mark the pages as mlocked via mlock_vma_page(). |
322 | 322 | ||
323 | Note that the VMA being mlocked might be mapped with PROT_NONE. In this case, | 323 | Note 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 | ||
328 | Also note that a page returned by get_user_pages() could be truncated or | 328 | Also note that a page returned by get_user_pages() could be truncated or |
329 | migrated out from under us, while we're trying to mlock it. To detect this, | 329 | migrated 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. | 330 | populate_vma_page_range() checks page_mapping() after acquiring the page lock. |
331 | If the page is still associated with its mapping, we'll go ahead and call | 331 | If the page is still associated with its mapping, we'll go ahead and call |
332 | mlock_vma_page(). If the mapping is gone, we just unlock the page and move on. | 332 | mlock_vma_page(). If the mapping is gone, we just unlock the page and move on. |
333 | In the worst case, this will result in a page mapped in a VM_LOCKED VMA | 333 | In the worst case, this will result in a page mapped in a VM_LOCKED VMA |
@@ -392,7 +392,7 @@ ignored for munlock. | |||
392 | 392 | ||
393 | If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the | 393 | If the VMA is VM_LOCKED, mlock_fixup() again attempts to merge or split off the |
394 | specified range. The range is then munlocked via the function | 394 | specified range. The range is then munlocked via the function |
395 | __mlock_vma_pages_range() - the same function used to mlock a VMA range - | 395 | populate_vma_page_range() - the same function used to mlock a VMA range - |
396 | passing a flag to indicate that munlock() is being performed. | 396 | passing a flag to indicate that munlock() is being performed. |
397 | 397 | ||
398 | Because the VMA access protections could have been changed to PROT_NONE after | 398 | Because 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 | |||
402 | fetching the pages - all of which should be resident as a result of previous | 402 | fetching the pages - all of which should be resident as a result of previous |
403 | mlocking. | 403 | mlocking. |
404 | 404 | ||
405 | For munlock(), __mlock_vma_pages_range() unlocks individual pages by calling | 405 | For munlock(), populate_vma_page_range() unlocks individual pages by calling |
406 | munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked | 406 | munlock_vma_page(). munlock_vma_page() unconditionally clears the PG_mlocked |
407 | flag using TestClearPageMlocked(). As with mlock_vma_page(), | 407 | flag using TestClearPageMlocked(). As with mlock_vma_page(), |
408 | munlock_vma_page() use the Test*PageMlocked() function to handle the case where | 408 | munlock_vma_page() use the Test*PageMlocked() function to handle the case where |
@@ -463,21 +463,11 @@ populate the page table. | |||
463 | 463 | ||
464 | To mlock a range of memory under the unevictable/mlock infrastructure, the | 464 | To mlock a range of memory under the unevictable/mlock infrastructure, the |
465 | mmap() handler and task address space expansion functions call | 465 | mmap() handler and task address space expansion functions call |
466 | mlock_vma_pages_range() specifying the vma and the address range to mlock. | 466 | populate_vma_page_range() specifying the vma and the address range to mlock. |
467 | mlock_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 | 468 | The callers of populate_vma_page_range() will have already added the memory range |
469 | already been set by the caller, in filtered VMAs. Thus these VMA's need not be | ||
470 | visited for munlock when the region is unmapped. | ||
471 | |||
472 | For "normal" VMAs, mlock_vma_pages_range() calls __mlock_vma_pages_range() to | ||
473 | fault/allocate the pages and mlock them. Again, like mlock_fixup(), | ||
474 | mlock_vma_pages_range() downgrades the mmap semaphore to read mode before | ||
475 | attempting to fault/allocate and mlock the pages and "upgrades" the semaphore | ||
476 | back to write mode before returning. | ||
477 | |||
478 | The callers of mlock_vma_pages_range() will have already added the memory range | ||
479 | to be mlocked to the task's "locked_vm". To account for filtered VMAs, | 469 | to be mlocked to the task's "locked_vm". To account for filtered VMAs, |
480 | mlock_vma_pages_range() returns the number of pages NOT mlocked. All of the | 470 | populate_vma_page_range() returns the number of pages NOT mlocked. All of the |
481 | callers then subtract a non-negative return value from the task's locked_vm. A | 471 | callers then subtract a non-negative return value from the task's locked_vm. A |
482 | negative return value represent an error - for example, from get_user_pages() | 472 | negative return value represent an error - for example, from get_user_pages() |
483 | attempting to fault in a VMA with PROT_NONE access. In this case, we leave the | 473 | attempting to fault in a VMA with PROT_NONE access. In this case, we leave the |