search for: ext4_break_layout

Displaying 12 results from an estimated 12 matches for "ext4_break_layout".

Did you mean: ext4_break_layouts
2020 Nov 09
3
[PATCH v3 3/6] mm: support THP migration to device private memory
On Fri, Nov 06, 2020 at 01:26:50PM -0800, Ralph Campbell wrote: > > On 11/6/20 12:03 AM, Christoph Hellwig wrote: >> I hate the extra pin count magic here. IMHO we really need to finish >> off the series to get rid of the extra references on the ZONE_DEVICE >> pages first. > > First, thanks for the review comments. > > I don't like the extra refcount
2020 Sep 16
1
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On Mon, Sep 14, 2020 at 04:10:38PM -0700, Dan Williams wrote: > You also need to fix up ext4_break_layouts() and > xfs_break_dax_layouts() to expect ->_refcount is 0 instead of 1. This > also needs some fstests exposure. While we're at it, can we add a wait_fsdax_unref helper macro that hides the _refcount access from the file systems?
2020 Nov 11
0
[PATCH v3 3/6] mm: support THP migration to device private memory
...here are 3 states that are important: a) memory is free and not allocated to any file (page_ref_count() == 0). b) memory is allocated to a file and in the page cache (page_ref_count() == 1). c) some gup() or I/O has a reference even after calling unmap_mapping_pages() (page_ref_count() > 1). ext4_break_layouts() basically waits until the page_ref_count() == 1 with put_page() calling wake_up_var(&page->_refcount) to wake up ext4_break_layouts(). The current code doesn't seem to distinguish (a) and (b). If we want to use the 0->1 reference count to signal (c), then the page cache wou...
2020 Sep 25
1
[PATCH 1/2] ext4/xfs: add page refcount helper
...A filesystem uses this interface to determine if * any page in the mapping is busy, i.e. for DMA, or other * get_user_pages() usages. * diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index bf596467c234..d9f8ad55523a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3927,7 +3927,7 @@ int ext4_break_layouts(struct inode *inode) return 0; error = ___wait_var_event(&page->_refcount, - atomic_read(&page->_refcount) == 1, + dax_layout_is_idle_page(page), TASK_INTERRUPTIBLE, 0, 0, ext4_wait_dax_page(ei)); } while (error == 0); diff --git a/fs/xfs/xfs_file.c b/fs/xf...
2020 Sep 17
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
On 9/15/20 11:10 PM, Christoph Hellwig wrote: > On Mon, Sep 14, 2020 at 04:10:38PM -0700, Dan Williams wrote: >> You also need to fix up ext4_break_layouts() and >> xfs_break_dax_layouts() to expect ->_refcount is 0 instead of 1. This >> also needs some fstests exposure. > > While we're at it, can we add a wait_fsdax_unref helper macro that hides > the _refcount access from the file systems? Sure. I'll add a separate...
2020 Oct 01
0
[RFC PATCH v3 1/2] ext4/xfs: add page refcount helper
...ge *page = pfn_to_page(pfn); - if (page_ref_count(page) > 1) + if (!dax_layout_is_idle_page(page)) return page; } return NULL; diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index bf596467c234..4c3b80e68121 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3926,10 +3926,7 @@ int ext4_break_layouts(struct inode *inode) if (!page) return 0; - error = ___wait_var_event(&page->_refcount, - atomic_read(&page->_refcount) == 1, - TASK_INTERRUPTIBLE, 0, 0, - ext4_wait_dax_page(ei)); + error = dax_wait_page(ei, page, ext4_wait_dax_page); } while (error == 0);...
2020 Sep 25
0
[PATCH 1/2] ext4/xfs: add page refcount helper
...ermine if > * any page in the mapping is busy, i.e. for DMA, or other > * get_user_pages() usages. > * > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index bf596467c234..d9f8ad55523a 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -3927,7 +3927,7 @@ int ext4_break_layouts(struct inode *inode) > return 0; > > error = ___wait_var_event(&page->_refcount, > - atomic_read(&page->_refcount) == 1, > + dax_layout_is_idle_page(page), >...
2020 Sep 14
0
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...indly assumed that pages with refcount==0 were on an lru list. Since then, struct page has been reorganized to not collide the ->pgmap back pointer with the ->lru list and there have been other cleanups for page pinning that might make this incremental cleanup viable. You also need to fix up ext4_break_layouts() and xfs_break_dax_layouts() to expect ->_refcount is 0 instead of 1. This also needs some fstests exposure. > I have a modified THP migration patch series that applies on top of > this one and is cleaner since I don't have to add code to handle the > +1 reference count. The link...
2020 Sep 14
5
[PATCH] mm: remove 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. Signed-off-by: Ralph Campbell <rcampbell at
2020 Sep 14
2
[PATCH] mm: remove extra ZONE_DEVICE struct page refcount
...with refcount==0 were on an lru list. Since > then, struct page has been reorganized to not collide the ->pgmap back > pointer with the ->lru list and there have been other cleanups for > page pinning that might make this incremental cleanup viable. > > You also need to fix up ext4_break_layouts() and > xfs_break_dax_layouts() to expect ->_refcount is 0 instead of 1. This > also needs some fstests exposure. Got it. Thanks! >> I have a modified THP migration patch series that applies on top of >> this one and is cleaner since I don't have to add code to handle th...
2020 Sep 25
6
[RFC PATCH v2 0/2] mm: remove extra ZONE_DEVICE struct page refcount
Matthew Wilcox, Ira Weiny, and others have complained that ZONE_DEVICE struct page reference counting is ugly because they are "free" when the reference count is one instead of zero. This leads to explicit checks for ZONE_DEVICE pages in places like put_page(), GUP, THP splitting, and page migration which have to adjust the expected reference count when determining if the page is
2020 Oct 01
8
[RFC PATCH v3 0/2] mm: remove extra ZONE_DEVICE struct page refcount
This is still an RFC because after looking at the pmem/dax code some more, I realized that the ZONE_DEVICE struct pages are being inserted into the process' page tables with vmf_insert_mixed() and a zero refcount on the ZONE_DEVICE struct page. This is sort of OK because insert_pfn() increments the reference count on the pgmap which is what prevents memunmap_pages() from freeing the struct