linux-stable/arch
Christoph Hellwig 27674ef6c7 mm: remove the extra ZONE_DEVICE struct page refcount
ZONE_DEVICE struct pages have an extra reference count that complicates
the code for put_page() and several places in the kernel that need to
check the reference count to see that a page is not being used (gup,
compaction, migration, etc.). Clean up the code so the reference count
doesn't need to be treated specially for ZONE_DEVICE pages.

Note that this excludes the special idle page wakeup for fsdax pages,
which still happens at refcount 1.  This is a separate issue and will
be sorted out later.  Given that only fsdax pages require the
notifiacation when the refcount hits 1 now, the PAGEMAP_OPS Kconfig
symbol can go away and be replaced with a FS_DAX check for this hook
in the put_page fastpath.

Based on an earlier patch from Ralph Campbell <rcampbell@nvidia.com>.

Link: https://lkml.kernel.org/r/20220210072828.2930359-8-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@amd.com>

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Christian Knig <christian.koenig@amd.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-03-03 12:47:33 -05:00
..
alpha bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
arc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
arm Amlogic fixes for v5.17-rc 2022-02-08 10:51:05 +01:00
arm64 mm: don't include <linux/memremap.h> in <linux/mm.h> 2022-03-03 12:47:33 -05:00
csky bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
h8300 bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
hexagon bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
ia64 ia64: make IA64_MCA_RECOVERY bool instead of tristate 2022-01-30 09:56:58 +02:00
m68k bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
microblaze Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
mips MIPS: DTS: CI20: fix how ddc power is enabled 2022-02-09 13:58:26 +01:00
nds32 Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
nios2 Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
openrisc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
parisc parisc: Fix some apparent put_user() failures 2022-02-14 12:36:42 +01:00
powerpc mm: remove the extra ZONE_DEVICE struct page refcount 2022-03-03 12:47:33 -05:00
riscv RISC-V Fixes for 5.17-rc4 2022-02-11 12:02:09 -08:00
s390 s390 updates for 5.17-rc4 2022-02-12 09:12:44 -08:00
sh bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
sparc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
um virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
x86 ARM: 2022-02-15 11:07:59 -08:00
xtensa bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
.gitignore
Kconfig Merge branch 'akpm' (patches from Andrew) 2022-01-20 10:41:01 +02:00