Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-24 Thread Michal Hocko
On Wed 24-03-21 09:38:17, Mike Kravetz wrote: > On 3/24/21 1:40 AM, Michal Hocko wrote: > > On Tue 23-03-21 18:03:07, Mike Kravetz wrote: > > [...] > >> Since you brought up cgroups ... what is your opinion on lock hold time > >> in hugetlb_cgroup_css_offline? We could potentially be calling > >>

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-24 Thread Mike Kravetz
On 3/24/21 1:40 AM, Michal Hocko wrote: > On Tue 23-03-21 18:03:07, Mike Kravetz wrote: > [...] >> Since you brought up cgroups ... what is your opinion on lock hold time >> in hugetlb_cgroup_css_offline? We could potentially be calling >> hugetlb_cgroup_move_parent for every hugetlb page while ho

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-24 Thread Michal Hocko
On Tue 23-03-21 18:03:07, Mike Kravetz wrote: [...] > Since you brought up cgroups ... what is your opinion on lock hold time > in hugetlb_cgroup_css_offline? We could potentially be calling > hugetlb_cgroup_move_parent for every hugetlb page while holding the lock > with interrupts disabled. I a

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-23 Thread Mike Kravetz
On 3/23/21 12:57 AM, Michal Hocko wrote: > On Mon 22-03-21 16:28:07, Mike Kravetz wrote: >> On 3/22/21 7:31 AM, Michal Hocko wrote: >>> On Fri 19-03-21 15:42:06, Mike Kravetz wrote: >>> [...] @@ -2090,9 +2084,15 @@ static void return_unused_surplus_pages(struct hstate *h, while (

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-23 Thread Michal Hocko
On Mon 22-03-21 16:28:07, Mike Kravetz wrote: > On 3/22/21 7:31 AM, Michal Hocko wrote: > > On Fri 19-03-21 15:42:06, Mike Kravetz wrote: > > [...] > >> @@ -2090,9 +2084,15 @@ static void return_unused_surplus_pages(struct > >> hstate *h, > >>while (nr_pages--) { > >>h->resv_huge_p

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-22 Thread Mike Kravetz
On 3/22/21 7:31 AM, Michal Hocko wrote: > On Fri 19-03-21 15:42:06, Mike Kravetz wrote: > [...] >> @@ -2090,9 +2084,15 @@ static void return_unused_surplus_pages(struct hstate >> *h, >> while (nr_pages--) { >> h->resv_huge_pages--; >> unused_resv_pages--; >> -

Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-22 Thread Michal Hocko
On Fri 19-03-21 15:42:06, Mike Kravetz wrote: [...] > @@ -2090,9 +2084,15 @@ static void return_unused_surplus_pages(struct hstate > *h, > while (nr_pages--) { > h->resv_huge_pages--; > unused_resv_pages--; > - if (!free_pool_huge_page(h, &node_states[

[RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-19 Thread Mike Kravetz
free_pool_huge_page was called with hugetlb_lock held. It would remove a hugetlb page, and then free the corresponding pages to the lower level allocators such as buddy. free_pool_huge_page was called in a loop to remove hugetlb pages and these loops could hold the hugetlb_lock for a considerable