On Tue, Feb 18, 2025 at 05:20:28PM +0100, Alexander Gordeev wrote:
> > +++ b/arch/s390/include/asm/pgtable.h
> > @@ -1451,12 +1451,7 @@ static inline pte_t mk_pte_phys(unsigned long
> > physpage, pgprot_t pgprot)
> >
> > static inline pte_t mk_pte(struct page *page, pgprot_t pgprot)
> > {
> >
Removes a cast from folio to page in four callers of mk_pte().
Signed-off-by: Matthew Wilcox (Oracle)
---
include/linux/mm.h | 15 +++
mm/memory.c| 6 +++---
mm/userfaultfd.c | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/include/linux/mm.h b
Move the shadow stack check to pfn_pte() which lets us use the common
definition of mk_pte().
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/x86/include/asm/pgtable.h | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch
All architectures now use the common mk_pte() definition, so we
can remove the condition.
Signed-off-by: Matthew Wilcox (Oracle)
---
include/linux/mm.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3ef11ff3922f..62dccde9c561 100644
--- a
last patch to actually use folio_mk_pte() ought to be the least likely
to have a problem since it's equivalent to calling mk_pte(&folio->page).
Matthew Wilcox (Oracle) (7):
mm: Set the pte dirty if the folio is already dirty
mm: Introduce a common definition of mk_pte()
sparc32
Most architectures simply call pfn_pte(). Centralise that as the normal
definition and remove the definition of mk_pte() from the architectures
which have either that exact definition or something similar.
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/alpha/include/asm/pgtable.h | 7
Move the pfn_pte() definitions from the 2level and 4level files to the
generic pgtable.h and delete the custom definition of mk_pte() so that
we use the central definition.
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/um/include/asm/pgtable-2level.h | 1 -
arch/um/include/asm/pgtable
If the first access to a folio is a read that is then followed by a
write, we can save a page fault. s390 implemented this in their
mk_pte() in commit abf09bed3cce ("s390/mm: implement software dirty
bits"), but other architectures can also benefit from this.
Signed-off-by: Matt
Instead of defining pfn_pte() in terms of mk_pte(), make pfn_pte() the
base implementation. That lets us use the generic definition of mk_pte().
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/sparc/include/asm/pgtable_32.h | 15 +--
1 file changed, 5 insertions(+), 10 deletions
On Fri, Jan 24, 2025 at 12:47:59PM +0100, Peter Zijlstra wrote:
> Right, so I don't think Sparc and Power care to use ptdesc, they're
> using non page page-tables.
i think you mean s390, not sparc. all architectures _use_ ptdescs,
it's just that s390 and ppc use fractional ptdescs rather than an
On Fri, Dec 20, 2024 at 05:14:58AM +, Matthew Wilcox (Oracle) wrote:
> If we add a migrate_folio operation, we can convert the writepage
> operation to writepages. The large folio support here is illusory;
> we would need to kmap each page in turn for proper support. But we do
>
If we add a migrate_folio operation, we can convert the writepage
operation to writepages. The large folio support here is illusory;
we would need to kmap each page in turn for proper support. But we do
remove a few hidden calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle
On Thu, Sep 12, 2024 at 08:22:48PM +0200, Richard Weinberger wrote:
> - Ursprüngliche Mail -
> > Von: "Li Zetao"
> > An: "richard" , "anton ivanov"
> > , "Johannes Berg"
> >
> > CC: lizet...@huawei.com, "linux-um" ,
> > "linux-kernel"
> > Gesendet: Dienstag, 20. August 2024 04:50:45
>
Most architectures simply call pfn_pte(). Centralise that as the normal
definition and remove the definition of mk_pte() from the architectures
which have either that exact definition or something similar.
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/alpha/include/asm/pgtable.h | 7
Move the shadow stack check to pfn_pte() which lets us use the common
definition of mk_pte().
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/x86/include/asm/pgtable.h | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch
Move the pfn_pte() definitions from the 2level and 3level files to
the generic pgtable.h, move the setting of newprot and newpage bits
into pfn_pte() and delete the custom definition of mk_pte() so that
we use the central definition.
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/um/include
All architectures now use the common mk_pte() definition, so we
can remove the condition.
Signed-off-by: Matthew Wilcox (Oracle)
---
include/linux/pgtable.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 8204ffd87d74..1d46422b79cc
.
Signed-off-by: Matthew Wilcox (Oracle)
---
arch/s390/include/asm/pgtable.h | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 6a21d947a687..1bb7f33394d0 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch
ssage explaining why I did what I did
to each architecture.
I have some followup patches which remove folio->page conversions, but
if this set of patches are wrong on any architecture, then they'll also
be wrong, so I'm not sending them right now.
Matthew Wilcox (Oracle) (5):
mm:
On Tue, Aug 06, 2024 at 10:26:17PM +0800, kernel test robot wrote:
> kernel test robot noticed "kernel_BUG_at_include/linux/page-flags.h" on:
>
> commit: cdc4ad36a871b7ac43fcc6b2891058d332ce60ce ("fs: Convert
> aops->write_begin to take a folio")
> https://git.kernel.org/cgit/linux/kernel/git/nex
@lists.infradead.org
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/hostfs/hostfs_kern.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index a73d27c4dd58..e7c72f2634f6 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs
@lists.infradead.org
Signed-off-by: Matthew Wilcox (Oracle)
---
fs/hostfs/hostfs_kern.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index a73d27c4dd58..e7c72f2634f6 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs
On Tue, Sep 19, 2023 at 04:24:48PM +0200, John Paul Adrian Glaubitz wrote:
> If the conversion isn't hard, why is the first reflex the urge to remove an
> architecture
> instead of offering advise how to get the conversion done?
Because PREEMPT has been around since before 2005 (cc19ca86a023 crea
On Tue, Sep 19, 2023 at 02:30:59PM +0200, Thomas Gleixner wrote:
> Though it just occured to me that there are dragons lurking:
>
> arch/alpha/Kconfig: select ARCH_NO_PREEMPT
> arch/hexagon/Kconfig: select ARCH_NO_PREEMPT
> arch/m68k/Kconfig: select ARCH_NO_PREEMPT if !COLDFIRE
> arch/u
Add PFN_PTE_SHIFT and update_mmu_cache_range().
Signed-off-by: Matthew Wilcox (Oracle)
Acked-by: Mike Rapoport (IBM)
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Cc: linux-um@lists.infradead.org
---
arch/um/include/asm/pgtable.h | 7 ++-
1 file changed, 2 insertions(+), 5
On Mon, Jul 24, 2023 at 09:41:36PM -0700, Hugh Dickins wrote:
> On Mon, 24 Jul 2023, Vishal Moola (Oracle) wrote:
>
> > The MM subsystem is trying to shrink struct page. This patchset
> > introduces a memory descriptor for page table tracking - struct ptdesc.
> >
> > This patchset introduces ptde
Add PFN_PTE_SHIFT and update_mmu_cache_range().
Signed-off-by: Matthew Wilcox (Oracle)
Acked-by: Mike Rapoport (IBM)
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Cc: linux-um@lists.infradead.org
---
arch/um/include/asm/pgtable.h | 7 ++-
1 file changed, 2 insertions(+), 5
On Wed, Jun 28, 2023 at 09:41:18AM +0200, David Hildenbrand wrote:
> I'm not a friend of these "overlays"; it all only really makes sense to me
> once we actually allocate the descriptors dynamically. Maybe some of the
> existing/ongoing conversions were different (that's why I was asking for the
>
On Mon, Jun 26, 2023 at 09:44:08PM -0700, Hugh Dickins wrote:
> On Mon, 26 Jun 2023, Vishal Moola (Oracle) wrote:
>
> > The MM subsystem is trying to shrink struct page. This patchset
> > introduces a memory descriptor for page table tracking - struct ptdesc.
> ...
> > 39 files changed, 686 inser
On Thu, Jun 15, 2023 at 12:57:19AM -0700, Hugh Dickins wrote:
> Probably just trivial collisions in most architectures, which either
> of us can easily adjust to the other; powerpc likely to be more awkward,
> but fairly easily resolved; s390 quite a problem.
>
> I've so far been unable to post a
On Sat, May 27, 2023 at 01:41:44PM +0300, Mike Rapoport wrote:
> Sorry if I wasn't clear, by "page table page" I meant the page (or memory
> for that matter) for actual page table rather than struct page describing
> that memory.
>
> So what we allocate here is the actual memory for the page table
On Thu, May 25, 2023 at 01:38:54PM -0700, Vishal Moola wrote:
> On Thu, May 25, 2023 at 1:20 PM Mike Rapoport wrote:
> >
> > On Thu, May 25, 2023 at 10:00:23AM -0700, Vishal Moola wrote:
> > > On Thu, May 25, 2023 at 1:56 AM Mike Rapoport wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Mon, May 01,
Add PFN_PTE_SHIFT and update_mmu_cache_range().
Signed-off-by: Matthew Wilcox (Oracle)
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Cc: linux-um@lists.infradead.org
---
arch/um/include/asm/pgtable.h | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch
Add set_ptes() and update_mmu_cache_range().
Signed-off-by: Matthew Wilcox (Oracle)
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Cc: linux-um@lists.infradead.org
---
arch/um/include/asm/pgtable.h | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git
Add set_ptes() and update_mmu_cache_range().
Signed-off-by: Matthew Wilcox (Oracle)
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Cc: linux-um@lists.infradead.org
---
arch/um/include/asm/pgtable.h | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git
On Thu, Jan 26, 2023 at 04:50:59PM +0200, Mike Rapoport wrote:
> On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote:
> > On Wed, Jan 25, 2023 at 12:38:46AM -0800, Suren Baghdasaryan wrote:
> > > +/* Use when VMA is not part of the VMA tree and needs no locking */
> > > +static inline voi
On Wed, Jan 25, 2023 at 12:38:46AM -0800, Suren Baghdasaryan wrote:
> +/* Use when VMA is not part of the VMA tree and needs no locking */
> +static inline void init_vm_flags(struct vm_area_struct *vma,
> + unsigned long flags)
> +{
> + vma->vm_flags = flags;
vm_fl
On Wed, Jan 25, 2023 at 08:49:50AM -0800, Suren Baghdasaryan wrote:
> On Wed, Jan 25, 2023 at 1:10 AM Peter Zijlstra wrote:
> > > + /*
> > > + * Flags, see mm.h.
> > > + * WARNING! Do not modify directly.
> > > + * Use {init|reset|set|clear|mod}_vm_flags() functions instead.
> >
On Mon, Oct 17, 2022 at 11:06:30AM +0200, Johannes Berg wrote:
> From: Johannes Berg
>
> Looks like this is needed now, otherwise we get RCU
> splats from lockdep. But I don't know anything about
> this code ...
You're getting lockdep splats now because there was no checking before.
I assumed th
On Tue, Aug 02, 2022 at 03:45:50PM +0200, Miguel Ojeda wrote:
> Hi Willy,
>
> On Tue, Aug 2, 2022 at 2:26 PM Matthew Wilcox wrote:
> >
> > None of this (afaict) has been discussed on linux-fsdevel. And I may
> > have missed somethiing, but I don't see the fs modu
On Tue, Aug 02, 2022 at 03:49:47AM +0200, Miguel Ojeda wrote:
> Some of the improvements to the abstractions and example drivers are:
>
> - Filesystem support (`fs` module), including:
>
> + `INode` type (which wraps `struct inode`).
> + `DEntry` type (which wraps `struct dentry`).
41 matches
Mail list logo