]> www.infradead.org Git - users/willy/pagecache.git/log
users/willy/pagecache.git
20 months agomm: Call update_mmu_cache_range() in more page fault handling paths set_ptes
Matthew Wilcox (Oracle) [Mon, 3 Apr 2023 17:18:45 +0000 (13:18 -0400)]
mm: Call update_mmu_cache_range() in more page fault handling paths

Pass the vm_fault to the architecture to help it make smarter decisions
about which PTEs to insert into the TLB.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agofilemap: Batch PTE mappings
Yin Fengwei [Tue, 7 Feb 2023 17:45:21 +0000 (12:45 -0500)]
filemap: Batch PTE mappings

Call set_pte_range() once per contiguous range of the folio instead
of once per page.  This batches the updates to mm counters and the
rmap.

With a will-it-scale.page_fault3 like app (change file write
fault testing to read fault testing. Trying to upstream it to
will-it-scale at [1]) got 15% performance gain on a 48C/96T
Cascade Lake test box with 96 processes running against xfs.

Perf data collected before/after the change:
  18.73%--page_add_file_rmap
          |
           --11.60%--__mod_lruvec_page_state
                     |
                     |--7.40%--__mod_memcg_lruvec_state
                     |          |
                     |           --5.58%--cgroup_rstat_updated
                     |
                      --2.53%--__mod_lruvec_state
                                |
                                 --1.48%--__mod_node_page_state

  9.93%--page_add_file_rmap_range
         |
          --2.67%--__mod_lruvec_page_state
                    |
                    |--1.95%--__mod_memcg_lruvec_state
                    |          |
                    |           --1.57%--cgroup_rstat_updated
                    |
                     --0.61%--__mod_lruvec_state
                               |
                                --0.54%--__mod_node_page_state

The running time of __mode_lruvec_page_state() is reduced about 9%.

[1]: https://github.com/antonblanchard/will-it-scale/pull/37

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agomm: Convert do_set_pte() to set_pte_range()
Yin Fengwei [Tue, 7 Feb 2023 17:33:25 +0000 (12:33 -0500)]
mm: Convert do_set_pte() to set_pte_range()

set_pte_range() allows to setup page table entries for a specific
range.  It takes advantage of batched rmap update for large folio.
It now takes care of calling update_mmu_cache_range().

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agormap: add folio_add_file_rmap_range()
Yin Fengwei [Mon, 6 Feb 2023 14:06:37 +0000 (22:06 +0800)]
rmap: add folio_add_file_rmap_range()

folio_add_file_rmap_range() allows to add pte mapping to a specific
range of file folio. Comparing to page_add_file_rmap(), it batched
updates __lruvec_stat for large folio.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agofilemap: Add filemap_map_folio_range()
Yin Fengwei [Mon, 6 Feb 2023 14:06:36 +0000 (22:06 +0800)]
filemap: Add filemap_map_folio_range()

filemap_map_folio_range() maps partial/full folio. Comparing to original
filemap_map_pages(), it updates refcount once per folio instead of per
page and gets minor performance improvement for large folio.

With a will-it-scale.page_fault3 like app (change file write
fault testing to read fault testing. Trying to upstream it to
will-it-scale at [1]), got 2% performance gain on a 48C/96T
Cascade Lake test box with 96 processes running against xfs.

[1]: https://github.com/antonblanchard/will-it-scale/pull/37

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agomm: Use flush_icache_pages() in do_set_pmd()
Matthew Wilcox (Oracle) [Tue, 28 Feb 2023 19:18:35 +0000 (14:18 -0500)]
mm: Use flush_icache_pages() in do_set_pmd()

Push the iteration over each page down to the architectures (many
can flush the entire THP without iteration).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agomm: Tidy up set_ptes definition
Matthew Wilcox (Oracle) [Sun, 5 Mar 2023 16:02:06 +0000 (11:02 -0500)]
mm: Tidy up set_ptes definition

Now that all architectures are converted, we can remove the
PFN_PTE_SHIFT ifdef and we can define set_pte_at() unconditionally.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agomm: Rationalise flush_icache_pages() and flush_icache_page()
Matthew Wilcox (Oracle) [Tue, 28 Feb 2023 19:10:58 +0000 (14:10 -0500)]
mm: Rationalise flush_icache_pages() and flush_icache_page()

