vmf_insert_mixed(). This is unnecessary as it is no longer checked, instead
relying on pfn_valid() to determine if there is an associated page or not.
Signed-off-by: Alistair Popple
Reviewed-by: Christoph Hellwig
---
drivers/gpu/drm/gma500/fbdev.c | 2 +-
drivers/gpu/drm/omapdrm/omap_gem.c | 5
It's no longer used so remove it.
Signed-off-by: Alistair Popple
---
mm/memremap.c | 27 ---
1 file changed, 27 deletions(-)
diff --git a/mm/memremap.c b/mm/memremap.c
index 2ea5322..5deb181 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -38,30 +38,6 @@ unsigned
All PFN_* pfn_t flags have been removed. Therefore there is no longer
a need for the pfn_t type and all uses can be replaced with normal
pfns.
Signed-off-by: Alistair Popple
Reviewed-by: Christoph Hellwig
---
arch/x86/mm/pat/memtype.c| 6 +-
drivers/dax/device.c
behaviour as it will always be false.
Signed-off-by: Alistair Popple
---
fs/dax.c | 5 ++---
include/linux/huge_mm.h| 10 --
include/linux/pgtable.h| 2 +-
mm/hmm.c | 4 ++--
mm/huge_memory.c | 30 +-
mm
Now that DAX and all other reference counts to ZONE_DEVICE pages are
managed normally there is no need for the special devmap PTE/PMD/PUD
page table bits. So drop all references to these, freeing up a
software defined page table bit on architectures supporting it.
Signed-off-by: Alistair Popple
PFN_DEV no longer exists. This means no devmap PMDs or PUDs will be
created, so checking for them is redundant. Instead mappings of pages that
would have previously returned true for pXd_devmap() will return true for
pXd_trans_huge()
Signed-off-by: Alistair Popple
---
arch/powerpc/mm/book3s64
The only users of pmd_devmap were device dax and fs dax. The check for
pmd_devmap() in check_pmd_state() is therefore redundant as callers
explicitly check for is_zone_device_page(), so this check can be dropped.
Signed-off-by: Alistair Popple
---
mm/khugepaged.c | 2 --
1 file changed, 2
pXd_devmap to skip DAX pages
continue to do so by adding explicit checks of the VMA instead.
Signed-off-by: Alistair Popple
---
fs/userfaultfd.c | 2 +-
mm/hmm.c | 2 +-
mm/userfaultfd.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
memmap so there is no need to hold a reference on the pgmap
data structure to ensure this.
Furthermore mappings with PFN_DEV are no longer created, hence this
effectively dead code anyway so can be removed.
Signed-off-by: Alistair Popple
---
include/linux/huge_mm.h | 3 +-
mm/gup.c
;t support pte_devmap
so those will continue to rely on pfn_valid() to determine if the page can
be mapped.
Signed-off-by: Alistair Popple
---
mm/hmm.c| 3 ---
mm/memory.c | 20 ++--
mm/vmscan.c | 2 +-
3 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/mm/hmm.c b/mm/h
@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: nvd...@lists.linux.dev
Cc: linux-...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
Cc: j...@groves.net
Alistair Popple (12):
mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST
mm: Convert pXd_devmap checks to vma_is_dax
mm/pagewalk: S
Previously dax pages were skipped by the pagewalk code as pud_special() or
vm_normal_page{_pmd}() would be false for DAX pages. Now that dax pages are
refcounted normally that is no longer the case, so add explicit checks to
skip them.
Signed-off-by: Alistair Popple
---
include/linux/memremap.h
The PFN_MAP flag is no longer used for anything, so remove it. The
PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so
also remove them.
Signed-off-by: Alistair Popple
Reviewed-by: Christoph Hellwig
---
include/linux/pfn_t.h | 31 +++
mm
to make it clear that it may advance the
iterator state.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
fs/dax.c | 50 +-
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index b35f538..f5fdb43 1006
PCI P2PDMA pages are not mapped with pXX_devmap PTEs therefore the
check in __gup_device_huge() is redundant. Remove it
Signed-off-by: Alistair Popple
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Wiliams
Acked-by: David Hildenbrand
---
mm/gup.c | 5 -
1 file changed, 5 deletions
user-space
with mapping_mapped() and returns early if not, skipping the check for
DMA busy pages. This is wrong as pages may still be undergoing DMA
access even if they have subsequently been unmapped from
user-space. Fix this by dropping the check for mapping_mapped().
Signed-off-by: Alistair
t the pages normally as defined by vm_normal_page().
Signed-off-by: Alistair Popple
Changes for v9:
- Fix warnings when pgmap->ops isn't defined for FS_DAX, reported by
Gerald Schaefer.
---
drivers/dax/device.c | 15 +--
mm/memremap.c| 14 +++---
2 file
tair
On Fri, Feb 28, 2025 at 02:30:55PM +1100, Alistair Popple wrote:
> Main updates since v8:
>
> - Fixed reading of bad pgmap in migrate_vma_collect_pmd() as reported/fixed
>by Balbir.
>
> - Fixed bad warnings generated in free_zone_device_folio() when pgmap->ops
>
ystem block to be freed will not wait for the
remote access to complete. Therefore a busy block may be reallocated to a
new file leading to corruption.
Signed-off-by: Alistair Popple
---
Changes for v7:
- Don't take locks during inode eviction as suggested by Darrick and
therefore
rchitectures
that have devmap PTE bits defined.
It also almost certainly allows further clean-up of the devmap managed
functions, but I have left that as a future improvment. It also
enables support for compound ZONE_DEVICE pages which is one of my
primary motivators for doing this work.
Signed-off-
when the file-system
calls dax_break_mapping() as part of it's truncate operation. This
ensures only idle pages can be removed from the FS DAX page-cache and
makes it easy to detect if a file-system hasn't called
dax_break_mapping() prior to a truncate operation.
Signed-off-by:
L, implying it is present in at
least one address space. This also makes it easier for a future change to
detect when a page is first mapped into an address space which requires
special handling.
Signed-off-by: Alistair Popple
---
Changes for v8:
- Rebased on mm-unstable which includes Matthe
to remove the pgmap refcounting
that is currently done in mm/gup.c.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v8:
- Rebased on mm-unstable - conflicts with Matthew's earlier changes.
- Made dax_folio_put() easier to read thanks to David's s
Gorbik
Cc: Christian Borntraeger
Cc: Sven Schnelle
Cc: Jan Kara
Cc: Matthew Wilcox
Cc: Christoph Hellwig
Cc: Alistair Popple
Signed-off-by: Dan Williams
---
Documentation/filesystems/dax.rst | 1 -
drivers/s390/block/Kconfig| 12 ++--
drivers/s390/block/dcssblk.c
Longterm pinning of FS DAX pages should already be disallowed by
various pXX_devmap checks. However a future change will cause these
checks to be invalid for FS DAX pages so make
folio_is_longterm_pinnable() return false for FS DAX pages.
Signed-off-by: Alistair Popple
Reviewed-by: John Hubbard
current mechanism, vmf_insert_pfn_pud, which
simply inserts a special devmap PUD entry into the page table without
holding a reference to the page for the mapping.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
Acked-by: David Hildenbrand
---
Changes for v7:
- Added a comment
In preparation for using insert_page() for DAX, enhance
insert_page_into_pte_locked() to handle establishing writable
mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a
PTE which bypasses the typical set_pte_range() in finish_fault.
Signed-off-by: Alistair Popple
Suggested-by
(). This is because
PTE faults require only a subpage of the folio to be PTE mapped rather than
the entire folio. It would be possible to add this context somewhere but
callers already need to handle PTE faults and PMD faults separately so a
more generic function is not useful.
Signed-off-by: Alistair
-off-by: Alistair Popple
Acked-by: David Hildenbrand
---
Changes for v8:
- Remove temp suggested by David.
Changes for v7:
- Fix vmf_insert_page_mkwrite by removing pfn gunk as suggested by
David.
Updates from v2:
- Rename function to make not DAX specific
- Split the
PUD-sized folios so we don't support for
that for now.
Signed-off-by: Alistair Popple
Acked-by: David Hildenbrand
Reviewed-by: Dan Williams
---
Changes for v8:
- Rebase on mm-unstable, only a minor conflict due to code addition
at the same place.
Changes for v6:
- Minor comment
>pgmap.
The page->pgmap field must be common to all pages within a folio, even
if the folio spans memory sections. Therefore pgmap is the same for
both head and tail pages and can be moved into the folio and we can
use the standard scheme to find compound_head from a tail page.
Signed-off-
refcount as
required. P2PDMA uses vm_insert_page() to map the page, and that
requires a non-zero reference count when initialising the page so set
that when the page is first mapped.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
Acked-by: David Hildenbrand
---
Changes since v2
A FS DAX page is considered idle when its refcount drops to one. This
is currently open-coded in all file systems supporting FS DAX. Move
the idle detection to a common function to make future changes easier.
Signed-off-by: Alistair Popple
Reviewed-by: Jan Kara
Reviewed-by: Christoph Hellwig
: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v7:
- Fix smatch warning, also reported by Dan and Darrick
- Make sure xfs_break_layouts() can return -ERESTARTSYS, reported by
Darrick
- Use common definition of dax_page_is_idle()
- Removed misplaced hunk changing madvise
to fuse_dax_break_layouts()
which will invalidate the entire file range to
dax_layout_busy_page_range().
Signed-off-by: Alistair Popple
Co-developed-by: Dan Williams
Signed-off-by: Dan Williams
Reviewed-by: Balbir Singh
Fixes: 6ae330cad6ef ("virtiofs: serialize truncate/punch_hole and dax
On Thu, Feb 20, 2025 at 07:33:34PM +0100, Gerald Schaefer wrote:
> On Tue, 18 Feb 2025 14:55:36 +1100
> Alistair Popple wrote:
>
> [...]
> > diff --git a/mm/memremap.c b/mm/memremap.c
> > index 9a8879b..532a52a 100644
> > --- a/mm/memremap.c
> > +++ b/mm/memre
On Tue, Feb 18, 2025 at 12:37:28PM +0100, David Hildenbrand wrote:
> On 18.02.25 04:55, Alistair Popple wrote:
> > Currently fs dax pages are considered free when the refcount drops to
> > one and their refcounts are not increased when mapped via PTEs or
> > decreased when un
PUD-sized folios so we don't support for
that for now.
Signed-off-by: Alistair Popple
Acked-by: David Hildenbrand
Reviewed-by: Dan Williams
---
Changes for v8:
- Rebase on mm-unstable, only a minor conflict due to code addition
at the same place.
Changes for v6:
- Minor comment
: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v7:
- Fix smatch warning, also reported by Dan and Darrick
- Make sure xfs_break_layouts() can return -ERESTARTSYS, reported by
Darrick
- Use common definition of dax_page_is_idle()
- Removed misplaced hunk changing madvise
to remove the pgmap refcounting
that is currently done in mm/gup.c.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v8:
- Rebased on mm-unstable - conflicts with Matthew's earlier changes.
- Made dax_folio_put() easier to read thanks to David's s
PCI P2PDMA pages are not mapped with pXX_devmap PTEs therefore the
check in __gup_device_huge() is redundant. Remove it
Signed-off-by: Alistair Popple
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Wiliams
Acked-by: David Hildenbrand
---
mm/gup.c | 5 -
1 file changed, 5 deletions
L, implying it is present in at
least one address space. This also makes it easier for a future change to
detect when a page is first mapped into an address space which requires
special handling.
Signed-off-by: Alistair Popple
---
Changes for v8:
- Rebased on mm-unstable which includes Matthe
t the pages normally as defined by vm_normal_page().
Signed-off-by: Alistair Popple
---
drivers/dax/device.c | 15 +--
mm/memremap.c| 13 ++---
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index bc871a3..32
Gorbik
Cc: Christian Borntraeger
Cc: Sven Schnelle
Cc: Jan Kara
Cc: Matthew Wilcox
Cc: Christoph Hellwig
Cc: Alistair Popple
Signed-off-by: Dan Williams
---
Documentation/filesystems/dax.rst | 1 -
drivers/s390/block/Kconfig| 12 ++--
drivers/s390/block/dcssblk.c
-off-by: Alistair Popple
Acked-by: David Hildenbrand
---
Changes for v8:
- Remove temp suggested by David.
Changes for v7:
- Fix vmf_insert_page_mkwrite by removing pfn gunk as suggested by
David.
Updates from v2:
- Rename function to make not DAX specific
- Split the
Longterm pinning of FS DAX pages should already be disallowed by
various pXX_devmap checks. However a future change will cause these
checks to be invalid for FS DAX pages so make
folio_is_longterm_pinnable() return false for FS DAX pages.
Signed-off-by: Alistair Popple
Reviewed-by: John Hubbard
(). This is because
PTE faults require only a subpage of the folio to be PTE mapped rather than
the entire folio. It would be possible to add this context somewhere but
callers already need to handle PTE faults and PMD faults separately so a
more generic function is not useful.
Signed-off-by: Alistair
current mechanism, vmf_insert_pfn_pud, which
simply inserts a special devmap PUD entry into the page table without
holding a reference to the page for the mapping.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
Acked-by: David Hildenbrand
---
Changes for v7:
- Added a comment
In preparation for using insert_page() for DAX, enhance
insert_page_into_pte_locked() to handle establishing writable
mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a
PTE which bypasses the typical set_pte_range() in finish_fault.
Signed-off-by: Alistair Popple
Suggested-by
>pgmap.
The page->pgmap field must be common to all pages within a folio, even
if the folio spans memory sections. Therefore pgmap is the same for
both head and tail pages and can be moved into the folio and we can
use the standard scheme to find compound_head from a tail page.
Signed-off-
refcount as
required. P2PDMA uses vm_insert_page() to map the page, and that
requires a non-zero reference count when initialising the page so set
that when the page is first mapped.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
Acked-by: David Hildenbrand
---
Changes since v2
ystem block to be freed will not wait for the
remote access to complete. Therefore a busy block may be reallocated to a
new file leading to corruption.
Signed-off-by: Alistair Popple
---
Changes for v7:
- Don't take locks during inode eviction as suggested by Darrick and
therefore
to make it clear that it may advance the
iterator state.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
fs/dax.c | 50 +-
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index b35f538..f5fdb43 1006
when the file-system
calls dax_break_mapping() as part of it's truncate operation. This
ensures only idle pages can be removed from the FS DAX page-cache and
makes it easy to detect if a file-system hasn't called
dax_break_mapping() prior to a truncate operation.
Signed-off-by:
A FS DAX page is considered idle when its refcount drops to one. This
is currently open-coded in all file systems supporting FS DAX. Move
the idle detection to a common function to make future changes easier.
Signed-off-by: Alistair Popple
Reviewed-by: Jan Kara
Reviewed-by: Christoph Hellwig
ts defined.
It also almost certainly allows further clean-up of the devmap managed
functions, but I have left that as a future improvment. It also
enables support for compound ZONE_DEVICE pages which is one of my
primary motivators for doing this work.
Signed-off-by: Alistair Popple
Tested-by: Alison
user-space
with mapping_mapped() and returns early if not, skipping the check for
DMA busy pages. This is wrong as pages may still be undergoing DMA
access even if they have subsequently been unmapped from
user-space. Fix this by dropping the check for mapping_mapped().
Signed-off-by: Alistair
to fuse_dax_break_layouts()
which will invalidate the entire file range to
dax_layout_busy_page_range().
Signed-off-by: Alistair Popple
Co-developed-by: Dan Williams
Signed-off-by: Dan Williams
Reviewed-by: Balbir Singh
Fixes: 6ae330cad6ef ("virtiofs: serialize truncate/punch_hole and dax
On Mon, Feb 10, 2025 at 07:45:09PM +0100, David Hildenbrand wrote:
> On 04.02.25 23:48, Alistair Popple wrote:
> > Currently DAX folio/page reference counts are managed differently to normal
> > pages. To allow these to be managed the same as normal pages introduce
> > vmf_i
On Thu, Feb 06, 2025 at 09:50:07PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > On Mon, Jan 13, 2025 at 07:35:07PM -0800, Dan Williams wrote:
> > > Alistair Popple wrote:
> >
> > [...]
> >
> > > ...and here is that aformentioned patch:
&
On Tue, Feb 04, 2025 at 11:06:08AM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > On Tue, Jan 14, 2025 at 10:50:49AM -0800, Dan Williams wrote:
> > > Alistair Popple wrote:
> > > > The devmap PTE special bit was used to detect mappings of FS DAX
> > &
In preparation for using insert_page() for DAX, enhance
insert_page_into_pte_locked() to handle establishing writable
mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a
PTE which bypasses the typical set_pte_range() in finish_fault.
Signed-off-by: Alistair Popple
Suggested-by
t the pages normally as defined by vm_normal_page().
Signed-off-by: Alistair Popple
---
drivers/dax/device.c | 15 +--
mm/memremap.c| 13 ++---
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index 6d74e62..fd
to remove the pgmap refcounting
that is currently done in mm/gup.c.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v7:
- s/dax_device_folio_init/dax_folio_init/ as suggested by Dan
- s/dax_folio_share_put/dax_folio_put/
Changes since v2:
Based on some questions
Gorbik
Cc: Christian Borntraeger
Cc: Sven Schnelle
Cc: Jan Kara
Cc: Matthew Wilcox
Cc: Christoph Hellwig
Cc: Alistair Popple
Signed-off-by: Dan Williams
---
Documentation/filesystems/dax.rst | 1 -
drivers/s390/block/Kconfig| 12 ++--
drivers/s390/block/dcssblk.c
current mechanism, vmf_insert_pfn_pud, which
simply inserts a special devmap PUD entry into the page table without
holding a reference to the page for the mapping.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v7:
- Added a comment clarifying why we can insert without
Longterm pinning of FS DAX pages should already be disallowed by
various pXX_devmap checks. However a future change will cause these
checks to be invalid for FS DAX pages so make
folio_is_longterm_pinnable() return false for FS DAX pages.
Signed-off-by: Alistair Popple
Reviewed-by: John Hubbard
(). This is because
PTE faults require only a subpage of the folio to be PTE mapped rather than
the entire folio. It would be possible to add this context somewhere but
callers already need to handle PTE faults and PMD faults separately so a
more generic function is not useful.
Signed-off-by: Alistair
PUD-sized folios so we don't support for
that for now.
Signed-off-by: Alistair Popple
Acked-by: David Hildenbrand
Reviewed-by: Dan Williams
---
Changes for v6:
- Minor comment formatting fix
- Add an additional check for CONFIG_TRANSPARENT_HUGEPAGE to fix a
buil
-off-by: Alistair Popple
---
Changes for v7:
- Fix vmf_insert_page_mkwrite by removing pfn gunk as suggested by
David.
Updates from v2:
- Rename function to make not DAX specific
- Split the insert_page_into_pte_locked() change into a separate
patch.
Updates from v1:
- Re-arrange
>pgmap.
The page->pgmap field must be common to all pages within a folio, even
if the folio spans memory sections. Therefore pgmap is the same for
both head and tail pages and can be moved into the folio and we can
use the standard scheme to find compound_head from a tail page.
Signed-off-
refcount as
required. P2PDMA uses vm_insert_page() to map the page, and that
requires a non-zero reference count when initialising the page so set
that when the page is first mapped.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
Acked-by: David Hildenbrand
---
Changes since v2
PCI P2PDMA pages are not mapped with pXX_devmap PTEs therefore the
check in __gup_device_huge() is redundant. Remove it
Signed-off-by: Alistair Popple
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Wiliams
Acked-by: David Hildenbrand
---
mm/gup.c | 5 -
1 file changed, 5 deletions
when the file-system
calls dax_break_mapping() as part of it's truncate operation. This
ensures only idle pages can be removed from the FS DAX page-cache and
makes it easy to detect if a file-system hasn't called
dax_break_mapping() prior to a truncate operation.
Signed-off-by:
L, implying it is present in at
least one address space. This also makes it easier for a future change to
detect when a page is first mapped into an address space which requires
special handling.
Signed-off-by: Alistair Popple
---
Changes for v7:
- Fix for checking when creating a
ystem block to be freed will not wait for the
remote access to complete. Therefore a busy block may be reallocated to a
new file leading to corruption.
Signed-off-by: Alistair Popple
---
Changes for v7:
- Don't take locks during inode eviction as suggested by Darrick and
therefore
: Alistair Popple
Reviewed-by: Dan Williams
---
Changes for v7:
- Fix smatch warning, also reported by Dan and Darrick
- Make sure xfs_break_layouts() can return -ERESTARTSYS, reported by
Darrick
- Use common definition of dax_page_is_idle()
- Removed misplaced hunk changing madvise
A FS DAX page is considered idle when its refcount drops to one. This
is currently open-coded in all file systems supporting FS DAX. Move
the idle detection to a common function to make future changes easier.
Signed-off-by: Alistair Popple
Reviewed-by: Jan Kara
Reviewed-by: Christoph Hellwig
user-space
with mapping_mapped() and returns early if not, skipping the check for
DMA busy pages. This is wrong as pages may still be undergoing DMA
access even if they have subsequently been unmapped from
user-space. Fix this by dropping the check for mapping_mapped().
Signed-off-by: Alistair
to make it clear that it may advance the
iterator state.
Signed-off-by: Alistair Popple
Reviewed-by: Dan Williams
---
fs/dax.c | 50 +-
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 5133568..d010c10 1006
to fuse_dax_break_layouts()
which will invalidate the entire file range to
dax_layout_busy_page_range().
Signed-off-by: Alistair Popple
Co-developed-by: Dan Williams
Signed-off-by: Dan Williams
Fixes: 6ae330cad6ef ("virtiofs: serialize truncate/punch_hole and dax fault
path")
Cc: V
ts defined.
It also almost certainly allows further clean-up of the devmap managed
functions, but I have left that as a future improvment. It also
enables support for compound ZONE_DEVICE pages which is one of my
primary motivators for doing this work.
Signed-off-by: Alistair Popple
Tested-by: Alison
On Mon, Jan 13, 2025 at 10:12:41PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > Device DAX pages are currently not reference counted when mapped,
> > instead relying on the devmap PTE bit to ensure mapping code will not
> > get/put references. This requires specia
On Mon, Jan 13, 2025 at 06:42:46PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > At present mlock skips ptes mapping ZONE_DEVICE pages. A future change
> > to remove pmd_devmap will allow pmd_trans_huge_lock() to return
> > ZONE_DEVICE folios so make sure we c
On Tue, Jan 14, 2025 at 05:45:46PM +0100, David Hildenbrand wrote:
> On 14.01.25 03:28, Dan Williams wrote:
> > Alistair Popple wrote:
> > > The procfs mmu files such as smaps and pagemap currently ignore devdax and
> > > fsdax pages because these pages are consider
On Tue, Jan 14, 2025 at 03:59:31PM +0100, David Hildenbrand wrote:
> On 10.01.25 07:00, Alistair Popple wrote:
> > Zone device pages are used to represent various type of device memory
> > managed by device drivers. Currently compound zone device pages are
> > not suppo
On Tue, Jan 14, 2025 at 09:44:38PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> [..]
> > > How does this case happen? I don't think any page would ever enter with
> > > both ->mapping and ->share set, right?
> >
> > Sigh. You're right
On Tue, Jan 14, 2025 at 10:50:49AM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > The devmap PTE special bit was used to detect mappings of FS DAX
> > pages. This tracking was required to ensure the generic mm did not
> > manipulate the page reference counts as FS DAX
On Tue, Jan 14, 2025 at 09:22:00AM -0800, Dan Williams wrote:
> David Hildenbrand wrote:
> > > +vm_fault_t vmf_insert_folio_pmd(struct vm_fault *vmf, struct folio
> > > *folio, bool write)
> > > +{
> > > + struct vm_area_struct *vma = vmf->vma;
> > > + unsigned long addr = vmf->address & PMD_MASK;
On Tue, Jan 14, 2025 at 05:22:15PM +0100, David Hildenbrand wrote:
> On 10.01.25 07:00, Alistair Popple wrote:
> > Currently DAX folio/page reference counts are managed differently to
> > normal pages. To allow these to be managed the same as normal pages
> > introduce vmf_i
On Tue, Jan 14, 2025 at 05:15:54PM +0100, David Hildenbrand wrote:
> On 10.01.25 07:00, Alistair Popple wrote:
> > Currently to map a DAX page the DAX driver calls vmf_insert_pfn. This
> > creates a special devmap PTE entry for the pfn but does not take a
> > reference on
On Mon, Jan 13, 2025 at 05:08:31PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > In preparation for using insert_page() for DAX, enhance
> > insert_page_into_pte_locked() to handle establishing writable
> > mappings. Recall that DAX returns VM_FAULT_NOPAGE after
On Mon, Jan 13, 2025 at 04:52:34PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > PAGE_MAPPING_DAX_SHARED is the same as PAGE_MAPPING_ANON.
>
> I think a bit a bit more detail is warranted, how about?
>
> The page ->mapping pointer can have magic values like
&
On Sun, Jan 12, 2025 at 06:49:40PM -0800, Darrick J. Wong wrote:
> On Mon, Jan 13, 2025 at 11:57:18AM +1100, Alistair Popple wrote:
> > On Fri, Jan 10, 2025 at 08:50:19AM -0800, Darrick J. Wong wrote:
> > > On Fri, Jan 10, 2025 at 05:00:35PM +1100, Alistair Popple wrote:
> &g
On Fri, Jan 10, 2025 at 08:54:55AM -0800, Darrick J. Wong wrote:
> On Fri, Jan 10, 2025 at 05:00:49PM +1100, Alistair Popple wrote:
> > Currently fs dax pages are considered free when the refcount drops to
> > one and their refcounts are not increased when mapped via PTEs or
>
On Fri, Jan 10, 2025 at 07:35:57PM -0800, Dan Williams wrote:
> Andrew Morton wrote:
> > On Thu, 9 Jan 2025 23:05:56 -0800 Dan Williams
> > wrote:
> >
> > > > - Remove PTE_DEVMAP definitions from Loongarch which were added since
> > > >this series was initially written.
> > > [..]
> > > >
On Fri, Jan 10, 2025 at 08:50:19AM -0800, Darrick J. Wong wrote:
> On Fri, Jan 10, 2025 at 05:00:35PM +1100, Alistair Popple wrote:
> > File systems call dax_break_mapping() prior to reallocating file
> > system blocks to ensure the page is not undergoing any DMA or other
> >
On Fri, Jan 10, 2025 at 08:44:38AM -0800, Darrick J. Wong wrote:
> On Fri, Jan 10, 2025 at 05:00:33PM +1100, Alistair Popple wrote:
> > Prior to freeing a block file systems supporting FS DAX must check
> > that the associated pages are both unmapped from user-space and not
> &
DEVMAP PTEs are no longer required to support ZONE_DEVICE so remove
them.
Signed-off-by: Alistair Popple
Suggested-by: Chunyan Zhang
Reviewed-by: Björn Töpel
---
arch/riscv/Kconfig| 1 -
arch/riscv/include/asm/pgtable-64.h | 20
arch/riscv/include
Now that DAX and all other reference counts to ZONE_DEVICE pages are
managed normally there is no need for the special devmap PTE/PMD/PUD
page table bits. So drop all references to these, freeing up a
software defined page table bit on architectures supporting it.
Signed-off-by: Alistair Popple
1 - 100 of 698 matches
Mail list logo