Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-14 Thread Mike Kravetz
On 4/13/21 9:59 PM, Oscar Salvador wrote: > On Tue, Apr 13, 2021 at 02:33:41PM -0700, Mike Kravetz wrote: >>> -static void prep_new_huge_page(struct hstate *h, struct page *page, int >>> nid) >>> +/* >>> + * Must be called with the hugetlb lock held >>> + */ >>> +static void __prep_account_new_hug

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-14 Thread David Hildenbrand
On 14.04.21 06:59, Oscar Salvador wrote: On Tue, Apr 13, 2021 at 02:33:41PM -0700, Mike Kravetz wrote: -static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) +/* + * Must be called with the hugetlb lock held + */ +static void __prep_account_new_huge_page(struct hstate *h,

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-13 Thread Oscar Salvador
On Tue, Apr 13, 2021 at 02:33:41PM -0700, Mike Kravetz wrote: > > -static void prep_new_huge_page(struct hstate *h, struct page *page, int > > nid) > > +/* > > + * Must be called with the hugetlb lock held > > + */ > > +static void __prep_account_new_huge_page(struct hstate *h, int nid) > > +{ > >

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-13 Thread Mike Kravetz
On 4/13/21 3:47 AM, Oscar Salvador wrote: > Currently, prep_new_huge_page() performs two functions. > It sets the right state for a new hugetlb, and increases the hstate's > counters to account for the new page. > > Let us split its functionality into two separate functions, decoupling > the handl

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-13 Thread Michal Hocko
On Tue 13-04-21 12:47:44, Oscar Salvador wrote: [...] > +static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) > +{ > + __prep_new_huge_page(page); > spin_lock_irq(&hugetlb_lock); > - h->nr_huge_pages++; > - h->nr_huge_pages_node[nid]++; > + __prep_accou

Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-13 Thread Michal Hocko
On Tue 13-04-21 15:24:32, Michal Hocko wrote: > On Tue 13-04-21 12:47:44, Oscar Salvador wrote: > [...] > > +static void prep_new_huge_page(struct hstate *h, struct page *page, int > > nid) > > +{ > > + __prep_new_huge_page(page); > > spin_lock_irq(&hugetlb_lock); > > - h->nr_huge_pages++;

[PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality

2021-04-13 Thread Oscar Salvador
Currently, prep_new_huge_page() performs two functions. It sets the right state for a new hugetlb, and increases the hstate's counters to account for the new page. Let us split its functionality into two separate functions, decoupling the handling of the counters from initializing a hugepage. The