search for: folio

Displaying 20 results from an estimated 47 matches for "folio".

Did you mean: folin
2024 Nov 13
2
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
...> I'd really like to abstract hugetlb handling if possible. The way it stands > it's just very odd. There might be ways to make that better. I haven't really been looking too hard at making that special handling go away. > We'll need some reliable way to identify these folios that need care. > guest_memfd will be using folio->mapcount for now, so for now we couldn't > set a page type like hugetlb does. If hugetlb can set lru.next at a certain point, then guestmemfd could set a page type at a similar point, no? > > Also how does this translate to Ma...
2022 Jul 08
0
[PATCH v2 07/19] mm/migrate: Convert expected_page_refs() to folio_expected_refs()
On Thu, Jul 07, 2022 at 07:50:17PM -0700, Hugh Dickins wrote: > On Wed, 8 Jun 2022, Matthew Wilcox (Oracle) wrote: > > > Now that both callers have a folio, convert this function to > > take a folio & rename it. > > > > Signed-off-by: Matthew Wilcox (Oracle) <willy at infradead.org> > > Reviewed-by: Christoph Hellwig <hch at lst.de> > > --- > > mm/migrate.c | 19 ++++++++++++------- > > 1 fil...
2022 Jul 08
0
[PATCH v2 07/19] mm/migrate: Convert expected_page_refs() to folio_expected_refs()
On Thu, Jul 07, 2022 at 07:50:17PM -0700, Hugh Dickins wrote: > On Wed, 8 Jun 2022, Matthew Wilcox (Oracle) wrote: > > > Now that both callers have a folio, convert this function to > > take a folio & rename it. > > > > Signed-off-by: Matthew Wilcox (Oracle) <willy at infradead.org> > > Reviewed-by: Christoph Hellwig <hch at lst.de> > > --- > > mm/migrate.c | 19 ++++++++++++------- > > 1 fil...
2023 Mar 07
3
remove most callers of write_one_page v4
Hi all, this series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. Changes since v3: - drop all patches merged in v6.3-rc1 - re-add the jfs patch Changes since v2: - more minix error handling fixes Changes since v1: - drop the btrfs changes (queue up in the btrfs tree) - drop the finaly move to
2023 Mar 30
4
[PATCH v2] mm: Take a page reference when removing device exclusive entries
...ndling code does not hold the PTL when taking the page lock. This means if there are multiple threads faulting concurrently on the device exclusive entry one will remove the entry whilst others will wait on the page lock without holding a reference. This can lead to threads locking or waiting on a folio with a zero refcount. Whilst mmap_lock prevents the pages getting freed via munmap() they may still be freed by a migration. This leads to warnings such as PAGE_FLAGS_CHECK_AT_FREE due to the page being locked when the refcount drops to zero. Fix this by trying to take a reference on the folio bef...
2024 Nov 12
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
...ping you'll find some more time to explain what exactly you don't >> like, because this series only refactors what we already have. >> >> I enjoy seeing the special casing (especially hugetlb) gone from mm/swap.c. >> >> I don't particularly enjoy overlaying folio->lru, primarily because we have >> to temporarily "evacuate" it when someone wants to make use of folio->lru >> (e.g., hugetlb isolation). So it's not completely "sticky", at least for >> hugetlb. > > This is really the worst part of it though...
2024 Nov 12
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
...; > I'm hoping you'll find some more time to explain what exactly you don't > like, because this series only refactors what we already have. > > I enjoy seeing the special casing (especially hugetlb) gone from mm/swap.c. > > I don't particularly enjoy overlaying folio->lru, primarily because we have > to temporarily "evacuate" it when someone wants to make use of folio->lru > (e.g., hugetlb isolation). So it's not completely "sticky", at least for > hugetlb. This is really the worst part of it though And, IMHO, seems like...
2023 Jul 02
0
+ fs-buffer-clean-up-block_commit_write.patch added to mm-unstable branch
...+++------ 1 file changed, 4 insertions(+), 6 deletions(-) --- a/fs/buffer.c~fs-buffer-clean-up-block_commit_write +++ a/fs/buffer.c @@ -2180,8 +2180,7 @@ int __block_write_begin(struct page *pag } EXPORT_SYMBOL(__block_write_begin); -static int __block_commit_write(struct inode *inode, struct folio *folio, - size_t from, size_t to) +static int __block_commit_write(struct folio *folio, size_t from, size_t to) { size_t block_start, block_end; bool partial = false; @@ -2277,7 +2276,7 @@ int block_write_end(struct file *file, s flush_dcache_folio(folio); /* This could be a short (even...
2023 Jul 02
0
+ fs-convert-block_commit_write-to-return-void.patch added to mm-unstable branch
...fer_head.h | 2 +- 5 files changed, 13 insertions(+), 23 deletions(-) --- a/fs/buffer.c~fs-convert-block_commit_write-to-return-void +++ a/fs/buffer.c @@ -2180,7 +2180,7 @@ int __block_write_begin(struct page *pag } EXPORT_SYMBOL(__block_write_begin); -static int __block_commit_write(struct folio *folio, size_t from, size_t to) +static void __block_commit_write(struct folio *folio, size_t from, size_t to) { size_t block_start, block_end; bool partial = false; @@ -2215,7 +2215,6 @@ static int __block_commit_write(struct f */ if (!partial) folio_mark_uptodate(folio); - return 0;...
2024 Nov 08
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
On 08.11.24 18:05, Jason Gunthorpe wrote: > On Fri, Nov 08, 2024 at 04:20:30PM +0000, Fuad Tabba wrote: >> Some folios, such as hugetlb folios and zone device folios, >> require special handling when the folio's reference count reaches >> 0, before being freed. Moreover, guest_memfd folios will likely >> require special handling to notify it once a folio's reference >> count reaches...
2025 Jan 24
3
[PATCH v1 0/2] nouveau/svm: fix + cleanup for nouveau_atomic_range_fault()
...t redhat.com> Cc: Lyude Paul <lyude at redhat.com> Cc: Danilo Krummrich <dakr at kernel.org> Cc: David Airlie <airlied at gmail.com> Cc: Simona Vetter <simona at ffwll.ch> Cc: Alistair Popple <apopple at nvidia.com> David Hildenbrand (2): nouveau/svm: fix missing folio unlock + put after make_device_exclusive_range() nouveau/svm: don't initialize ret in nouveau_atomic_range_fault() drivers/gpu/drm/nouveau/nouveau_svm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- 2.47.1
2024 Nov 12
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
.... I think this is a bad idea. I'm hoping you'll find some more time to explain what exactly you don't like, because this series only refactors what we already have. I enjoy seeing the special casing (especially hugetlb) gone from mm/swap.c. I don't particularly enjoy overlaying folio->lru, primarily because we have to temporarily "evacuate" it when someone wants to make use of folio->lru (e.g., hugetlb isolation). So it's not completely "sticky", at least for hugetlb. Overlaying folio->mapping, similar to how "struct movable_operations&...
2023 Mar 29
1
[PATCH] mm: Take a page reference when removing device exclusive entries
On Tue, Mar 28, 2023 at 01:14:34PM +1100, Alistair Popple wrote: > +++ b/mm/memory.c > @@ -3623,8 +3623,19 @@ static vm_fault_t remove_device_exclusive_entry(struct vm_fault *vmf) > struct vm_area_struct *vma = vmf->vma; > struct mmu_notifier_range range; > > - if (!folio_lock_or_retry(folio, vma->vm_mm, vmf->flags)) > + /* > + * We need a page reference to lock the page because we don't > + * hold the PTL so a racing thread can remove the > + * device-exclusive entry and unmap the page. If the page is > + * free the entry must have been...
2024 Nov 12
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
On Mon, Nov 11, 2024 at 08:26:54AM +0000, Fuad Tabba wrote: > Thanks for your comments Jason, and for clarifying my cover letter > David. I think David has covered everything, and I'll make sure to > clarify this in the cover letter when I respin. I don't want you to respin. I think this is a bad idea.
2024 Nov 12
0
[RFC PATCH v1 06/10] mm/hugetlb: use separate folio->_hugetlb_list for hugetlb-internals
...e accessor in hugetlb_cgroup.h. >> * @_hugetlb_cgroup_rsvd: Do not use directly, use accessor in hugetlb_cgroup.h. >> * @_hugetlb_hwpoison: Do not use directly, call raw_hwp_list_head(). >> + * @_hugetlb_list: To be used in hugetlb core code only. >> * @_deferred_list: Folios to be split under memory pressure. >> * @_unused_slab_obj_exts: Placeholder to match obj_exts in struct slab. >> * >> @@ -397,6 +398,17 @@ struct folio { >> }; >> struct page __page_2; >> }; >> + union { >> + struct { >> + unsigned...
2023 Jun 18
11
[PATCH v1 0/5] clean up block_commit_write
*** BLURB HERE *** Bean Huo (5): fs/buffer: clean up block_commit_write fs/buffer.c: convert block_commit_write to return void ext4: No need to check return value of block_commit_write() fs/ocfs2: No need to check return value of block_commit_write() udf: No need to check return value of block_commit_write() fs/buffer.c | 24 +++++++-----------------
2023 Mar 28
3
[PATCH] mm: Take a page reference when removing device exclusive entries
...-) diff --git a/mm/memory.c b/mm/memory.c index 8c8420934d60..b499bd283d8e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3623,8 +3623,19 @@ static vm_fault_t remove_device_exclusive_entry(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; struct mmu_notifier_range range; - if (!folio_lock_or_retry(folio, vma->vm_mm, vmf->flags)) + /* + * We need a page reference to lock the page because we don't + * hold the PTL so a racing thread can remove the + * device-exclusive entry and unmap the page. If the page is + * free the entry must have been removed already. + */ +...
2024 Nov 11
1
[RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
Hi Jason and David, On Fri, 8 Nov 2024 at 19:33, David Hildenbrand <david at redhat.com> wrote: > > On 08.11.24 18:05, Jason Gunthorpe wrote: > > On Fri, Nov 08, 2024 at 04:20:30PM +0000, Fuad Tabba wrote: > >> Some folios, such as hugetlb folios and zone device folios, > >> require special handling when the folio's reference count reaches > >> 0, before being freed. Moreover, guest_memfd folios will likely > >> require special handling to notify it once a folio's reference > &g...
2023 Mar 30
1
[PATCH] mm: Take a page reference when removing device exclusive entries
John Hubbard <jhubbard at nvidia.com> writes: > On 3/28/23 20:16, Matthew Wilcox wrote: > ... >>> + if (!get_page_unless_zero(vmf->page)) >>> + return 0; >> From a folio point of view: what the hell are you doing here? Tail >> pages don't have individual refcounts; all the refcounts are actually I had stuck with using the page because none of this stuff (yet) supports compound pages anyway so we shouldn't see a tail page anyway. But point taken, I a...
2023 Mar 29
1
[PATCH] mm: Take a page reference when removing device exclusive entries
On 3/28/23 20:16, Matthew Wilcox wrote: ... >> + if (!get_page_unless_zero(vmf->page)) >> + return 0; > > From a folio point of view: what the hell are you doing here? Tail > pages don't have individual refcounts; all the refcounts are actually ohh, and I really should have caught that too. I plead spending too much time recently in a somewhat more driver-centric mindset, and failing to mentally shift gear...