search for: balloon_page_insert

Displaying 20 results from an estimated 89 matches for "balloon_page_insert".

2015 Jul 09
1
[RFCv3 3/5] mm/balloon: apply mobile page migratable into balloon
...back(struct page *page); > -extern int balloon_page_migrate(struct page *newpage, > +extern int balloon_page_migrate(struct address_space *mapping, > + struct page *newpage, > struct page *page, enum migrate_mode mode); > > /* > @@ -124,6 +130,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, > struct page *page) > { > __SetPageBalloon(page); > + page->mapping = balloon->inode->i_mapping; > SetPagePrivate(page); > set_page_private(page, (unsigned long)balloon); > list_add(&page->lru, &balloon...
2015 Jul 09
1
[RFCv3 3/5] mm/balloon: apply mobile page migratable into balloon
...back(struct page *page); > -extern int balloon_page_migrate(struct page *newpage, > +extern int balloon_page_migrate(struct address_space *mapping, > + struct page *newpage, > struct page *page, enum migrate_mode mode); > > /* > @@ -124,6 +130,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, > struct page *page) > { > __SetPageBalloon(page); > + page->mapping = balloon->inode->i_mapping; > SetPagePrivate(page); > set_page_private(page, (unsigned long)balloon); > list_add(&page->lru, &balloon...
2015 Jun 03
1
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...e) > */ > static inline bool isolated_balloon_page(struct page *page) > { > - return PageBalloon(page); > + return PageMigratable(page); > } > > /* > @@ -123,7 +138,8 @@ static inline bool isolated_balloon_page(struct page *page) > static inline void balloon_page_insert(struct balloon_dev_info *balloon, > struct page *page) > { > - __SetPageBalloon(page); > + page->mapping = balloon->mapping; > + __SetPageMigratable(page); > SetPagePrivate(page); > set_page_private...
2015 Jun 03
1
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...e) > */ > static inline bool isolated_balloon_page(struct page *page) > { > - return PageBalloon(page); > + return PageMigratable(page); > } > > /* > @@ -123,7 +138,8 @@ static inline bool isolated_balloon_page(struct page *page) > static inline void balloon_page_insert(struct balloon_dev_info *balloon, > struct page *page) > { > - __SetPageBalloon(page); > + page->mapping = balloon->mapping; > + __SetPageMigratable(page); > SetPagePrivate(page); > set_page_private...
2015 Jun 26
0
[RFCv2 3/5] mm/balloon: apply driver page migratable into balloon
...@@ static inline bool balloon_page_movable(struct page *page) */ static inline bool isolated_balloon_page(struct page *page) { - return PageBalloon(page); + return PageMigratable(page); } /* @@ -123,7 +129,8 @@ static inline bool isolated_balloon_page(struct page *page) static inline void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { - __SetPageBalloon(page); + page->mapping = balloon->inode->i_mapping; + __SetPageMigratable(page); SetPagePrivate(page); set_page_private(page, (unsigned long)balloon); list_add(&page->lru, &balloon->p...
2019 Apr 24
1
[PATCH v3 1/4] mm/balloon_compaction: list interfaces
...ing additional references. We should be the only one > + * holding a reference to the 'page' at this point. If we are not, then > + * memory corruption is possible and we should stop execution. > + */ > + BUG_ON(!trylock_page(page)); > + list_del(&page->lru); > + balloon_page_insert(b_dev_info, page); > + unlock_page(page); > + __count_vm_event(BALLOON_INFLATE); > +} > + > +/** > + * balloon_page_list_enqueue() - inserts a list of pages into the balloon page > + * list. > + * @b_dev_info: balloon device descriptor where we will insert a new page to...
2015 Jun 02
0
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...@@ static inline bool balloon_page_movable(struct page *page) */ static inline bool isolated_balloon_page(struct page *page) { - return PageBalloon(page); + return PageMigratable(page); } /* @@ -123,7 +138,8 @@ static inline bool isolated_balloon_page(struct page *page) static inline void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { - __SetPageBalloon(page); + page->mapping = balloon->mapping; + __SetPageMigratable(page); SetPagePrivate(page); set_page_private(page, (unsigned long)balloon); list_add(&page->lru, &balloon->pages); @@ -1...
2015 Jun 03
0
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...l isolated_balloon_page(struct page *page) >> { >> - return PageBalloon(page); >> + return PageMigratable(page); >> } >> >> /* >> @@ -123,7 +138,8 @@ static inline bool isolated_balloon_page(struct page *page) >> static inline void balloon_page_insert(struct balloon_dev_info *balloon, >> struct page *page) >> { >> - __SetPageBalloon(page); >> + page->mapping = balloon->mapping; >> + __SetPageMigratable(page); >> SetPagePrivate(page); &g...
2019 Apr 23
0
[PATCH v3 1/4] mm/balloon_compaction: list interfaces
...e get around to + * establishing additional references. We should be the only one + * holding a reference to the 'page' at this point. If we are not, then + * memory corruption is possible and we should stop execution. + */ + BUG_ON(!trylock_page(page)); + list_del(&page->lru); + balloon_page_insert(b_dev_info, page); + unlock_page(page); + __count_vm_event(BALLOON_INFLATE); +} + +/** + * balloon_page_list_enqueue() - inserts a list of pages into the balloon page + * list. + * @b_dev_info: balloon device descriptor where we will insert a new page to + * @pages: pages to enqueue - allocated...
2019 Apr 25
0
[PATCH v4 1/4] mm/balloon_compaction: List interfaces
...e get around to + * establishing additional references. We should be the only one + * holding a reference to the 'page' at this point. If we are not, then + * memory corruption is possible and we should stop execution. + */ + BUG_ON(!trylock_page(page)); + list_del(&page->lru); + balloon_page_insert(b_dev_info, page); + unlock_page(page); + __count_vm_event(BALLOON_INFLATE); +} + +/** + * balloon_page_list_enqueue() - inserts a list of pages into the balloon page + * list. + * @b_dev_info: balloon device descriptor where we will insert a new page to + * @pages: pages to enqueue - allocated...
2016 May 09
0
[PATCH v5 03/12] mm: balloon: use general non-lru movable page feature
...page) -{ - return PageBalloon(page) && PagePrivate(page); -} - -/* - * isolated_balloon_page - identify an isolated balloon page on private - * compaction/migration page lists. - */ -static inline bool isolated_balloon_page(struct page *page) -{ - return PageBalloon(page); -} - -/* * balloon_page_insert - insert a page into the balloon's page list and make * the page->private assignment accordingly. * @balloon : pointer to balloon device @@ -124,7 +100,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { __SetPageBalloon(pa...
2019 Feb 07
0
[PATCH 3/6] mm/balloon_compaction: list interfaces
...rences. We should be the only one > + * holding a reference to the 'page' at this point. > + */ > + if (!trylock_page(page)) { > + WARN_ONCE(1, "balloon inflation failed to enqueue page\n"); > + return -EFAULT; > + } > + list_del(&page->lru); > + balloon_page_insert(b_dev_info, page); > + unlock_page(page); > + __count_vm_event(BALLOON_INFLATE); > + return 0; > +} > + > +/** > + * balloon_page_list_enqueue() - inserts a list of pages into the balloon page > + * list. > + * @b_dev_info: balloon device descriptor where we will inse...
2016 May 20
0
[PATCH v6 03/12] mm: balloon: use general non-lru movable page feature
...page) -{ - return PageBalloon(page) && PagePrivate(page); -} - -/* - * isolated_balloon_page - identify an isolated balloon page on private - * compaction/migration page lists. - */ -static inline bool isolated_balloon_page(struct page *page) -{ - return PageBalloon(page); -} - -/* * balloon_page_insert - insert a page into the balloon's page list and make * the page->private assignment accordingly. * @balloon : pointer to balloon device @@ -124,7 +100,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { __SetPageBalloon(pa...
2019 Apr 19
0
[PATCH v2 1/4] mm/balloon_compaction: list interfaces
...t. > + */ > + if (!trylock_page(page)) { > + WARN_ONCE(1, "balloon inflation failed to enqueue page\n"); > + return -EFAULT; Looks like all callers bug on a failure. So let's just do it here, and then make this void? > + } > + list_del(&page->lru); > + balloon_page_insert(b_dev_info, page); > + unlock_page(page); > + __count_vm_event(BALLOON_INFLATE); > + return 0; > +} > + > +/** > + * balloon_page_list_enqueue() - inserts a list of pages into the balloon page > + * list. > + * @b_dev_info: balloon device descriptor where we will inse...
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...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 balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { + page->mapping = balloon->mapping; __SetPageBalloon(page); SetPagePrivate(page); set_page_private(page, (unsigned long)balloon); @@ -139,6 +153,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *ballo...
2015 Mar 31
2
[PATCH] add generic callbacks into compaction
...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 balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { + page->mapping = balloon->mapping; __SetPageBalloon(page); SetPagePrivate(page); set_page_private(page, (unsigned long)balloon); @@ -139,6 +153,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *ballo...
2015 Jul 07
0
[RFCv3 3/5] mm/balloon: apply mobile page migratable into balloon
...ode); extern void balloon_page_putback(struct page *page); -extern int balloon_page_migrate(struct page *newpage, +extern int balloon_page_migrate(struct address_space *mapping, + struct page *newpage, struct page *page, enum migrate_mode mode); /* @@ -124,6 +130,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { __SetPageBalloon(page); + page->mapping = balloon->inode->i_mapping; SetPagePrivate(page); set_page_private(page, (unsigned long)balloon); list_add(&page->lru, &balloon->pages); @@ -140,6 +147,7 @@ st...
2020 Mar 12
0
[RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue
...rtio_driver virtio_balloon_driver = { > diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h > index 338aa27..4c9164e 100644 > --- a/include/linux/balloon_compaction.h > +++ b/include/linux/balloon_compaction.h > @@ -100,8 +100,12 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon, > struct page *page) > { > __SetPageOffline(page); > - __SetPageMovable(page, balloon->inode->i_mapping); > - set_page_private(page, (unsigned long)balloon); > + if (balloon->inode) { > + __SetPageMovable(page, balloon-...
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