linux-stable/fs/ext4
Matthew Wilcox (Oracle) f9bff0e318 minmax: add in_range() macro
Patch series "New page table range API", v6.

This patchset changes the API used by the MM to set up page table entries.
The four APIs are:

    set_ptes(mm, addr, ptep, pte, nr)
    update_mmu_cache_range(vma, addr, ptep, nr)
    flush_dcache_folio(folio) 
    flush_icache_pages(vma, page, nr)

flush_dcache_folio() isn't technically new, but no architecture
implemented it, so I've done that for them.  The old APIs remain around
but are mostly implemented by calling the new interfaces.

The new APIs are based around setting up N page table entries at once. 
The N entries belong to the same PMD, the same folio and the same VMA, so
ptep++ is a legitimate operation, and locking is taken care of for you. 
Some architectures can do a better job of it than just a loop, but I have
hesitated to make too deep a change to architectures I don't understand
well.

One thing I have changed in every architecture is that PG_arch_1 is now a
per-folio bit instead of a per-page bit when used for dcache clean/dirty
tracking.  This was something that would have to happen eventually, and it
makes sense to do it now rather than iterate over every page involved in a
cache flush and figure out if it needs to happen.

The point of all this is better performance, and Fengwei Yin has measured
improvement on x86.  I suspect you'll see improvement on your architecture
too.  Try the new will-it-scale test mentioned here:
https://lore.kernel.org/linux-mm/20230206140639.538867-5-fengwei.yin@intel.com/
You'll need to run it on an XFS filesystem and have
CONFIG_TRANSPARENT_HUGEPAGE set.

This patchset is the basis for much of the anonymous large folio work
being done by Ryan, so it's received quite a lot of testing over the last
few months.


This patch (of 38):

Determine if a value lies within a range more efficiently (subtraction +
comparison vs two comparisons and an AND).  It also has useful (under some
circumstances) behaviour if the range exceeds the maximum value of the
type.  Convert all the conflicting definitions of in_range() within the
kernel; some can use the generic definition while others need their own
definition.

Link: https://lkml.kernel.org/r/20230802151406.3735276-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20230802151406.3735276-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-24 16:20:18 -07:00
..
.kunitconfig
Kconfig
Makefile ext4: move ext4 crypto code to its own file crypto.c 2022-05-21 22:24:24 -04:00
acl.c fs: port acl to mnt_idmap 2023-01-19 09:24:28 +01:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
balloc.c ext4: drop the call to ext4_error() from ext4_get_group_info() 2023-06-14 22:24:05 -04:00
bitmap.c ext4: remove useless conditional branch code 2023-04-19 23:39:08 -04:00
block_validity.c ext4: add ext4_sb_block_valid() refactored out of ext4_inode_block_valid() 2022-02-25 21:34:56 -05:00
crypto.c ext4: refactor and move ext4_ioctl_get_encryption_pwsalt() 2022-05-21 22:24:24 -04:00
dir.c ext4: fix spelling errors in comments 2022-05-11 15:19:06 -04:00
ext4.h minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
ext4_extents.h
ext4_jbd2.c ext4: split ext4_journal_start trace for debug 2022-12-01 10:46:54 -05:00
ext4_jbd2.h ext4: split ext4_journal_start trace for debug 2022-12-01 10:46:54 -05:00
extents.c ext4: make ext4_zeroout_es() return void 2023-06-26 19:35:12 -04:00
extents_status.c ext4: make ext4_es_insert_extent() return void 2023-06-26 19:35:12 -04:00
extents_status.h ext4: make ext4_es_insert_extent() return void 2023-06-26 19:35:12 -04:00
fast_commit.c ext4: use ext4_fc_tl_mem in fast-commit replay path 2023-02-09 10:43:23 -05:00
fast_commit.h ext4: add missing validation of fast-commit record lengths 2022-12-08 21:49:24 -05:00
file.c Various cleanups and bug fixes in ext4's extent status tree, 2023-06-29 13:18:36 -07:00
fsmap.c ext4: fix another off-by-one fsmap error on 1k block filesystems 2023-03-07 20:20:48 -05:00
fsmap.h
fsync.c \n 2023-06-29 13:39:51 -07:00
hash.c ext4: improve error handling from ext4_dirhash() 2023-05-13 18:05:05 -04:00
ialloc.c ext4: allow ext4_get_group_info() to fail 2023-05-13 18:02:46 -04:00
indirect.c ext4: only update i_reserved_data_blocks on successful block allocation 2023-06-26 19:34:56 -04:00
inline.c ext4: make ext4_es_remove_extent() return void 2023-06-26 19:35:12 -04:00
inode-test.c
inode.c mm: increase usage of folio_next_index() helper 2023-08-18 10:12:00 -07:00
ioctl.c Various cleanups and bug fixes in ext4's extent status tree, 2023-06-29 13:18:36 -07:00
mballoc.c ext4: fix rbtree traversal bug in ext4_mb_use_preallocated 2023-07-23 08:21:14 -04:00
mballoc.h ext4: Give symbolic names to mballoc criterias 2023-06-26 19:34:56 -04:00
migrate.c ext4: avoid deadlock in fs reclaim with page writeback 2023-05-13 18:05:04 -04:00
mmp.c ext4: fix lockdep warning when enabling MMP 2023-05-07 21:11:18 -04:00
move_extent.c mm: merge folio_has_private()/filemap_release_folio() call pairs 2023-08-18 10:12:12 -07:00
namei.c ext4: Remove ext4 locking of moved directory 2023-06-02 14:55:32 +02:00
orphan.c ext4: remove trailing newline from ext4_msg() message 2022-12-08 21:49:23 -05:00
page-io.c ext4: remove unneeded check of nr_to_submit 2023-04-19 23:38:33 -04:00
readpage.c ext4: Call fsverity_verify_folio() 2023-06-15 00:02:10 -04:00
resize.c ext4: remove unused group parameter in ext4_block_bitmap_csum_set 2023-03-23 23:00:08 -04:00
super.c Various cleanups and bug fixes in ext4's extent status tree, 2023-06-29 13:18:36 -07:00
symlink.c fs: port ->getattr() to pass mnt_idmap 2023-01-19 09:24:25 +01:00
sysfs.c ext4: Give symbolic names to mballoc criterias 2023-06-26 19:34:56 -04:00
truncate.h
verity.c - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
xattr.c ext4: correct inline offset when handling xattrs in inode body 2023-07-23 08:21:05 -04:00
xattr.h ext4: remove EA inode entry from mbcache on inode eviction 2022-08-02 23:56:25 -04:00
xattr_hurd.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00