search for: pg_lock

Displaying 20 results from an estimated 79 matches for "pg_lock".

Did you mean: pgd_lock
2016 Mar 23
1
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...elated > > > to migration to address_space_operations as well as some page flags. > > > > > > Basically, this patch supports two page-flags and two functions related > > > to page migration. The flag and page->mapping stability are protected > > > by PG_lock. > > > > > > PG_movable > > > PG_isolated > > > > > > bool (*isolate_page) (struct page *, isolate_mode_t); > > > void (*putback_page) (struct page *); > > > > > > Duty of subsystem want to make their pages as migratable...
2016 Mar 23
1
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...elated > > > to migration to address_space_operations as well as some page flags. > > > > > > Basically, this patch supports two page-flags and two functions related > > > to page migration. The flag and page->mapping stability are protected > > > by PG_lock. > > > > > > PG_movable > > > PG_isolated > > > > > > bool (*isolate_page) (struct page *, isolate_mode_t); > > > void (*putback_page) (struct page *); > > > > > > Duty of subsystem want to make their pages as migratable...
2016 Mar 22
2
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...For the feature, this patch introduces functions related > to migration to address_space_operations as well as some page flags. > > Basically, this patch supports two page-flags and two functions related > to page migration. The flag and page->mapping stability are protected > by PG_lock. > > PG_movable > PG_isolated > > bool (*isolate_page) (struct page *, isolate_mode_t); > void (*putback_page) (struct page *); > > Duty of subsystem want to make their pages as migratable are > as follows: > > 1. It should register address_space to page-&gt...
2016 Mar 22
2
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...For the feature, this patch introduces functions related > to migration to address_space_operations as well as some page flags. > > Basically, this patch supports two page-flags and two functions related > to page migration. The flag and page->mapping stability are protected > by PG_lock. > > PG_movable > PG_isolated > > bool (*isolate_page) (struct page *, isolate_mode_t); > void (*putback_page) (struct page *); > > Duty of subsystem want to make their pages as migratable are > as follows: > > 1. It should register address_space to page-&gt...
2016 Apr 04
0
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...s patch introduces functions related > >to migration to address_space_operations as well as some page flags. > > > >Basically, this patch supports two page-flags and two functions related > >to page migration. The flag and page->mapping stability are protected > >by PG_lock. > > > > PG_movable > > PG_isolated > > > > bool (*isolate_page) (struct page *, isolate_mode_t); > > void (*putback_page) (struct page *); > > > >Duty of subsystem want to make their pages as migratable are > >as follows: > > > >1....
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...For the feature, this patch introduces functions related > to migration to address_space_operations as well as some page flags. > > Basically, this patch supports two page-flags and two functions related > to page migration. The flag and page->mapping stability are protected > by PG_lock. > > PG_movable > PG_isolated > > bool (*isolate_page) (struct page *, isolate_mode_t); > void (*putback_page) (struct page *); > > Duty of subsystem want to make their pages as migratable are > as follows: > > 1. It should register address_space to page->map...
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...For the feature, this patch introduces functions related > to migration to address_space_operations as well as some page flags. > > Basically, this patch supports two page-flags and two functions related > to page migration. The flag and page->mapping stability are protected > by PG_lock. > > PG_movable > PG_isolated > > bool (*isolate_page) (struct page *, isolate_mode_t); > void (*putback_page) (struct page *); > > Duty of subsystem want to make their pages as migratable are > as follows: > > 1. It should register address_space to page->map...
2016 Mar 22
0
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...ch introduces functions related > > to migration to address_space_operations as well as some page flags. > > > > Basically, this patch supports two page-flags and two functions related > > to page migration. The flag and page->mapping stability are protected > > by PG_lock. > > > > PG_movable > > PG_isolated > > > > bool (*isolate_page) (struct page *, isolate_mode_t); > > void (*putback_page) (struct page *); > > > > Duty of subsystem want to make their pages as migratable are > > as follows: > > &g...
2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
..._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 positive because PageMovable > checks page->_mapcount == PAGE_MOVABLE_MAPCOUNT_VALUE as well as PG_movable > under PG_lock. > > But I read your question about user-mapped drvier pages so we cannot > use _mapcount anymore so I will find another thing. A option is this. > > static inline int PageMovable(struct page *page) > { > int ret = 0; > struct address_space *mapping; >...
2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
..._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 positive because PageMovable > checks page->_mapcount == PAGE_MOVABLE_MAPCOUNT_VALUE as well as PG_movable > under PG_lock. > > But I read your question about user-mapped drvier pages so we cannot > use _mapcount anymore so I will find another thing. A option is this. > > static inline int PageMovable(struct page *page) > { > int ret = 0; > struct address_space *mapping; >...
2016 Apr 04
0
[PATCH v3 03/16] mm: add non-lru movable page support document
...gelog suggests SetPageIsolated, so this is confusing. I > guess the main point is that there might be parallel attempts and > only one is allowed to succeed, right? Whether it's done by atomic Right. > ops or otherwise doesn't matter to e.g. compaction. It should be atomic under PG_lock so it would be better to change __SetPageIsolated in patch 02 to show the intention "the operation is not atomic so you need some lock(e.g., PG_lock) to make sure atomicity". > > > migrate_page: This is used to compact the physical memory usage. > > If the V...
2016 Apr 01
2
[PATCH v3 03/16] mm: add non-lru movable page support document
...)(struct page *); > + > +1. Isolation > + > +What VM expected on isolate_page of subsystem is to set PG_isolated flags > +of the page if it was successful. With that, concurrent isolation among > +CPUs skips the isolated page by other CPU earlier. VM calls isolate_page > +under PG_lock of page. If a subsystem cannot isolate the page, it should > +return false. Ah, I see, so it's designed with page lock to handle the concurrent isolations etc. In http://marc.info/?l=linux-mm&m=143816716511904&w=2 Mel has warned about doing this in general under page_lock and sugg...
2016 Apr 01
2
[PATCH v3 03/16] mm: add non-lru movable page support document
...)(struct page *); > + > +1. Isolation > + > +What VM expected on isolate_page of subsystem is to set PG_isolated flags > +of the page if it was successful. With that, concurrent isolation among > +CPUs skips the isolated page by other CPU earlier. VM calls isolate_page > +under PG_lock of page. If a subsystem cannot isolate the page, it should > +return false. Ah, I see, so it's designed with page lock to handle the concurrent isolations etc. In http://marc.info/?l=linux-mm&m=143816716511904&w=2 Mel has warned about doing this in general under page_lock and sugg...
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
...;w=2 Mel has warned >> about doing this in general under page_lock and suggested that each >> user handles concurrent calls to isolate_page() internally. Might be >> more generic that way, even if all current implementers will >> actually use the page lock. > > We need PG_lock for two reasons. > > Firstly, it guarantees page's flags operation(i.e., PG_movable, PG_isolated) > atomicity. Another thing is for stability for page->mapping->a_ops. > > For example, > > isolate_migratepages_block > if (PageMovable(page)) >...
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
...;w=2 Mel has warned >> about doing this in general under page_lock and suggested that each >> user handles concurrent calls to isolate_page() internally. Might be >> more generic that way, even if all current implementers will >> actually use the page lock. > > We need PG_lock for two reasons. > > Firstly, it guarantees page's flags operation(i.e., PG_movable, PG_isolated) > atomicity. Another thing is for stability for page->mapping->a_ops. > > For example, > > isolate_migratepages_block > if (PageMovable(page)) >...
2016 Mar 30
0
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...able pages with movable. For the feature, this patch introduces functions related to migration to address_space_operations as well as some page flags. Basically, this patch supports two page-flags and two functions related to page migration. The flag and page->mapping stability are protected by PG_lock. PG_movable PG_isolated bool (*isolate_page) (struct page *, isolate_mode_t); void (*putback_page) (struct page *); Duty of subsystem want to make their pages as migratable are as follows: 1. It should register address_space to page->mapping then mark the page as PG_movable via __SetPage...
2016 Mar 30
0
[PATCH v3 03/16] mm: add non-lru movable page support document
...igrate_mode); + void (*putback_page)(struct page *); + +1. Isolation + +What VM expected on isolate_page of subsystem is to set PG_isolated flags +of the page if it was successful. With that, concurrent isolation among +CPUs skips the isolated page by other CPU earlier. VM calls isolate_page +under PG_lock of page. If a subsystem cannot isolate the page, it should +return false. +2. Migration + +After successful isolation, VM calls migratepage. The migratepage's goal is +to move content of the old page to new page and set up struct page fields +of new page. If migration is successful, subsystem...
2016 Mar 21
0
[PATCH v2 13/18] mm/compaction: support non-lru movable page migration
...able pages with movable. For the feature, this patch introduces functions related to migration to address_space_operations as well as some page flags. Basically, this patch supports two page-flags and two functions related to page migration. The flag and page->mapping stability are protected by PG_lock. PG_movable PG_isolated bool (*isolate_page) (struct page *, isolate_mode_t); void (*putback_page) (struct page *); Duty of subsystem want to make their pages as migratable are as follows: 1. It should register address_space to page->mapping then mark the page as PG_movable via __SetPage...
2016 Apr 05
1
[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon
...gt; - atomic_read(&page->_mapcount) == PAGE_MOVABLE_MAPCOUNT_VALUE) > - || PageBalloon(page)); > + return (test_bit(PG_movable, &(page)->flags) && > + atomic_read(&page->_mapcount) == PAGE_MOVABLE_MAPCOUNT_VALUE); > } > > /* Caller should hold a PG_lock */ > @@ -645,6 +626,35 @@ static inline void __ClearPageMovable(struct page *page) > > PAGEFLAG(Isolated, isolated, PF_ANY); > > +static inline int PageBalloon(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_VALUE > + &...
2016 Apr 05
1
[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon
...gt; - atomic_read(&page->_mapcount) == PAGE_MOVABLE_MAPCOUNT_VALUE) > - || PageBalloon(page)); > + return (test_bit(PG_movable, &(page)->flags) && > + atomic_read(&page->_mapcount) == PAGE_MOVABLE_MAPCOUNT_VALUE); > } > > /* Caller should hold a PG_lock */ > @@ -645,6 +626,35 @@ static inline void __ClearPageMovable(struct page *page) > > PAGEFLAG(Isolated, isolated, PF_ANY); > > +static inline int PageBalloon(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_BALLOON_MAPCOUNT_VALUE > + &...