search for: a_ops

Displaying 20 results from an estimated 196 matches for "a_ops".

2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...to see the new functions together with its user after all, OK. > I will just resend to change the tile from "mm/compaction" to > "mm/migration". OK! >> Also I'm a bit uncomfortable how isolate_movable_page() blindly expects that >> page->mapping->a_ops->isolate_page exists for PageMovable() pages. >> What if it's a false positive on a PG_reclaim page? Can we rely on >> PG_reclaim always (and without races) implying PageLRU() so that we >> don't even attempt isolate_movable_page()? > > For now, we shouldn't h...
2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...to see the new functions together with its user after all, OK. > I will just resend to change the tile from "mm/compaction" to > "mm/migration". OK! >> Also I'm a bit uncomfortable how isolate_movable_page() blindly expects that >> page->mapping->a_ops->isolate_page exists for PageMovable() pages. >> What if it's a false positive on a PG_reclaim page? Can we rely on >> PG_reclaim always (and without races) implying PageLRU() so that we >> don't even attempt isolate_movable_page()? > > For now, we shouldn't h...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...et(struct zone *zone, int order, > bool alloc_success); > extern bool compaction_restarting(struct zone *zone, int order); > > +static inline bool mobile_page(struct page *page) > +{ > + return page->mapping && page->mapping->a_ops && Dereferncing mapping->a_ops isn't safe without page-lock and isn't required: all mappings always have ->a_ops. > + (PageMobile(page) || PageBalloon(page)); > +} > + > +static inline bool isolate_mobilepage(struct page *page, isolate_mode_t mode)...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...et(struct zone *zone, int order, > bool alloc_success); > extern bool compaction_restarting(struct zone *zone, int order); > > +static inline bool mobile_page(struct page *page) > +{ > + return page->mapping && page->mapping->a_ops && Dereferncing mapping->a_ops isn't safe without page-lock and isn't required: all mappings always have ->a_ops. > + (PageMobile(page) || PageBalloon(page)); > +} > + > +static inline bool isolate_mobilepage(struct page *page, isolate_mode_t mode)...
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...page *page); +extern int balloon_page_migrate(struct address_space *mapping, + struct page *newpage, + struct page *page, + enum migrate_mode mode); + +extern struct address_space +*balloon_mapping_alloc(struct balloon_dev_info *b_dev_info, + const struct address_space_operations *a_ops); + +static inline void balloon_mapping_free(struct address_space *balloon_mapping) +{ + kfree(balloon_mapping); +} /* * __is_movable_balloon_page - helper to perform @page PageBalloon tests @@ -123,6 +136,7 @@ static inline bool isolated_balloon_page(struct page *page) static inline void bal...
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...page *page); +extern int balloon_page_migrate(struct address_space *mapping, + struct page *newpage, + struct page *page, + enum migrate_mode mode); + +extern struct address_space +*balloon_mapping_alloc(struct balloon_dev_info *b_dev_info, + const struct address_space_operations *a_ops); + +static inline void balloon_mapping_free(struct address_space *balloon_mapping) +{ + kfree(balloon_mapping); +} /* * __is_movable_balloon_page - helper to perform @page PageBalloon tests @@ -123,6 +136,7 @@ static inline bool isolated_balloon_page(struct page *page) static inline void bal...
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...vable = PG_reclaim, > + PG_isolated = PG_owner_priv_1, Documentation should probably state that these fields alias and subsystem supporting the movable pages shouldn't use them elsewhere. Also I'm a bit uncomfortable how isolate_movable_page() blindly expects that page->mapping->a_ops->isolate_page exists for PageMovable() pages. What if it's a false positive on a PG_reclaim page? Can we rely on PG_reclaim always (and without races) implying PageLRU() so that we don't even attempt isolate_movable_page()? > }; > > #ifndef __GENERATING_BOUNDS_H > @@...
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...vable = PG_reclaim, > + PG_isolated = PG_owner_priv_1, Documentation should probably state that these fields alias and subsystem supporting the movable pages shouldn't use them elsewhere. Also I'm a bit uncomfortable how isolate_movable_page() blindly expects that page->mapping->a_ops->isolate_page exists for PageMovable() pages. What if it's a false positive on a PG_reclaim page? Can we rely on PG_reclaim always (and without races) implying PageLRU() so that we don't even attempt isolate_movable_page()? > }; > > #ifndef __GENERATING_BOUNDS_H > @@...
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...ter soft landing of current non-lru-no-mapped page migration to solve > current real field issues. yeah it makes sense. > > About the overriding problem of non-lru-mapped-page, I implemented dummy > driver as miscellaneous device and in test_mmap(file_operations.mmap), > I changed a_ops with my address_space_operations. > > int test_mmap(struct file *filp, struct vm_area_struct *vma) > { > filp->f_mapping->a_ops = &test_aops; > vma->vm_ops = &test_vm_ops; > vma->vm_private_data = filp->private_data; > ret...
2016 Jun 30
1
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...ter soft landing of current non-lru-no-mapped page migration to solve > current real field issues. yeah it makes sense. > > About the overriding problem of non-lru-mapped-page, I implemented dummy > driver as miscellaneous device and in test_mmap(file_operations.mmap), > I changed a_ops with my address_space_operations. > > int test_mmap(struct file *filp, struct vm_area_struct *vma) > { > filp->f_mapping->a_ops = &test_aops; > vma->vm_ops = &test_vm_ops; > vma->vm_private_data = filp->private_data; > ret...
2015 Apr 07
0
[PATCH] add generic callbacks into compaction
...age_migrate(struct address_space *mapping, > + struct page *newpage, > + struct page *page, > + enum migrate_mode mode); > + > +extern struct address_space > +*balloon_mapping_alloc(struct balloon_dev_info *b_dev_info, > + const struct address_space_operations *a_ops); > + > +static inline void balloon_mapping_free(struct address_space *balloon_mapping) > +{ > + kfree(balloon_mapping); > +} > > /* > * __is_movable_balloon_page - helper to perform @page PageBalloon tests > @@ -123,6 +136,7 @@ static inline bool isolated_balloon_pa...
2016 Apr 04
0
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...ed = PG_owner_priv_1, > > Documentation should probably state that these fields alias and > subsystem supporting the movable pages shouldn't use them elsewhere. Yeb. > > Also I'm a bit uncomfortable how isolate_movable_page() blindly expects that > page->mapping->a_ops->isolate_page exists for PageMovable() pages. > What if it's a false positive on a PG_reclaim page? Can we rely on > PG_reclaim always (and without races) implying PageLRU() so that we > don't even attempt isolate_movable_page()? For now, we shouldn't have such a false posi...
2015 Jul 04
1
[RFCv2 4/5] mm/compaction: compaction calls generic migration
...(!PageLRU(page)) { > - if (unlikely(balloon_page_movable(page))) { > - if (balloon_page_isolate(page)) { > + if (unlikely(driver_page_migratable(page))) { > + if (page->mapping->a_ops->isolatepage(page, > + isolate_mode)) { Dereferencing page->mapping isn't safe here. Page could be "truncated" from mapping at any time. As you can see balloon_page_isolate() calls get_page_unless_zero, trylock_...
2015 Jul 04
1
[RFCv2 4/5] mm/compaction: compaction calls generic migration
...(!PageLRU(page)) { > - if (unlikely(balloon_page_movable(page))) { > - if (balloon_page_isolate(page)) { > + if (unlikely(driver_page_migratable(page))) { > + if (page->mapping->a_ops->isolatepage(page, > + isolate_mode)) { Dereferencing page->mapping isn't safe here. Page could be "truncated" from mapping at any time. As you can see balloon_page_isolate() calls get_page_unless_zero, trylock_...
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote: > On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: >> On 06/16/2016 05:56 AM, Minchan Kim wrote: >>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: >>>> On 06/15/2016 08:02 AM, Minchan Kim wrote: >>>>> Hi, >>>>> >>>>> On Mon, Jun 13, 2016 at
2016 Jun 27
2
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
On 06/16/2016 11:07 AM, Minchan Kim wrote: > On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: >> On 06/16/2016 05:56 AM, Minchan Kim wrote: >>> On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: >>>> On 06/15/2016 08:02 AM, Minchan Kim wrote: >>>>> Hi, >>>>> >>>>> On Mon, Jun 13, 2016 at
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...struct page *page) > +{ > + struct address_space *mapping; > + > + WARN_ON(!PageLocked(page)); Why not VM_BUG_ON_PAGE as elsewhere? > + if (!__PageMovable(page)) > + goto out; Just return 0. > + > + mapping = page_mapping(page); > + if (mapping && mapping->a_ops && mapping->a_ops->isolate_page) > + return 1; > +out: > + return 0; > +} > +EXPORT_SYMBOL(PageMovable); > + > +void __SetPageMovable(struct page *page, struct address_space *mapping) > +{ > + VM_BUG_ON_PAGE(!PageLocked(page), page); > + VM_BUG_ON_PAGE((...
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...struct page *page) > +{ > + struct address_space *mapping; > + > + WARN_ON(!PageLocked(page)); Why not VM_BUG_ON_PAGE as elsewhere? > + if (!__PageMovable(page)) > + goto out; Just return 0. > + > + mapping = page_mapping(page); > + if (mapping && mapping->a_ops && mapping->a_ops->isolate_page) > + return 1; > +out: > + return 0; > +} > +EXPORT_SYMBOL(PageMovable); > + > +void __SetPageMovable(struct page *page, struct address_space *mapping) > +{ > + VM_BUG_ON_PAGE(!PageLocked(page), page); > + VM_BUG_ON_PAGE((...
2016 Jun 28
0
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...that. :) However, as I said, I want to do it after soft landing of current non-lru-no-mapped page migration to solve current real field issues. About the overriding problem of non-lru-mapped-page, I implemented dummy driver as miscellaneous device and in test_mmap(file_operations.mmap), I changed a_ops with my address_space_operations. int test_mmap(struct file *filp, struct vm_area_struct *vma) { filp->f_mapping->a_ops = &test_aops; vma->vm_ops = &test_vm_ops; vma->vm_private_data = filp->private_data; return 0; } test_aops should have *se...
2016 Mar 23
1
[PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration