[TCWG CI] Regression caused by linux: Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: commit 98931dd95fd489fcbfa97da563505a6f071d7c77 Merge: df202b452fe6 f403f22f8ccb Author: Linus Torvalds torvalds@linux-foundation.org
Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Results regressed to # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 7309 # First few build errors in logs: # 00:00:59 arch/arm64/mm/hugetlbpage.c:515:16: error: implicit declaration of function ‘get_clear_flush’; did you mean ‘ptep_clear_flush’? [-Werror=implicit-function-declaration] # 00:00:59 arch/arm64/mm/hugetlbpage.c:515:16: error: incompatible types when returning type ‘int’ but ‘pte_t’ was expected # 00:00:59 arch/arm64/mm/hugetlbpage.c:516:1: error: control reaches end of non-void function [-Werror=return-type] # 00:00:59 make[2]: *** [arch/arm64/mm/hugetlbpage.o] Error 1 # 00:01:01 make[1]: *** [arch/arm64/mm] Error 2 # 00:02:41 make: *** [arch/arm64] Error 2
from # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1: -5 # build_abe qemu: -2 # linux_n_obj: 8131 # linux build successful: all # linux boot successful: boot
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
This commit has regressed these CI configurations: - tcwg_kernel/gnu-release-aarch64-mainline-defconfig
First_bad build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... Last_good build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... Baseline build: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... Even more details: https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin...
Reproduce builds: <cut> mkdir investigate-linux-98931dd95fd489fcbfa97da563505a6f071d7c77 cd investigate-linux-98931dd95fd489fcbfa97da563505a6f071d7c77
# Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests and test.sh script mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_kernel-gnu-bisect-gnu-release-aarch64-mainlin... --fail chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_kernel-build.sh @@ artifacts/manifests/build-baseline.sh
# Save baseline build state (which is then restored in artifacts/test.sh) mkdir -p ./bisect rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /linux/ ./ ./bisect/baseline/
cd linux
# Reproduce first_bad build git checkout --detach 98931dd95fd489fcbfa97da563505a6f071d7c77 ../artifacts/test.sh
# Reproduce last_good build git checkout --detach df202b452fe6c6d6f1351bad485e2367ef1e644e ../artifacts/test.sh
cd .. </cut>
Full commit (up to 1000 lines): <cut> commit 98931dd95fd489fcbfa97da563505a6f071d7c77 Merge: df202b452fe6 f403f22f8ccb Author: Linus Torvalds torvalds@linux-foundation.org Date: Thu May 26 12:32:41 2022 -0700
Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM updates from Andrew Morton: "Almost all of MM here. A few things are still getting finished off, reviewed, etc.
- Yang Shi has improved the behaviour of khugepaged collapsing of readonly file-backed transparent hugepages.
- Johannes Weiner has arranged for zswap memory use to be tracked and managed on a per-cgroup basis.
- Munchun Song adds a /proc knob ("hugetlb_optimize_vmemmap") for runtime enablement of the recent huge page vmemmap optimization feature.
- Baolin Wang contributes a series to fix some issues around hugetlb pagetable invalidation.
- Zhenwei Pi has fixed some interactions between hwpoisoned pages and virtualization.
- Tong Tiangen has enabled the use of the presently x86-only page_table_check debugging feature on arm64 and riscv.
- David Vernet has done some fixup work on the memcg selftests.
- Peter Xu has taught userfaultfd to handle write protection faults against shmem- and hugetlbfs-backed files.
- More DAMON development from SeongJae Park - adding online tuning of the feature and support for monitoring of fixed virtual address ranges. Also easier discovery of which monitoring operations are available.
- Nadav Amit has done some optimization of TLB flushing during mprotect().
- Neil Brown continues to labor away at improving our swap-over-NFS support.
- David Hildenbrand has some fixes to anon page COWing versus get_user_pages().
- Peng Liu fixed some errors in the core hugetlb code.
- Joao Martins has reduced the amount of memory consumed by device-dax's compound devmaps.
- Some cleanups of the arch-specific pagemap code from Anshuman Khandual.
- Muchun Song has found and fixed some errors in the TLB flushing of transparent hugepages.
- Roman Gushchin has done more work on the memcg selftests.
... and, of course, many smaller fixes and cleanups. Notably, the customary million cleanup serieses from Miaohe Lin"
* tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (381 commits) mm: kfence: use PAGE_ALIGNED helper selftests: vm: add the "settings" file with timeout variable selftests: vm: add "test_hmm.sh" to TEST_FILES selftests: vm: check numa_available() before operating "merge_across_nodes" in ksm_tests selftests: vm: add migration to the .gitignore selftests/vm/pkeys: fix typo in comment ksm: fix typo in comment selftests: vm: add process_mrelease tests Revert "mm/vmscan: never demote for memcg reclaim" mm/kfence: print disabling or re-enabling message include/trace/events/percpu.h: cleanup for "percpu: improve percpu_alloc_percpu event trace" include/trace/events/mmflags.h: cleanup for "tracing: incorrect gfp_t conversion" mm: fix a potential infinite loop in start_isolate_page_range() MAINTAINERS: add Muchun as co-maintainer for HugeTLB zram: fix Kconfig dependency warning mm/shmem: fix shmem folio swapoff hang cgroup: fix an error handling path in alloc_pagecache_max_30M() mm: damon: use HPAGE_PMD_SIZE tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate nodemask.h: fix compilation error with GCC12 ...
Documentation/ABI/testing/sysfs-kernel-mm-damon | 25 +- Documentation/admin-guide/blockdev/zram.rst | 5 + Documentation/admin-guide/cgroup-v2.rst | 49 ++ Documentation/admin-guide/kernel-parameters.txt | 10 +- Documentation/admin-guide/mm/damon/reclaim.rst | 11 + Documentation/admin-guide/mm/damon/usage.rst | 41 +- Documentation/admin-guide/mm/hugetlbpage.rst | 2 +- Documentation/admin-guide/mm/ksm.rst | 18 + Documentation/admin-guide/sysctl/vm.rst | 48 ++ Documentation/dev-tools/kasan.rst | 228 +++++---- Documentation/filesystems/locking.rst | 18 +- Documentation/filesystems/proc.rst | 154 +++--- Documentation/filesystems/vfs.rst | 17 +- Documentation/vm/highmem.rst | 100 ++-- Documentation/vm/index.rst | 1 + Documentation/vm/page_owner.rst | 45 +- Documentation/vm/vmemmap_dedup.rst | 223 +++++++++ MAINTAINERS | 9 +- arch/alpha/include/asm/page.h | 2 +- arch/arm64/Kconfig | 3 + arch/arm64/include/asm/cache.h | 17 +- arch/arm64/include/asm/hugetlb.h | 4 +- arch/arm64/include/asm/mman.h | 24 - arch/arm64/include/asm/mte-kasan.h | 1 + arch/arm64/include/asm/percpu.h | 1 + arch/arm64/include/asm/pgtable-prot.h | 1 + arch/arm64/include/asm/pgtable.h | 91 +++- arch/arm64/mm/flush.c | 14 + arch/arm64/mm/hugetlbpage.c | 12 +- arch/arm64/mm/mmap.c | 25 + arch/csky/include/asm/processor.h | 2 +- arch/ia64/include/asm/hugetlb.h | 5 +- arch/ia64/kernel/uncached.c | 2 +- arch/mips/include/asm/hugetlb.h | 9 +- arch/parisc/include/asm/hugetlb.h | 5 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 31 +- arch/powerpc/include/asm/hugetlb.h | 9 +- arch/powerpc/include/asm/mman.h | 12 - arch/powerpc/mm/book3s64/pgtable.c | 17 + arch/riscv/Kconfig | 1 + arch/riscv/include/asm/pgtable-64.h | 5 + arch/riscv/include/asm/pgtable.h | 66 ++- arch/s390/include/asm/hugetlb.h | 26 +- arch/s390/include/asm/pgtable.h | 36 +- arch/sh/include/asm/hugetlb.h | 5 +- arch/sparc/Kconfig | 1 + arch/sparc/include/asm/hugetlb.h | 5 +- arch/sparc/include/asm/mman.h | 6 - arch/sparc/mm/init_64.c | 12 + arch/x86/Kconfig | 3 +- arch/x86/include/asm/pgtable.h | 54 +- arch/x86/include/asm/pgtable_64.h | 4 +- arch/x86/include/asm/pgtable_64_types.h | 5 + arch/x86/include/asm/pgtable_types.h | 2 + arch/x86/include/asm/tlbflush.h | 97 ++++ arch/x86/include/uapi/asm/mman.h | 14 - arch/x86/mm/Makefile | 2 +- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/pgprot.c | 35 ++ arch/x86/mm/pgtable.c | 13 +- drivers/base/memory.c | 5 +- drivers/base/node.c | 1 + drivers/block/loop.c | 4 +- drivers/block/zram/Kconfig | 3 +- drivers/block/zram/zram_drv.c | 52 +- drivers/block/zram/zram_drv.h | 1 - drivers/firmware/smccc/kvm_guest.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- drivers/gpu/drm/ttm/ttm_bo_vm.c | 2 +- drivers/virtio/virtio_mem.c | 6 +- fs/Kconfig | 22 +- fs/cifs/file.c | 7 +- fs/dax.c | 98 +--- fs/exec.c | 6 +- fs/fcntl.c | 9 +- fs/hugetlbfs/inode.c | 19 +- fs/nfs/direct.c | 23 +- fs/nfs/file.c | 18 +- fs/open.c | 9 +- fs/overlayfs/file.c | 13 +- fs/proc/base.c | 22 + fs/proc/meminfo.c | 7 + fs/proc/task_mmu.c | 9 +- fs/userfaultfd.c | 32 +- include/asm-generic/hugetlb.h | 28 +- include/asm-generic/pgtable-nopmd.h | 2 + include/asm-generic/tlb.h | 14 + include/linux/cma.h | 4 +- include/linux/compaction.h | 5 +- include/linux/damon.h | 14 + include/linux/fault-inject.h | 2 + include/linux/fs.h | 9 + include/linux/gfp.h | 20 +- include/linux/highmem-internal.h | 18 +- include/linux/highmem.h | 53 +- include/linux/huge_mm.h | 20 +- include/linux/hugetlb.h | 42 +- include/linux/kasan.h | 8 +- include/linux/khugepaged.h | 44 +- include/linux/ksm.h | 4 +- include/linux/memcontrol.h | 72 ++- include/linux/memory_hotplug.h | 14 +- include/linux/migrate.h | 39 +- include/linux/mm.h | 70 ++- include/linux/mm_inline.h | 43 ++ include/linux/mm_types.h | 20 + include/linux/mman.h | 4 - include/linux/mmzone.h | 5 +- include/linux/nfs_fs.h | 2 +- include/linux/nodemask.h | 13 +- include/linux/page-flags.h | 62 ++- include/linux/page-isolation.h | 6 +- include/linux/pgtable.h | 84 +++- include/linux/printk.h | 1 - include/linux/rmap.h | 149 +++++- include/linux/sched/coredump.h | 3 +- include/linux/shmem_fs.h | 6 +- include/linux/slab.h | 12 + include/linux/swap.h | 191 ++----- include/linux/swap_slots.h | 2 +- include/linux/swapops.h | 124 ++++- include/linux/userfaultfd_k.h | 84 ++++ include/linux/vm_event_item.h | 7 + include/linux/writeback.h | 7 + include/ras/ras_event.h | 1 - include/trace/events/btrfs.h | 4 +- include/trace/events/compaction.h | 4 +- include/trace/events/kmem.h | 26 +- include/trace/events/mmflags.h | 84 ++-- include/trace/events/percpu.h | 23 +- include/trace/events/vmscan.h | 20 +- include/uapi/linux/userfaultfd.h | 10 +- init/Kconfig | 140 ------ kernel/bpf/bpf_lru_list.h | 1 + kernel/events/uprobes.c | 2 +- kernel/fork.c | 4 +- lib/Kconfig.kasan | 168 +++---- lib/fault-inject.c | 3 + lib/kstrtox.c | 6 +- mm/Kconfig | 577 ++++++++++++++-------- mm/Makefile | 2 +- mm/compaction.c | 93 ++-- mm/damon/core-test.h | 36 ++ mm/damon/core.c | 115 ++++- mm/damon/ops-common.c | 3 +- mm/damon/paddr.c | 2 +- mm/damon/reclaim.c | 124 +++-- mm/damon/sysfs.c | 406 ++++++++++++--- mm/damon/vaddr-test.h | 14 +- mm/damon/vaddr.c | 90 +--- mm/debug_vm_pgtable.c | 46 +- mm/failslab.c | 3 + mm/filemap.c | 5 + mm/gup.c | 127 ++++- mm/hmm.c | 2 +- mm/huge_memory.c | 177 +++++-- mm/hugetlb.c | 428 +++++++++++----- mm/hugetlb_vmemmap.c | 323 +++++------- mm/hugetlb_vmemmap.h | 24 +- mm/hwpoison-inject.c | 1 + mm/internal.h | 177 +++++-- mm/kasan/common.c | 12 +- mm/kasan/generic.c | 6 +- mm/kasan/kasan.h | 92 ++-- mm/kasan/quarantine.c | 54 +- mm/kasan/report_generic.c | 8 +- mm/kfence/core.c | 40 +- mm/kfence/kfence_test.c | 5 +- mm/khugepaged.c | 81 +-- mm/ksm.c | 35 +- mm/madvise.c | 17 +- mm/memcontrol.c | 329 ++++++++++-- mm/memory-failure.c | 126 ++--- mm/memory.c | 573 ++++++++++++++------- mm/memory_hotplug.c | 35 +- mm/mempolicy.c | 74 +-- mm/memremap.c | 10 + mm/migrate.c | 194 ++++---- mm/migrate_device.c | 23 +- mm/mincore.c | 4 +- mm/mmap.c | 67 +-- mm/mmu_gather.c | 16 +- mm/mprotect.c | 176 +++++-- mm/mremap.c | 16 +- mm/page-writeback.c | 17 +- mm/page_alloc.c | 375 +++++--------- mm/page_ext.c | 2 +- mm/page_idle.c | 7 +- mm/page_io.c | 253 +++++++--- mm/page_isolation.c | 391 ++++++++++++++- mm/page_owner.c | 4 +- mm/page_table_check.c | 25 +- mm/page_vma_mapped.c | 17 +- mm/percpu-internal.h | 8 +- mm/percpu.c | 5 +- mm/pgtable-generic.c | 8 + mm/rmap.c | 409 ++++++++++----- mm/shmem.c | 353 +++++++------ mm/slab.c | 7 +- mm/slab_common.c | 3 +- mm/slob.c | 16 +- mm/sparse-vmemmap.c | 176 ++++++- mm/sparse.c | 53 +- mm/swap.c | 10 +- mm/swap.h | 157 ++++++ mm/swap_slots.c | 20 +- mm/swap_state.c | 90 ++-- mm/swapfile.c | 135 ++--- mm/userfaultfd.c | 62 ++- mm/util.c | 1 + mm/vmalloc.c | 18 +- mm/vmscan.c | 476 +++++++++--------- mm/vmstat.c | 9 +- mm/z3fold.c | 64 +-- mm/zswap.c | 52 +- tools/testing/selftests/cgroup/cgroup_util.c | 56 ++- tools/testing/selftests/cgroup/cgroup_util.h | 1 + tools/testing/selftests/cgroup/test_memcontrol.c | 199 ++++++-- tools/testing/selftests/damon/sysfs.sh | 1 + tools/testing/selftests/vm/.gitignore | 3 + tools/testing/selftests/vm/Makefile | 14 +- tools/testing/selftests/vm/config | 2 + tools/testing/selftests/vm/gup_test.c | 24 +- tools/testing/selftests/vm/hugepage-mremap.c | 6 + tools/testing/selftests/vm/ksm_tests.c | 9 +- tools/testing/selftests/vm/madv_populate.c | 34 +- tools/testing/selftests/vm/migration.c | 193 ++++++++ tools/testing/selftests/vm/mrelease_test.c | 200 ++++++++ tools/testing/selftests/vm/protection_keys.c | 2 +- tools/testing/selftests/vm/run_vmtests.sh | 525 ++++---------------- tools/testing/selftests/vm/settings | 1 + tools/testing/selftests/vm/soft-dirty.c | 145 ++++++ tools/testing/selftests/vm/split_huge_page_test.c | 79 +-- tools/testing/selftests/vm/userfaultfd.c | 13 +- tools/testing/selftests/vm/vm_util.c | 108 ++++ tools/testing/selftests/vm/vm_util.h | 9 + tools/vm/page-types.c | 8 +- tools/vm/page_owner_sort.c | 386 ++++++++++++--- 240 files changed, 9207 insertions(+), 4664 deletions(-)
diff --cc Documentation/admin-guide/kernel-parameters.txt index a9066cfb85a0,7e079b6994fe..32073f873662 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@@ -1694,18 -1659,8 +1694,18 @@@ Documentation/admin-guide/mm/hugetlbpage.rst. Format: size[KMG]
+ hugetlb_cma= [HW,CMA] The size of a CMA area used for allocation + of gigantic hugepages. Or using node format, the size + of a CMA area per node can be specified. + Format: nn[KMGTPE] or (node format) + <node>:nn[KMGTPE][,<node>:nn[KMGTPE]] + + Reserve a CMA area of given size and allocate gigantic + hugepages using the CMA allocator. If enabled, the + boot-time allocation of gigantic hugepages is skipped. + hugetlb_free_vmemmap= - [KNL] Reguires CONFIG_HUGETLB_PAGE_FREE_VMEMMAP + [KNL] Reguires CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP enabled. Allows heavy hugetlb users to free up some more memory (7 * PAGE_SIZE for each 2MB hugetlb page). diff --cc Documentation/filesystems/locking.rst index 515bc48ab58b,ef2efa1cb4ec..d1bf77ef3bc1 --- a/Documentation/filesystems/locking.rst +++ b/Documentation/filesystems/locking.rst @@@ -258,19 -258,20 +258,20 @@@ prototypes: int (*launder_folio)(struct folio *); bool (*is_partially_uptodate)(struct folio *, size_t from, size_t count); int (*error_remove_page)(struct address_space *, struct page *); - int (*swap_activate)(struct file *); + int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); + int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter);
locking rules: - All except dirty_folio and freepage may block + All except dirty_folio and free_folio may block
====================== ======================== ========= =============== -ops PageLocked(page) i_rwsem invalidate_lock +ops folio locked i_rwsem invalidate_lock ====================== ======================== ========= =============== writepage: yes, unlocks (see below) -readpage: yes, unlocks shared +read_folio: yes, unlocks shared writepages: -dirty_folio maybe +dirty_folio: maybe readahead: yes, unlocks shared write_begin: locks the page exclusive write_end: yes, unlocks exclusive @@@ -287,15 -288,16 +288,16 @@@ is_partially_uptodate: ye error_remove_page: yes swap_activate: no swap_deactivate: no + swap_rw: yes, unlocks ====================== ======================== ========= ===============
-->write_begin(), ->write_end() and ->readpage() may be called from +->write_begin(), ->write_end() and ->read_folio() may be called from the request handler (/dev/loop).
-->readpage() unlocks the page, either synchronously or via I/O +->read_folio() unlocks the folio, either synchronously or via I/O completion.
-->readahead() unlocks the pages that I/O is attempted on like ->readpage(). +->readahead() unlocks the folios that I/O is attempted on like ->read_folio().
->writepage() is used for two purposes: for "memory cleansing" and for "sync". These are quite different operations and the behaviour may differ diff --cc Documentation/filesystems/vfs.rst index 12a011d2cbc6,d4bd213d215b..08069ecd49a6 --- a/Documentation/filesystems/vfs.rst +++ b/Documentation/filesystems/vfs.rst @@@ -747,10 -747,11 +747,11 @@@ cache in your filesystem. The followin
bool (*is_partially_uptodate) (struct folio *, size_t from, size_t count); - void (*is_dirty_writeback) (struct page *, bool *, bool *); + void (*is_dirty_writeback)(struct folio *, bool *, bool *); int (*error_remove_page) (struct mapping *mapping, struct page *page); - int (*swap_activate)(struct file *); + int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); + int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter); };
``writepage`` diff --cc arch/riscv/Kconfig index 52a4b0bdb502,a2285067f2fc..c0853f1474a7 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@@ -38,8 -38,8 +38,9 @@@ config RISC select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU select ARCH_SUPPORTS_HUGETLBFS if MMU + select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_USE_MEMTEST + select ARCH_USE_QUEUED_RWLOCKS select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_GENERAL_HUGETLB diff --cc arch/x86/mm/Makefile index d957dc15b371,fb6b41a48ae5..f8220fd2c169 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile @@@ -20,7 -20,7 +20,7 @@@ CFLAGS_REMOVE_mem_encrypt_identity.o = endif
obj-y := init.o init_$(BITS).o fault.o ioremap.o extable.o mmap.o \ - pgtable.o physaddr.o tlb.o cpu_entry_area.o maccess.o - pgtable.o physaddr.o setup_nx.o tlb.o cpu_entry_area.o maccess.o pgprot.o ++ pgtable.o physaddr.o tlb.o cpu_entry_area.o maccess.o pgprot.o
obj-y += pat/
diff --cc fs/nfs/file.c index d764b3ce7905,bfb4b707b07e..6f5425e89ca6 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@@ -522,8 -537,7 +534,7 @@@ const struct address_space_operations n .write_begin = nfs_write_begin, .write_end = nfs_write_end, .invalidate_folio = nfs_invalidate_folio, - .releasepage = nfs_release_page, + .release_folio = nfs_release_folio, - .direct_IO = nfs_direct_IO, #ifdef CONFIG_MIGRATION .migratepage = nfs_migrate_page, #endif diff --cc include/linux/highmem-internal.h index 337bd9f32921,a694ca95c4ed..cddb42ff0473 --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-internal.h @@@ -239,16 -234,23 +239,28 @@@ static inline void __kunmap_atomic(voi static inline unsigned int nr_free_highpages(void) { return 0; } static inline unsigned long totalhigh_pages(void) { return 0UL; }
+static inline bool is_kmap_addr(const void *x) +{ + return false; +} + #endif /* CONFIG_HIGHMEM */
- /* - * Prevent people trying to call kunmap_atomic() as if it were kunmap() - * kunmap_atomic() should get the return value of kmap_atomic, not the page. + /** + * kunmap_atomic - Unmap the virtual address mapped by kmap_atomic() - deprecated! + * @__addr: Virtual address to be unmapped + * + * Unmaps an address previously mapped by kmap_atomic() and re-enables + * pagefaults. Depending on PREEMP_RT configuration, re-enables also + * migration and preemption. Users should not count on these side effects. + * + * Mappings should be unmapped in the reverse order that they were mapped. + * See kmap_local_page() for details on nesting. + * + * @__addr can be any address within the mapped page, so there is no need + * to subtract any offset that has been added. In contrast to kunmap(), + * this function takes the address returned from kmap_atomic(), not the + * page passed to it. The compiler will warn you if you pass the page. */ #define kunmap_atomic(__addr) \ do { \ diff --cc include/linux/slab.h index 58bb9392775d,3d2f2a3ca17e..0fefdf528e0d --- a/include/linux/slab.h +++ b/include/linux/slab.h @@@ -216,10 -209,22 +216,22 @@@ void kmem_dump_obj(void *object) #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) #endif
+ /* + * Arches can define this function if they want to decide the minimum slab + * alignment at runtime. The value returned by the function must be a power + * of two and >= ARCH_SLAB_MINALIGN. + */ + #ifndef arch_slab_minalign + static inline unsigned int arch_slab_minalign(void) + { + return ARCH_SLAB_MINALIGN; + } + #endif + /* - * kmalloc and friends return ARCH_KMALLOC_MINALIGN aligned - * pointers. kmem_cache_alloc and friends return ARCH_SLAB_MINALIGN - * aligned pointers. + * kmem_cache_alloc and friends return pointers aligned to ARCH_SLAB_MINALIGN. + * kmalloc and friends return pointers aligned to both ARCH_KMALLOC_MINALIGN + * and ARCH_SLAB_MINALIGN, but here we only assume the former alignment. */ #define __assume_kmalloc_alignment __assume_aligned(ARCH_KMALLOC_MINALIGN) #define __assume_slab_alignment __assume_aligned(ARCH_SLAB_MINALIGN) diff --cc tools/testing/selftests/cgroup/cgroup_util.c index 4297d580e3f8,b4d7027a44c3..4c52cc6f2f9c --- a/tools/testing/selftests/cgroup/cgroup_util.c +++ b/tools/testing/selftests/cgroup/cgroup_util.c @@@ -180,28 -176,13 +176,25 @@@ long cg_read_lc(const char *cgroup, con int cg_write(const char *cgroup, const char *control, char *buf) { char path[PATH_MAX]; - ssize_t len = strlen(buf); + ssize_t len = strlen(buf), ret;
snprintf(path, sizeof(path), "%s/%s", cgroup, control); - - if (write_text(path, buf, len) == len) - return 0; - - return -1; + ret = write_text(path, buf, len); + return ret == len ? 0 : ret; }
+int cg_write_numeric(const char *cgroup, const char *control, long value) +{ + char buf[64]; + int ret; + + ret = sprintf(buf, "%lu", value); + if (ret < 0) + return ret; + + return cg_write(cgroup, control, buf); +} + int cg_find_unified_root(char *root, size_t len) { char buf[10 * PAGE_SIZE]; </cut>