Re: [PATCH 2/4] mm/gup: decrement head page once for group of subpages

2021-02-04 Thread Joao Martins
On 2/3/21 11:28 PM, John Hubbard wrote: > On 2/3/21 2:00 PM, Joao Martins wrote: >> Rather than decrementing the head page refcount one by one, we >> walk the page array and checking which belong to the same >> compound_head. Later on we decrement the calculated amount >> of references in a sing

Re: [PATCH 2/4] mm/gup: decrement head page once for group of subpages

2021-02-03 Thread John Hubbard
On 2/3/21 2:00 PM, Joao Martins wrote: Rather than decrementing the head page refcount one by one, we walk the page array and checking which belong to the same compound_head. Later on we decrement the calculated amount of references in a single write to the head page. To that end switch to for_ea

[PATCH 2/4] mm/gup: decrement head page once for group of subpages

2021-02-03 Thread Joao Martins
Rather than decrementing the head page refcount one by one, we walk the page array and checking which belong to the same compound_head. Later on we decrement the calculated amount of references in a single write to the head page. To that end switch to for_each_compound_head() does most of the work.