summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-05-05 03:32:45 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-05 20:27:19 +0200
commit7716506adac4664793a9d6d3dfa31ffddfa98714 (patch)
treeec099a414e8120e3e68e2e6022eed8fa6fff5a3b /usr
parentmm/memory-failure: unnecessary amount of unmapping (diff)
downloadlinux-7716506adac4664793a9d6d3dfa31ffddfa98714.tar.xz
linux-7716506adac4664793a9d6d3dfa31ffddfa98714.zip
mm: introduce and use mapping_empty()
Patch series "Remove nrexceptional tracking", v2. We actually use nrexceptional for very little these days. It's a minor pain to keep in sync with nrpages, but the pain becomes much bigger with the THP patches because we don't know how many indices a shadow entry occupies. It's easier to just remove it than keep it accurate. Also, we save 8 bytes per inode which is nothing to sneeze at; on my laptop, it would improve shmem_inode_cache from 22 to 23 objects per 16kB, and inode_cache from 26 to 27 objects. Combined, that saves a megabyte of memory from a combined usage of 25MB for both caches. Unfortunately, ext4 doesn't cross a magic boundary, so it doesn't save any memory for ext4. This patch (of 4): Instead of checking the two counters (nrpages and nrexceptional), we can just check whether i_pages is empty. Link: https://lkml.kernel.org/r/20201026151849.24232-1-willy@infradead.org Link: https://lkml.kernel.org/r/20201026151849.24232-2-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 'usr')
0 files changed, 0 insertions, 0 deletions