Move the default (no-op) implementation of flush_icache_pages()
to <linux/cacheflush.h> from <asm-generic/cacheflush.h>.
Remove the flush_icache_page() wrapper from each architecture
into <linux/cacheflush.h>.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agomm: Remove page_mapping_file()
Matthew Wilcox (Oracle) [Tue, 28 Feb 2023 16:22:16 +0000 (11:22 -0500)]
mm: Remove page_mapping_file()

This function has no more users.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agoxtensa: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
xtensa: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
20 months agox86: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 31 Jul 2023 14:31:16 +0000 (10:31 -0400)]
x86: Implement the new page table range API

Add PFN_PTE_SHIFT and a noop update_mmu_cache_range().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
20 months agoum: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
um: Implement the new page table range API

Add PFN_PTE_SHIFT and update_mmu_cache_range().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-um@lists.infradead.org
20 months agosparc64: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
sparc64: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().  Convert the PG_dcache_dirty flag from being
per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
20 months agosparc32: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
sparc32: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
20 months agosh: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
sh: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().  Change the PG_dcache_clean flag from being
per-page to per-folio.  Flush the entire folio containing the pages in
flush_icache_pages() for ease of implementation.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org
20 months agos390: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
s390: Implement the new page table range API

Add set_ptes() and update_mmu_cache_range().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
20 months agoriscv: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
riscv: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio().
Change the PG_dcache_clean flag from being per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
20 months agopowerpc: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
powerpc: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio().
Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page to
per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev@lists.ozlabs.org
20 months agoparisc: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
parisc: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio()
and flush_icache_pages().  Change the PG_arch_1 (aka PG_dcache_dirty) flag
from being per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
20 months agoopenrisc: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
openrisc: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range() and flush_dcache_folio().
Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page
to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Stafford Horne <shorne@gmail.com>
Cc: linux-openrisc@vger.kernel.org
20 months agonios2: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
nios2: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range(), flush_icache_pages() and
flush_dcache_folio().  Change the PG_arch_1 (aka PG_dcache_dirty) flag
from being per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Dinh Nguyen <dinguyen@kernel.org>
20 months agomips: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
mips: Implement the new page table range API

Rename _PFN_SHIFT to PFN_PTE_SHIFT.  Convert a few places
to call set_pte() instead of set_pte_at().  Add set_ptes(),
update_mmu_cache_range(), flush_icache_pages() and flush_dcache_folio().
Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page
to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
20 months agomicroblaze: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
microblaze: Implement the new page table range API

Rename PFN_SHIFT_OFFSET to PTE_PFN_SHIFT.  Change the calling
convention for set_pte() to be the same as other architectures.  Add
update_mmu_cache_range(), flush_icache_pages() and flush_dcache_folio().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Michal Simek <monstr@monstr.eu>
20 months agom68k: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
m68k: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range(), flush_icache_pages() and
flush_dcache_folio().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: linux-m68k@lists.linux-m68k.org
20 months agoloongarch: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
loongarch: Implement the new page table range API

Add update_mmu_cache_range() and change _PFN_SHIFT to PFN_PTE_SHIFT.
It would probably be more efficient to implement __update_tlb() by
flushing the entire folio instead of calling __update_tlb() N times,
but I'll leave that for someone who understands the architecture better.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev
20 months agoia64: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
ia64: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range() and flush_dcache_folio().
Change the PG_arch_1 (aka PG_dcache_clean) flag from being per-page to
per-folio, which makes arch_dma_mark_clean() and mark_clean() a little
more exciting.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: linux-ia64@vger.kernel.org
20 months agohexagon: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
hexagon: Implement the new page table range API

