diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 22:55:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 22:55:54 -0400 |
commit | 0e06f5c0deeef0332a5da2ecb8f1fcf3e024d958 (patch) | |
tree | e0f0af4aadf10c713c5cf1b65356844b3c9b3215 /Documentation/filesystems | |
parent | f7816ad0f878dacd5f0120476f9b836ccf8699ea (diff) | |
parent | 8f19b0c058d93a678a99dd6fec03af2e769943f2 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton:
- a few misc bits
- ocfs2
- most(?) of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (125 commits)
thp: fix comments of __pmd_trans_huge_lock()
cgroup: remove unnecessary 0 check from css_from_id()
cgroup: fix idr leak for the first cgroup root
mm: memcontrol: fix documentation for compound parameter
mm: memcontrol: remove BUG_ON in uncharge_list
mm: fix build warnings in <linux/compaction.h>
mm, thp: convert from optimistic swapin collapsing to conservative
mm, thp: fix comment inconsistency for swapin readahead functions
thp: update Documentation/{vm/transhuge,filesystems/proc}.txt
shmem: split huge pages beyond i_size under memory pressure
thp: introduce CONFIG_TRANSPARENT_HUGE_PAGECACHE
khugepaged: add support of collapse for tmpfs/shmem pages
shmem: make shmem_inode_info::lock irq-safe
khugepaged: move up_read(mmap_sem) out of khugepaged_alloc_page()
thp: extract khugepaged from mm/huge_memory.c
shmem, thp: respect MADV_{NO,}HUGEPAGE for file mappings
shmem: add huge pages support
shmem: get_unmapped_area align huge page
shmem: prepare huge= mount option and sysfs knob
mm, rmap: account shmem thp pages
...
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 14 | ||||
-rw-r--r-- | Documentation/filesystems/dax.txt | 6 | ||||
-rw-r--r-- | Documentation/filesystems/proc.txt | 9 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 11 |
4 files changed, 33 insertions, 7 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 75eea7ce3d7c..5a7386e38e2d 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -195,7 +195,9 @@ prototypes: | |||
195 | int (*releasepage) (struct page *, int); | 195 | int (*releasepage) (struct page *, int); |
196 | void (*freepage)(struct page *); | 196 | void (*freepage)(struct page *); |
197 | int (*direct_IO)(struct kiocb *, struct iov_iter *iter); | 197 | int (*direct_IO)(struct kiocb *, struct iov_iter *iter); |
198 | bool (*isolate_page) (struct page *, isolate_mode_t); | ||
198 | int (*migratepage)(struct address_space *, struct page *, struct page *); | 199 | int (*migratepage)(struct address_space *, struct page *, struct page *); |
200 | void (*putback_page) (struct page *); | ||
199 | int (*launder_page)(struct page *); | 201 | int (*launder_page)(struct page *); |
200 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); | 202 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); |
201 | int (*error_remove_page)(struct address_space *, struct page *); | 203 | int (*error_remove_page)(struct address_space *, struct page *); |
@@ -219,7 +221,9 @@ invalidatepage: yes | |||
219 | releasepage: yes | 221 | releasepage: yes |
220 | freepage: yes | 222 | freepage: yes |
221 | direct_IO: | 223 | direct_IO: |
224 | isolate_page: yes | ||
222 | migratepage: yes (both) | 225 | migratepage: yes (both) |
226 | putback_page: yes | ||
223 | launder_page: yes | 227 | launder_page: yes |
224 | is_partially_uptodate: yes | 228 | is_partially_uptodate: yes |
225 | error_remove_page: yes | 229 | error_remove_page: yes |
@@ -544,13 +548,13 @@ subsequent truncate), and then return with VM_FAULT_LOCKED, and the page | |||
544 | locked. The VM will unlock the page. | 548 | locked. The VM will unlock the page. |
545 | 549 | ||
546 | ->map_pages() is called when VM asks to map easy accessible pages. | 550 | ->map_pages() is called when VM asks to map easy accessible pages. |
547 | Filesystem should find and map pages associated with offsets from "pgoff" | 551 | Filesystem should find and map pages associated with offsets from "start_pgoff" |
548 | till "max_pgoff". ->map_pages() is called with page table locked and must | 552 | till "end_pgoff". ->map_pages() is called with page table locked and must |
549 | not block. If it's not possible to reach a page without blocking, | 553 | not block. If it's not possible to reach a page without blocking, |
550 | filesystem should skip it. Filesystem should use do_set_pte() to setup | 554 | filesystem should skip it. Filesystem should use do_set_pte() to setup |
551 | page table entry. Pointer to entry associated with offset "pgoff" is | 555 | page table entry. Pointer to entry associated with the page is passed in |
552 | passed in "pte" field in vm_fault structure. Pointers to entries for other | 556 | "pte" field in fault_env structure. Pointers to entries for other offsets |
553 | offsets should be calculated relative to "pte". | 557 | should be calculated relative to "pte". |
554 | 558 | ||
555 | ->page_mkwrite() is called when a previously read-only pte is | 559 | ->page_mkwrite() is called when a previously read-only pte is |
556 | about to become writeable. The filesystem again must ensure that there are | 560 | about to become writeable. The filesystem again must ensure that there are |
diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt index ce4587d257d2..0c16a22521a8 100644 --- a/Documentation/filesystems/dax.txt +++ b/Documentation/filesystems/dax.txt | |||
@@ -49,6 +49,7 @@ These block devices may be used for inspiration: | |||
49 | - axonram: Axon DDR2 device driver | 49 | - axonram: Axon DDR2 device driver |
50 | - brd: RAM backed block device driver | 50 | - brd: RAM backed block device driver |
51 | - dcssblk: s390 dcss block device driver | 51 | - dcssblk: s390 dcss block device driver |
52 | - pmem: NVDIMM persistent memory driver | ||
52 | 53 | ||
53 | 54 | ||
54 | Implementation Tips for Filesystem Writers | 55 | Implementation Tips for Filesystem Writers |
@@ -75,8 +76,9 @@ calls to get_block() (for example by a page-fault racing with a read() | |||
75 | or a write()) work correctly. | 76 | or a write()) work correctly. |
76 | 77 | ||
77 | These filesystems may be used for inspiration: | 78 | These filesystems may be used for inspiration: |
78 | - ext2: the second extended filesystem, see Documentation/filesystems/ext2.txt | 79 | - ext2: see Documentation/filesystems/ext2.txt |
79 | - ext4: the fourth extended filesystem, see Documentation/filesystems/ext4.txt | 80 | - ext4: see Documentation/filesystems/ext4.txt |
81 | - xfs: see Documentation/filesystems/xfs.txt | ||
80 | 82 | ||
81 | 83 | ||
82 | Handling Media Errors | 84 | Handling Media Errors |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 5b61eeae3f6e..68080ad6a75e 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -436,6 +436,7 @@ Private_Dirty: 0 kB | |||
436 | Referenced: 892 kB | 436 | Referenced: 892 kB |
437 | Anonymous: 0 kB | 437 | Anonymous: 0 kB |
438 | AnonHugePages: 0 kB | 438 | AnonHugePages: 0 kB |
439 | ShmemPmdMapped: 0 kB | ||
439 | Shared_Hugetlb: 0 kB | 440 | Shared_Hugetlb: 0 kB |
440 | Private_Hugetlb: 0 kB | 441 | Private_Hugetlb: 0 kB |
441 | Swap: 0 kB | 442 | Swap: 0 kB |
@@ -464,6 +465,8 @@ accessed. | |||
464 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE | 465 | a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE |
465 | and a page is modified, the file page is replaced by a private anonymous copy. | 466 | and a page is modified, the file page is replaced by a private anonymous copy. |
466 | "AnonHugePages" shows the ammount of memory backed by transparent hugepage. | 467 | "AnonHugePages" shows the ammount of memory backed by transparent hugepage. |
468 | "ShmemPmdMapped" shows the ammount of shared (shmem/tmpfs) memory backed by | ||
469 | huge pages. | ||
467 | "Shared_Hugetlb" and "Private_Hugetlb" show the ammounts of memory backed by | 470 | "Shared_Hugetlb" and "Private_Hugetlb" show the ammounts of memory backed by |
468 | hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical | 471 | hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical |
469 | reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field. | 472 | reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field. |
@@ -868,6 +871,9 @@ VmallocTotal: 112216 kB | |||
868 | VmallocUsed: 428 kB | 871 | VmallocUsed: 428 kB |
869 | VmallocChunk: 111088 kB | 872 | VmallocChunk: 111088 kB |
870 | AnonHugePages: 49152 kB | 873 | AnonHugePages: 49152 kB |
874 | ShmemHugePages: 0 kB | ||
875 | ShmemPmdMapped: 0 kB | ||
876 | |||
871 | 877 | ||
872 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved | 878 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved |
873 | bits and the kernel binary code) | 879 | bits and the kernel binary code) |
@@ -912,6 +918,9 @@ MemAvailable: An estimate of how much memory is available for starting new | |||
912 | AnonHugePages: Non-file backed huge pages mapped into userspace page tables | 918 | AnonHugePages: Non-file backed huge pages mapped into userspace page tables |
913 | Mapped: files which have been mmaped, such as libraries | 919 | Mapped: files which have been mmaped, such as libraries |
914 | Shmem: Total memory used by shared memory (shmem) and tmpfs | 920 | Shmem: Total memory used by shared memory (shmem) and tmpfs |
921 | ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated | ||
922 | with huge pages | ||
923 | ShmemPmdMapped: Shared memory mapped into userspace with huge pages | ||
915 | Slab: in-kernel data structures cache | 924 | Slab: in-kernel data structures cache |
916 | SReclaimable: Part of Slab, that might be reclaimed, such as caches | 925 | SReclaimable: Part of Slab, that might be reclaimed, such as caches |
917 | SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure | 926 | SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index c61a223ef3ff..900360cbcdae 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -592,9 +592,14 @@ struct address_space_operations { | |||
592 | int (*releasepage) (struct page *, int); | 592 | int (*releasepage) (struct page *, int); |
593 | void (*freepage)(struct page *); | 593 | void (*freepage)(struct page *); |
594 | ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter); | 594 | ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter); |
595 | /* isolate a page for migration */ | ||
596 | bool (*isolate_page) (struct page *, isolate_mode_t); | ||
595 | /* migrate the contents of a page to the specified target */ | 597 | /* migrate the contents of a page to the specified target */ |
596 | int (*migratepage) (struct page *, struct page *); | 598 | int (*migratepage) (struct page *, struct page *); |
599 | /* put migration-failed page back to right list */ | ||
600 | void (*putback_page) (struct page *); | ||
597 | int (*launder_page) (struct page *); | 601 | int (*launder_page) (struct page *); |
602 | |||
598 | int (*is_partially_uptodate) (struct page *, unsigned long, | 603 | int (*is_partially_uptodate) (struct page *, unsigned long, |
599 | unsigned long); | 604 | unsigned long); |
600 | void (*is_dirty_writeback) (struct page *, bool *, bool *); | 605 | void (*is_dirty_writeback) (struct page *, bool *, bool *); |
@@ -747,6 +752,10 @@ struct address_space_operations { | |||
747 | and transfer data directly between the storage and the | 752 | and transfer data directly between the storage and the |
748 | application's address space. | 753 | application's address space. |
749 | 754 | ||
755 | isolate_page: Called by the VM when isolating a movable non-lru page. | ||
756 | If page is successfully isolated, VM marks the page as PG_isolated | ||
757 | via __SetPageIsolated. | ||
758 | |||
750 | migrate_page: This is used to compact the physical memory usage. | 759 | migrate_page: This is used to compact the physical memory usage. |
751 | If the VM wants to relocate a page (maybe off a memory card | 760 | If the VM wants to relocate a page (maybe off a memory card |
752 | that is signalling imminent failure) it will pass a new page | 761 | that is signalling imminent failure) it will pass a new page |
@@ -754,6 +763,8 @@ struct address_space_operations { | |||
754 | transfer any private data across and update any references | 763 | transfer any private data across and update any references |
755 | that it has to the page. | 764 | that it has to the page. |
756 | 765 | ||
766 | putback_page: Called by the VM when isolated page's migration fails. | ||
767 | |||
757 | launder_page: Called before freeing a page - it writes back the dirty page. To | 768 | launder_page: Called before freeing a page - it writes back the dirty page. To |
758 | prevent redirtying the page, it is kept locked during the whole | 769 | prevent redirtying the page, it is kept locked during the whole |
759 | operation. | 770 | operation. |