Re: [PATCH v4 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-04-07 Thread Oscar Salvador
On Wed, Apr 07, 2021 at 11:28:51AM +0200, Michal Hocko wrote: > An emoty page_list? If yes then sure, this can happen but > list_for_each_entry_safe will simply not iterate. Or what do you mean? Yes, I meant page_list. Yeah, I figured list_for_each_entry_safe() would simply not iterate but I

Re: [PATCH v4 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-04-07 Thread Michal Hocko
On Wed 07-04-21 10:27:49, Oscar Salvador wrote: > On Mon, Apr 05, 2021 at 04:00:40PM -0700, Mike Kravetz wrote: [...] > > @@ -2671,22 +2682,34 @@ static void try_to_free_low(struct hstate *h, > > unsigned long count, > > nodemask_t *nodes_allowed) > >

Re: [PATCH v4 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-04-07 Thread Oscar Salvador
On Mon, Apr 05, 2021 at 04:00:40PM -0700, Mike Kravetz wrote: > With the introduction of remove_hugetlb_page(), there is no need for > update_and_free_page to hold the hugetlb lock. Change all callers to > drop the lock before calling. > > With additional code modifications, this will allow

Re: [PATCH v4 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-04-06 Thread Michal Hocko
On Mon 05-04-21 16:00:40, Mike Kravetz wrote: > With the introduction of remove_hugetlb_page(), there is no need for > update_and_free_page to hold the hugetlb lock. Change all callers to > drop the lock before calling. > > With additional code modifications, this will allow loops which decrease

[PATCH v4 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-04-05 Thread Mike Kravetz
With the introduction of remove_hugetlb_page(), there is no need for update_and_free_page to hold the hugetlb lock. Change all callers to drop the lock before calling. With additional code modifications, this will allow loops which decrease the huge page pool to drop the hugetlb_lock with each