diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-04 18:32:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-05-05 11:27:19 -0700 |
commit | 46be67b424efab933562a29ea8f1df0c20aa9959 (patch) | |
tree | 713adb555aa4835131938869e7fcc77d206cd132 /mm/filemap.c | |
parent | 7716506adac4664793a9d6d3dfa31ffddfa98714 (diff) | |
download | linux-46be67b424efab933562a29ea8f1df0c20aa9959.tar.bz2 |
mm: stop accounting shadow entries
We no longer need to keep track of how many shadow entries are present in
a mapping. This saves a few writes to the inode and memory barriers.
Link: https://lkml.kernel.org/r/20201026151849.24232-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Vishal Verma <vishal.l.verma@intel.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 5be57ba01d33..d08ff1504e64 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -142,17 +142,6 @@ static void page_cache_delete(struct address_space *mapping, page->mapping = NULL; /* Leave page->index set: truncation lookup relies upon it */ - - if (shadow) { - mapping->nrexceptional += nr; - /* - * Make sure the nrexceptional update is committed before - * the nrpages update so that final truncate racing - * with reclaim does not see both counters 0 at the - * same time and miss a shadow entry. - */ - smp_wmb(); - } mapping->nrpages -= nr; } @@ -925,8 +914,6 @@ noinline int __add_to_page_cache_locked(struct page *page, if (xas_error(&xas)) goto unlock; - if (old) - mapping->nrexceptional--; mapping->nrpages++; /* hugetlb pages do not participate in page cache accounting */ |