search for: isolatepag

Displaying 20 results from an estimated 35 matches for "isolatepag".

Did you mean: isolatepage
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...iff --git a/include/linux/fs.h b/include/linux/fs.h index b4d71b5..de463b9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -368,6 +368,9 @@ struct address_space_operations { */ int (*migratepage) (struct address_space *, struct page *, struct page *, enum migrate_mode); + int (*isolatepage)(struct page *); + int (*putbackpage)(struct page *); + int (*launder_page) (struct page *); int (*is_partially_uptodate) (struct page *, unsigned long, unsigned long); diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 4b3736f..715b5b2 100644 --- a/include/linux/pagema...
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...iff --git a/include/linux/fs.h b/include/linux/fs.h index b4d71b5..de463b9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -368,6 +368,9 @@ struct address_space_operations { */ int (*migratepage) (struct address_space *, struct page *, struct page *, enum migrate_mode); + int (*isolatepage)(struct page *); + int (*putbackpage)(struct page *); + int (*launder_page) (struct page *); int (*is_partially_uptodate) (struct page *, unsigned long, unsigned long); diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 4b3736f..715b5b2 100644 --- a/include/linux/pagema...
2015 Apr 07
0
[PATCH] add generic callbacks into compaction
.../linux/fs.h > index b4d71b5..de463b9 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -368,6 +368,9 @@ struct address_space_operations { > */ > int (*migratepage) (struct address_space *, > struct page *, struct page *, enum migrate_mode); > + int (*isolatepage)(struct page *); It would be useful if isolatepage is aware of migrate_mode and address_space For exmaple, if it is MIGRATE_SYNC, driver could wait some of work to finish. >From address_space, driver can get private data registered when isolate/putback happens. > + int (*putbackpage)(str...
2015 Jul 31
1
[PATCH 2/4] mm/compaction: enable mobile-page migration
...isolate pages being released, > + * lets be sure we have the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (unlikely(!trylock_page(page))) > + goto out_putpage; > + > + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) > + goto out_not_isolated; I cannot know how isolate_mobilepage is called by upper layer because this patch doesn't include it. Anyway, why we need such many checks to prove it's mobile page? mobile_page() { page->mapping && (PageMobile(page) || PageBalloon(page)); } A...
2015 Jul 31
1
[PATCH 2/4] mm/compaction: enable mobile-page migration
...isolate pages being released, > + * lets be sure we have the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (unlikely(!trylock_page(page))) > + goto out_putpage; > + > + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) > + goto out_not_isolated; I cannot know how isolate_mobilepage is called by upper layer because this patch doesn't include it. Anyway, why we need such many checks to prove it's mobile page? mobile_page() { page->mapping && (PageMobile(page) || PageBalloon(page)); } A...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...isolate pages being released, > + * lets be sure we have the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (unlikely(!trylock_page(page))) > + goto out_putpage; > + > + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) > + goto out_not_isolated; > + ret = page->mapping->a_ops->isolatepage(page, mode); > + if (!ret) > + goto out_not_isolated; > + unlock_page(page); > + return ret; > + > +out_not_isolated: > + unlock_page(page); > +out_putpage: > + put_page(page); >...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...isolate pages being released, > + * lets be sure we have the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (unlikely(!trylock_page(page))) > + goto out_putpage; > + > + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) > + goto out_not_isolated; > + ret = page->mapping->a_ops->isolatepage(page, mode); > + if (!ret) > + goto out_not_isolated; > + unlock_page(page); > + return ret; > + > +out_not_isolated: > + unlock_page(page); > +out_putpage: > + put_page(page); >...
2015 Jul 13
14
[PATCH 0/4] enable migration of driver pages
...a corner-case. This patch have the balloon driver migration be called by the generic interface. This patch set combines 4 patches. 1. patch 1/4: get inode from anon_inodes This patch adds new interface to create inode from anon_inodes. 2. patch 2/4: framework to isolate/migrate/putback page Add isolatepage, putbackpage into address_space_operations and wrapper function to call them. 3. patch 3/4: apply the framework into balloon driver The balloon driver is applied into the framework. It gets a inode from anon_inodes and register operations in the inode. The kernel compaction calls generic interfac...
2015 Jul 13
14
[PATCH 0/4] enable migration of driver pages
...a corner-case. This patch have the balloon driver migration be called by the generic interface. This patch set combines 4 patches. 1. patch 1/4: get inode from anon_inodes This patch adds new interface to create inode from anon_inodes. 2. patch 2/4: framework to isolate/migrate/putback page Add isolatepage, putbackpage into address_space_operations and wrapper function to call them. 3. patch 3/4: apply the framework into balloon driver The balloon driver is applied into the framework. It gets a inode from anon_inodes and register operations in the inode. The kernel compaction calls generic interfac...
2015 Jul 07
0
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...der migration, + * or to avoid attempting to isolate pages being released, + * lets be sure we have the page lock + * before proceeding with the mobile page isolation steps. + */ + if (likely(trylock_page(page))) { + if (mobile_page(page) && + page->mapping->a_ops->isolatepage) { + ret = page->mapping->a_ops->isolatepage(page, + mode); + unlock_page(page); + return ret; + } + unlock_page(page); + } + put_page(page); + } + return false; +} + +static inline void putback_mobilepage(struct page *page) +{ + /* + * 'lock_page()' stabil...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (likely(trylock_page(page))) { > + if (mobile_page(page) && > + page->mapping->a_ops->isolatepage) { > + ret = page->mapping->a_ops->isolatepage(page, > + mode); > + unlock_page(page); > + return ret; > +...
2015 Jul 13
0
[PATCH 2/4] mm/compaction: enable mobile-page migration
...on, + * or to avoid attempting to isolate pages being released, + * lets be sure we have the page lock + * before proceeding with the mobile page isolation steps. + */ + if (unlikely(!trylock_page(page))) + goto out_putpage; + + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) + goto out_not_isolated; + ret = page->mapping->a_ops->isolatepage(page, mode); + if (!ret) + goto out_not_isolated; + unlock_page(page); + return ret; + +out_not_isolated: + unlock_page(page); +out_putpage: + put_page(page); +out: + return ret; +} + +static inline void putback_mobile...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...the page lock > + * before proceeding with the mobile page isolation steps. > + */ > + if (likely(trylock_page(page))) { > + if (mobile_page(page) && > + page->mapping->a_ops->isolatepage) { > + ret = page->mapping->a_ops->isolatepage(page, > + mode); > + unlock_page(page); > + return ret; > +...
2015 Jul 07
12
[RFCv3 0/5] enable migration of driver pages
...ion and kernel starts to compaction, zram and GPU driver cannot work with the kernel compaction. This patch set combines 5 patches. 1. patch 1/5: get inode from anon_inodes This patch adds new interface to create inode from anon_inodes. 2. patch 2/5: framework to isolate/migrate/putback page Add isolatepage, putbackpage into address_space_operations and wrapper function to call them 3. patch 3/5: apply the framework into balloon driver The balloon driver is applied into the framework. It gets a inode from anon_inodes and register operations in the inode. Any other drivers can register operations via...
2015 Jul 07
12
[RFCv3 0/5] enable migration of driver pages
...ion and kernel starts to compaction, zram and GPU driver cannot work with the kernel compaction. This patch set combines 5 patches. 1. patch 1/5: get inode from anon_inodes This patch adds new interface to create inode from anon_inodes. 2. patch 2/5: framework to isolate/migrate/putback page Add isolatepage, putbackpage into address_space_operations and wrapper function to call them 3. patch 3/5: apply the framework into balloon driver The balloon driver is applied into the framework. It gets a inode from anon_inodes and register operations in the inode. Any other drivers can register operations via...
2015 Jul 27
0
[PATCH 2/4] mm/compaction: enable mobile-page migration
...the page lock >> + * before proceeding with the mobile page isolation steps. >> + */ >> + if (unlikely(!trylock_page(page))) >> + goto out_putpage; >> + >> + if (!(mobile_page(page) && page->mapping->a_ops->isolatepage)) >> + goto out_not_isolated; >> + ret = page->mapping->a_ops->isolatepage(page, mode); >> + if (!ret) >> + goto out_not_isolated; >> + unlock_page(page); >> + return ret; >> + >> +out_not_...
2015 Jul 04
1
[RFCv2 4/5] mm/compaction: compaction calls generic migration
...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_page and only a...
2015 Jul 04
1
[RFCv2 4/5] mm/compaction: compaction calls generic migration
...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_page and only a...
2015 Jun 26
8
[RFCv2 0/5] enable migration of driver pages
Hello, This series try to enable migration of non-LRU pages, such as driver's page. My ARM-based platform occured severe fragmentation problem after long-term (several days) test. Sometimes even order-3 page allocation failed. It has memory size 512MB ~ 1024MB. 30% ~ 40% memory is consumed for graphic processing and 20~30 memory is reserved for zram. I found that many pages of GPU driver
2015 Jun 26
8
[RFCv2 0/5] enable migration of driver pages
Hello, This series try to enable migration of non-LRU pages, such as driver's page. My ARM-based platform occured severe fragmentation problem after long-term (several days) test. Sometimes even order-3 page allocation failed. It has memory size 512MB ~ 1024MB. 30% ~ 40% memory is consumed for graphic processing and 20~30 memory is reserved for zram. I found that many pages of GPU driver