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

2021-02-11 Thread Joao Martins
On 2/10/21 9:02 PM, Jason Gunthorpe wrote: > On Fri, Feb 05, 2021 at 08:41:25PM +, 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

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

2021-02-10 Thread Jason Gunthorpe
On Fri, Feb 05, 2021 at 08:41:25PM +, 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

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

2021-02-05 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