aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 22:55:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 22:55:54 -0400
commit0e06f5c0deeef0332a5da2ecb8f1fcf3e024d958 (patch)
treee0f0af4aadf10c713c5cf1b65356844b3c9b3215 /Documentation/filesystems
parentf7816ad0f878dacd5f0120476f9b836ccf8699ea (diff)
parent8f19b0c058d93a678a99dd6fec03af2e769943f2 (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/Locking14
-rw-r--r--Documentation/filesystems/dax.txt6
-rw-r--r--Documentation/filesystems/proc.txt9
-rw-r--r--Documentation/filesystems/vfs.txt11
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
219releasepage: yes 221releasepage: yes
220freepage: yes 222freepage: yes
221direct_IO: 223direct_IO:
224isolate_page: yes
222migratepage: yes (both) 225migratepage: yes (both)
226putback_page: yes
223launder_page: yes 227launder_page: yes
224is_partially_uptodate: yes 228is_partially_uptodate: yes
225error_remove_page: yes 229error_remove_page: yes
@@ -544,13 +548,13 @@ subsequent truncate), and then return with VM_FAULT_LOCKED, and the page
544locked. The VM will unlock the page. 548locked. 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.
547Filesystem should find and map pages associated with offsets from "pgoff" 551Filesystem should find and map pages associated with offsets from "start_pgoff"
548till "max_pgoff". ->map_pages() is called with page table locked and must 552till "end_pgoff". ->map_pages() is called with page table locked and must
549not block. If it's not possible to reach a page without blocking, 553not block. If it's not possible to reach a page without blocking,
550filesystem should skip it. Filesystem should use do_set_pte() to setup 554filesystem should skip it. Filesystem should use do_set_pte() to setup
551page table entry. Pointer to entry associated with offset "pgoff" is 555page table entry. Pointer to entry associated with the page is passed in
552passed 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
553offsets should be calculated relative to "pte". 557should 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
556about to become writeable. The filesystem again must ensure that there are 560about 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
54Implementation Tips for Filesystem Writers 55Implementation Tips for Filesystem Writers
@@ -75,8 +76,9 @@ calls to get_block() (for example by a page-fault racing with a read()
75or a write()) work correctly. 76or a write()) work correctly.
76 77
77These filesystems may be used for inspiration: 78These 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
82Handling Media Errors 84Handling 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
436Referenced: 892 kB 436Referenced: 892 kB
437Anonymous: 0 kB 437Anonymous: 0 kB
438AnonHugePages: 0 kB 438AnonHugePages: 0 kB
439ShmemPmdMapped: 0 kB
439Shared_Hugetlb: 0 kB 440Shared_Hugetlb: 0 kB
440Private_Hugetlb: 0 kB 441Private_Hugetlb: 0 kB
441Swap: 0 kB 442Swap: 0 kB
@@ -464,6 +465,8 @@ accessed.
464a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE 465a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE
465and a page is modified, the file page is replaced by a private anonymous copy. 466and 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
469huge 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
468hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical 471hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical
469reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field. 472reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field.
@@ -868,6 +871,9 @@ VmallocTotal: 112216 kB
868VmallocUsed: 428 kB 871VmallocUsed: 428 kB
869VmallocChunk: 111088 kB 872VmallocChunk: 111088 kB
870AnonHugePages: 49152 kB 873AnonHugePages: 49152 kB
874ShmemHugePages: 0 kB
875ShmemPmdMapped: 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
912AnonHugePages: Non-file backed huge pages mapped into userspace page tables 918AnonHugePages: 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
921ShmemHugePages: Memory used by shared memory (shmem) and tmpfs allocated
922 with huge pages
923ShmemPmdMapped: Shared memory mapped into userspace with huge pages
915 Slab: in-kernel data structures cache 924 Slab: in-kernel data structures cache
916SReclaimable: Part of Slab, that might be reclaimed, such as caches 925SReclaimable: 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.