Add PFN_PTE_SHIFT and update_mmu_cache_range().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Brian Cain <bcain@quicinc.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
20 months agocsky: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
csky: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range() and flush_dcache_folio().
Change the PG_dcache_clean flag from being per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Guo Ren <guoren@kernel.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: linux-csky@vger.kernel.org
20 months agoarm64: Implement the new page table range API
Matthew Wilcox (Oracle) [Mon, 13 Feb 2023 19:12:22 +0000 (14:12 -0500)]
arm64: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio().
Change the PG_dcache_clean flag from being per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
20 months agoarm: Implement the new page table range API
Matthew Wilcox (Oracle) [Fri, 10 Feb 2023 20:35:06 +0000 (15:35 -0500)]
arm: Implement the new page table range API

Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().  Change the PG_dcache_clear flag from being per-page
to per-folio which makes __dma_page_dev_to_cpu() a bit more exciting.
Also add flush_cache_pages(), even though this isn't used by generic code
(yet?)

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
20 months agoarc: Implement the new page table range API
Matthew Wilcox (Oracle) [Fri, 10 Feb 2023 20:35:06 +0000 (15:35 -0500)]
arc: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range(), flush_dcache_folio()
and flush_icache_pages().

Change the PG_dc_clean flag from being per-page to per-folio (which
means it cannot always be set as we don't know that all pages in this
folio were cleaned).  Enhance the internal flush routines to take the
number of pages to flush.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: linux-snps-arc@lists.infradead.org
20 months agoalpha: Implement the new page table range API
Matthew Wilcox (Oracle) [Wed, 8 Feb 2023 19:07:59 +0000 (14:07 -0500)]
alpha: Implement the new page table range API

Add PFN_PTE_SHIFT, update_mmu_cache_range() and flush_icache_pages().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
20 months agomm: Add default definition of set_ptes()
Matthew Wilcox (Oracle) [Fri, 3 Mar 2023 16:52:17 +0000 (11:52 -0500)]
mm: Add default definition of set_ptes()

Most architectures can just define set_pte() and PFN_PTE_SHIFT to
use this definition.  It's also a handy spot to document the guarantees
provided by the MM.

Suggested-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
20 months agomm: Remove ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO
Matthew Wilcox (Oracle) [Fri, 10 Feb 2023 20:33:23 +0000 (15:33 -0500)]
mm: Remove ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO

Current best practice is to reuse the name of the function as a define
to indicate that the function is implemented by the architecture.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agomm: Add folio_flush_mapping()
Matthew Wilcox (Oracle) [Fri, 10 Feb 2023 20:30:38 +0000 (15:30 -0500)]
mm: Add folio_flush_mapping()

This is the folio equivalent of page_mapping_file(), but rename it
to make it clear that it's very different from page_file_mapping().
Theoretically, there's nothing flush-only about it, but there are no
other users today, and I doubt there will be; it's almost always more
useful to know the swapfile's mapping or the swapcache's mapping.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agomm: Add generic flush_icache_pages() and documentation
Matthew Wilcox (Oracle) [Wed, 8 Feb 2023 19:17:52 +0000 (14:17 -0500)]
mm: Add generic flush_icache_pages() and documentation

flush_icache_page() is deprecated but not yet removed, so add
a range version of it.  Change the documentation to refer to
update_mmu_cache_range() instead of update_mmu_cache().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agomm: Convert page_table_check_pte_set() to page_table_check_ptes_set()
Matthew Wilcox (Oracle) [Wed, 8 Feb 2023 18:02:13 +0000 (13:02 -0500)]
mm: Convert page_table_check_pte_set() to page_table_check_ptes_set()

