[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YHZ1f11qlGP+J2hP@localhost.localdomain>
Date: Wed, 14 Apr 2021 06:54:23 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
David Hildenbrand <david@...hat.com>,
Michal Hocko <mhocko@...nel.org>,
Muchun Song <songmuchun@...edance.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 5/7] mm: Make alloc_contig_range handle free hugetlb
pages
On Tue, Apr 13, 2021 at 03:29:02PM -0700, Mike Kravetz wrote:
> > spin_lock_irq(hugetlb_lock)
> > 1) update_and_free_page
> > PageHuge() == F
> > __free_pages()
> > 2) enqueue_huge_page
> > SetPageHugeFreed()
> > spin_unlock(&hugetlb_lock)
>
> Very small nit, the above should be spin_unlock_irq(&hugetlb_lock)
Right, I missed it somehow.
> > + /*
> > + * The page might have been dissolved from under our feet, so make sure
> > + * to carefully check the state under the lock.
> > + * Return success when racing as if we dissolved the page ourselves.
> > + */
> > + spin_lock_irq(&hugetlb_lock);
> > + if (PageHuge(page)) {
> > + head = compound_head(page);
> > + h = page_hstate(head);
> > + } else {
> > + spin_unlock(&hugetlb_lock);
>
> Should be be spin_unlock_irq(&hugetlb_lock);
>
> Other than that, it looks good.
Yeah, I will amend it in the next version.
Thanks Mike!
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists