search for: _mapcount

Displaying 20 results from an estimated 83 matches for "_mapcount".

2015 Jul 31
1
[PATCH 2/4] mm/compaction: enable mobile-page migration
...if (PageBalloon(page)) > u |= 1 << KPF_BALLOON; > > + if (PageMobile(page)) > + u |= 1 << KPF_MOBILE; > + Need a new page flag for non-LRU page migration? I am worry that we don't have empty slot for page flag on 32-bit. Aha, see SetPageMobile below. You use _mapcount. It seems to be work for non-LRU pages but unfortunately, zsmalloc already have used that field as own purpose so there is no room for it. > u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked); > > u |= kpf_copy_bit(k, KPF_SLAB, PG_slab); > diff --git a/include/linux/compaction.h b/inc...
2015 Jul 31
1
[PATCH 2/4] mm/compaction: enable mobile-page migration
...if (PageBalloon(page)) > u |= 1 << KPF_BALLOON; > > + if (PageMobile(page)) > + u |= 1 << KPF_MOBILE; > + Need a new page flag for non-LRU page migration? I am worry that we don't have empty slot for page flag on 32-bit. Aha, see SetPageMobile below. You use _mapcount. It seems to be work for non-LRU pages but unfortunately, zsmalloc already have used that field as own purpose so there is no room for it. > u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked); > > u |= kpf_copy_bit(k, KPF_SLAB, PG_slab); > diff --git a/include/linux/compaction.h b/inc...
2020 Sep 02
0
[PATCH v2 1/7] mm/thp: fix __split_huge_pmd_locked() for migration PMD
...is being copied to a new page and data could be lost. The function __split_huge_pmd() checks for a PMD migration entry before calling __split_huge_pmd_locked() leading one to think that __split_huge_pmd_locked() can handle splitting a migrating PMD. However, the code always increments the page->_mapcount and adjusts the memory control group accounting assuming the page is mapped. Also, if the PMD entry is a migration PMD entry, the call to is_huge_zero_pmd(*pmd) is incorrect because it calls pmd_pfn(pmd) instead of migration_entry_to_pfn(pmd_to_swp_entry(pmd)). Fix these problems by checking for a...
2020 Sep 02
1
[PATCH v2 1/7] mm/thp: fix __split_huge_pmd_locked() for migration PMD
...a new page and > data could be lost. The function __split_huge_pmd() checks for a PMD > migration entry before calling __split_huge_pmd_locked() leading one to > think that __split_huge_pmd_locked() can handle splitting a migrating PMD. > However, the code always increments the page->_mapcount and adjusts the > memory control group accounting assuming the page is mapped. > Also, if the PMD entry is a migration PMD entry, the call to > is_huge_zero_pmd(*pmd) is incorrect because it calls pmd_pfn(pmd) instead > of migration_entry_to_pfn(pmd_to_swp_entry(pmd)). > Fix these pr...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...iff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(struct page *page)...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...iff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(struct page *page)...
2016 Mar 21
0
[PATCH v2 14/18] mm/balloon: use general movable page feature into balloon
...ge-flags.h b/include/linux/page-flags.h index 3885064641c4..4853e0487175 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -599,50 +599,58 @@ static inline void __ClearPageBuddy(struct page *page) extern bool is_free_buddy_page(struct page *page); -#define PAGE_BALLOON_MAPCOUNT_VALUE (-256) +#define PAGE_MOVABLE_MAPCOUNT_VALUE (-256) +#define PAGE_BALLOON_MAPCOUNT_VALUE PAGE_MOVABLE_MAPCOUNT_VALUE -static inline int PageBalloon(struct page *page) +static inline int PageMovable(struct page *page) { - return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_V...
2016 Apr 05
1
[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon
...t; > Cc: Konstantin Khlebnikov <koct9i at gmail.com> > Signed-off-by: Gioh Kim <gurugio at hanmail.net> > Signed-off-by: Minchan Kim <minchan at kernel.org> I'm not familiar with the inode and pseudofs stuff, so just some things I noticed: > -#define PAGE_MOVABLE_MAPCOUNT_VALUE (-255) > +#define PAGE_MOVABLE_MAPCOUNT_VALUE (-256) > +#define PAGE_BALLOON_MAPCOUNT_VALUE PAGE_MOVABLE_MAPCOUNT_VALUE > > static inline int PageMovable(struct page *page) > { > - return ((test_bit(PG_movable, &(page)->flags) && > - atomic_read(&p...
2016 Apr 05
1
[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon
...t; > Cc: Konstantin Khlebnikov <koct9i at gmail.com> > Signed-off-by: Gioh Kim <gurugio at hanmail.net> > Signed-off-by: Minchan Kim <minchan at kernel.org> I'm not familiar with the inode and pseudofs stuff, so just some things I noticed: > -#define PAGE_MOVABLE_MAPCOUNT_VALUE (-255) > +#define PAGE_MOVABLE_MAPCOUNT_VALUE (-256) > +#define PAGE_BALLOON_MAPCOUNT_VALUE PAGE_MOVABLE_MAPCOUNT_VALUE > > static inline int PageMovable(struct page *page) > { > - return ((test_bit(PG_movable, &(page)->flags) && > - atomic_read(&p...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...gt; diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(struct page *page) >...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...gt; diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(struct page *page) >...
2015 Jun 26
0
[RFCv2 1/5] mm/compaction: enable driver page migration
...d long, unsigned long); diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 91b7f9b..c8a66de 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -649,6 +649,25 @@ static inline void __ClearPageBalloon(struct page *page) atomic_set(&page->_mapcount, -1); } +#define PAGE_MIGRATABLE_MAPCOUNT_VALUE (-255) + +static inline int PageMigratable(struct page *page) +{ + return atomic_read(&page->_mapcount) == PAGE_MIGRATABLE_MAPCOUNT_VALUE; +} + +static inline void __SetPageMigratable(struct page *page) +{ + VM_BUG_ON_PAGE(atomic_read(&p...
2016 Mar 21
1
[PATCH v2 14/18] mm/balloon: use general movable page feature into balloon
Hi Minchan, [auto build test ERROR on next-20160318] [cannot apply to v4.5-rc7 v4.5-rc6 v4.5-rc5 v4.5] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160321-143339 config: x86_64-randconfig-x000-201612 (attached as .config) reproduce: # save
2016 Mar 21
1
[PATCH v2 14/18] mm/balloon: use general movable page feature into balloon
Hi Minchan, [auto build test ERROR on next-20160318] [cannot apply to v4.5-rc7 v4.5-rc6 v4.5-rc5 v4.5] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160321-143339 config: x86_64-randconfig-x000-201612 (attached as .config) reproduce: # save
2016 Mar 30
0
[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon
...ge-flags.h b/include/linux/page-flags.h index 77ebf8fdbc6e..603c47752126 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -599,32 +599,13 @@ static inline void __ClearPageBuddy(struct page *page) extern bool is_free_buddy_page(struct page *page); -#define PAGE_BALLOON_MAPCOUNT_VALUE (-256) - -static inline int PageBalloon(struct page *page) -{ - return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_VALUE; -} - -static inline void __SetPageBalloon(struct page *page) -{ - VM_BUG_ON_PAGE(atomic_read(&page->_mapcount) != -1, page); - atomic_set(&pag...
2020 Sep 03
1
[PATCH v3] mm/thp: fix __split_huge_pmd_locked() for migration PMD
...is being copied to a new page and data could be lost. The function __split_huge_pmd() checks for a PMD migration entry before calling __split_huge_pmd_locked() leading one to think that __split_huge_pmd_locked() can handle splitting a migrating PMD. However, the code always increments the page->_mapcount and adjusts the memory control group accounting assuming the page is mapped. Also, if the PMD entry is a migration PMD entry, the call to is_huge_zero_pmd(*pmd) is incorrect because it calls pmd_pfn(pmd) instead of migration_entry_to_pfn(pmd_to_swp_entry(pmd)). Fix these problems by checking for a...
2015 Jul 07
0
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...d long, unsigned long); diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f34e040..abef145 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) atomic_set(&page->_mapcount, -1); } +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) + +static inline int PageMobile(struct page *page) +{ + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; +} + +static inline void __SetPageMobile(struct page *page) +{ + VM_BUG_ON_PAGE(atomic_read(&page->_mapcoun...
2015 Jul 13
0
[PATCH 2/4] mm/compaction: enable mobile-page migration
...d long, unsigned long); diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f34e040..abef145 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) atomic_set(&page->_mapcount, -1); } +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) + +static inline int PageMobile(struct page *page) +{ + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; +} + +static inline void __SetPageMobile(struct page *page) +{ + VM_BUG_ON_PAGE(atomic_read(&page->_mapcoun...
2015 Jun 03
1
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...return false; > } > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 422c484..2d991a0 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -599,25 +599,6 @@ static inline void __ClearPageBuddy(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > -#define PAGE_BALLOON_MAPCOUNT_VALUE (-256) > - > -static inline int PageBalloon(struct page *page) > -{ > - return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_VALUE; > -} > - > -static inline void __SetPageBalloon(struct page *pa...
2015 Jun 03
1
[RFC 2/4] mm/balloon: apply driver page migratable into balloon driver
...return false; > } > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 422c484..2d991a0 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -599,25 +599,6 @@ static inline void __ClearPageBuddy(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > -#define PAGE_BALLOON_MAPCOUNT_VALUE (-256) > - > -static inline int PageBalloon(struct page *page) > -{ > - return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_VALUE; > -} > - > -static inline void __SetPageBalloon(struct page *pa...