Tell the page table check how many PTEs & PFNs we want it to check.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
20 months agominmax: Add in_range() macro
Matthew Wilcox (Oracle) [Mon, 10 Jul 2023 15:41:22 +0000 (11:41 -0400)]
minmax: Add in_range() macro

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.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
20 months agoAdd linux-next specific files for 20230731
Stephen Rothwell [Mon, 31 Jul 2023 04:08:15 +0000 (14:08 +1000)]
Add linux-next specific files for 20230731

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git
Stephen Rothwell [Mon, 31 Jul 2023 03:16:45 +0000 (13:16 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git

20 months agoMerge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavo...
Stephen Rothwell [Mon, 31 Jul 2023 03:16:42 +0000 (13:16 +1000)]
Merge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git

20 months agoMerge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
Stephen Rothwell [Mon, 31 Jul 2023 03:16:40 +0000 (13:16 +1000)]
Merge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git

20 months agoMerge branch 'bitmap-for-next' of https://github.com/norov/linux.git
Stephen Rothwell [Mon, 31 Jul 2023 03:16:38 +0000 (13:16 +1000)]
Merge branch 'bitmap-for-next' of https://github.com/norov/linux.git

20 months agoMerge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
Stephen Rothwell [Mon, 31 Jul 2023 03:16:36 +0000 (13:16 +1000)]
Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git
Stephen Rothwell [Mon, 31 Jul 2023 03:16:33 +0000 (13:16 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman...
Stephen Rothwell [Mon, 31 Jul 2023 03:16:31 +0000 (13:16 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/membloc...
Stephen Rothwell [Mon, 31 Jul 2023 03:16:18 +0000 (13:16 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git

20 months agoMerge branch 'mhi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git
Stephen Rothwell [Mon, 31 Jul 2023 03:16:16 +0000 (13:16 +1000)]
Merge branch 'mhi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git

20 months agoMerge branch 'main' of git://git.infradead.org/users/willy/xarray.git
Stephen Rothwell [Mon, 31 Jul 2023 03:00:38 +0000 (13:00 +1000)]
Merge branch 'main' of git://git.infradead.org/users/willy/xarray.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git
Stephen Rothwell [Mon, 31 Jul 2023 03:00:36 +0000 (13:00 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git

20 months agoMerge branch 'for-next/seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Mon, 31 Jul 2023 03:00:34 +0000 (13:00 +1000)]
Merge branch 'for-next/seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git

20 months agoMerge branch 'ntb-next' of https://github.com/jonmason/ntb.git
Stephen Rothwell [Mon, 31 Jul 2023 03:00:32 +0000 (13:00 +1000)]
Merge branch 'ntb-next' of https://github.com/jonmason/ntb.git

20 months agoMerge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Mon, 31 Jul 2023 03:00:29 +0000 (13:00 +1000)]
Merge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git

20 months agoMerge branch 'rtc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni...
Stephen Rothwell [Mon, 31 Jul 2023 03:00:28 +0000 (13:00 +1000)]
Merge branch 'rtc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching...
Stephen Rothwell [Mon, 31 Jul 2023 03:00:26 +0000 (13:00 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

20 months agoMerge branch 'kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux...
Stephen Rothwell [Mon, 31 Jul 2023 02:57:46 +0000 (12:57 +1000)]
Merge branch 'kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux...
Stephen Rothwell [Mon, 31 Jul 2023 02:57:44 +0000 (12:57 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
Stephen Rothwell [Mon, 31 Jul 2023 02:55:05 +0000 (12:55 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
Stephen Rothwell [Mon, 31 Jul 2023 02:54:57 +0000 (12:54 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git

20 months agoMerge branch 'renesas-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/geert...
Stephen Rothwell [Mon, 31 Jul 2023 02:52:22 +0000 (12:52 +1000)]
Merge branch 'renesas-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
Stephen Rothwell [Mon, 31 Jul 2023 02:52:20 +0000 (12:52 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git

20 months agoMerge branch 'gpio/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl...
Stephen Rothwell [Mon, 31 Jul 2023 02:52:18 +0000 (12:52 +1000)]
Merge branch 'gpio/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
Stephen Rothwell [Mon, 31 Jul 2023 02:41:58 +0000 (12:41 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git

20 months agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
Stephen Rothwell [Mon, 31 Jul 2023 02:41:57 +0000 (12:41 +1000)]
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git

# Conflicts:
# drivers/net/virtio_net.c

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
Stephen Rothwell [Mon, 31 Jul 2023 02:41:53 +0000 (12:41 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
Stephen Rothwell [Mon, 31 Jul 2023 02:41:51 +0000 (12:41 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
Stephen Rothwell [Mon, 31 Jul 2023 02:41:49 +0000 (12:41 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
Stephen Rothwell [Mon, 31 Jul 2023 02:41:47 +0000 (12:41 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git

20 months agoMerge branch 'counter-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:34 +0000 (12:38 +1000)]
Merge branch 'counter-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter.git

20 months agoMerge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:32 +0000 (12:38 +1000)]
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

20 months agoMerge branch 'next' of git://github.com/awilliam/linux-vfio.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:31 +0000 (12:38 +1000)]
Merge branch 'next' of git://github.com/awilliam/linux-vfio.git

20 months agoMerge branch 'extcon-next' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:29 +0000 (12:38 +1000)]
Merge branch 'extcon-next' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:27 +0000 (12:38 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:26 +0000 (12:38 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git

20 months agoMerge branch 'togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:24 +0000 (12:38 +1000)]
Merge branch 'togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git

20 months agoMerge branch 'icc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:23 +0000 (12:38 +1000)]
Merge branch 'icc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:21 +0000 (12:38 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:19 +0000 (12:38 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git

20 months agoMerge branch 'habanalabs-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ogabb...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:18 +0000 (12:38 +1000)]
Merge branch 'habanalabs-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git

# Conflicts:
# drivers/accel/habanalabs/common/habanalabs.h

20 months agoMerge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:16 +0000 (12:38 +1000)]
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git

20 months agoMerge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb...
Stephen Rothwell [Mon, 31 Jul 2023 02:38:14 +0000 (12:38 +1000)]
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git

20 months agoMerge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Stephen Rothwell [Mon, 31 Jul 2023 02:38:13 +0000 (12:38 +1000)]
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git

20 months agoMerge branch 'for-next' of git://github.com/cminyard/linux-ipmi.git
Stephen Rothwell [Mon, 31 Jul 2023 02:22:42 +0000 (12:22 +1000)]
Merge branch 'for-next' of git://github.com/cminyard/linux-ipmi.git

20 months agoMerge branch 'for-leds-next' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
Stephen Rothwell [Mon, 31 Jul 2023 02:22:39 +0000 (12:22 +1000)]
Merge branch 'for-leds-next' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git

20 months agoMerge branch 'for-firmware-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Mon, 31 Jul 2023 02:22:37 +0000 (12:22 +1000)]
Merge branch 'for-firmware-next' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platfo...
Stephen Rothwell [Mon, 31 Jul 2023 02:22:35 +0000 (12:22 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git
Stephen Rothwell [Mon, 31 Jul 2023 02:22:34 +0000 (12:22 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percp...
Stephen Rothwell [Mon, 31 Jul 2023 02:22:32 +0000 (12:22 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git

20 months agoMerge branch 'next' of https://github.com/kvm-x86/linux.git
Stephen Rothwell [Mon, 31 Jul 2023 02:09:31 +0000 (12:09 +1000)]
Merge branch 'next' of https://github.com/kvm-x86/linux.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git
Stephen Rothwell [Mon, 31 Jul 2023 02:09:29 +0000 (12:09 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

20 months agoMerge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
Stephen Rothwell [Mon, 31 Jul 2023 01:54:01 +0000 (11:54 +1000)]
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux...
Stephen Rothwell [Mon, 31 Jul 2023 01:53:59 +0000 (11:53 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git

20 months agoMerge branch 'edac-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ras...
Stephen Rothwell [Mon, 31 Jul 2023 01:53:57 +0000 (11:53 +1000)]
Merge branch 'edac-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git

20 months agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Stephen Rothwell [Mon, 31 Jul 2023 01:53:55 +0000 (11:53 +1000)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Mon, 31 Jul 2023 01:53:53 +0000 (11:53 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux...
Stephen Rothwell [Mon, 31 Jul 2023 01:46:36 +0000 (11:46 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt.git

20 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
Stephen Rothwell [Mon, 31 Jul 2023 01:46:35 +0000 (11:46 +1000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git
Stephen Rothwell [Mon, 31 Jul 2023 01:42:51 +0000 (11:42 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git

20 months agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
Stephen Rothwell [Mon, 31 Jul 2023 01:42:50 +0000 (11:42 +1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git

20 months agoMerge branch 'master' of https://scm.osdn.net/gitroot/tomoyo/tomoyo-test1.git
Stephen Rothwell [Mon, 31 Jul 2023 01:29:31 +0000 (11:29 +1000)]
Merge branch 'master' of https://scm.osdn.net/gitroot/tomoyo/tomoyo-test1.git