lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YHl/jDs/TDg3in4I@localhost.localdomain>
Date:   Fri, 16 Apr 2021 14:14:04 +0200
From:   Oscar Salvador <osalvador@...e.de>
To:     Baoquan He <bhe@...hat.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        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, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v9 5/7] mm: Make alloc_contig_range handle free hugetlb
 pages

On Fri, Apr 16, 2021 at 05:49:20PM +0800, Baoquan He wrote:
> On 04/16/21 at 09:00am, Oscar Salvador wrote:
> ...  
> > +/*
> > + * alloc_and_dissolve_huge_page - Allocate a new page and dissolve the old one
> > + * @h: struct hstate old page belongs to
> > + * @old_page: Old page to dissolve
> > + * Returns 0 on success, otherwise negated error.
> > + */
> > +static int alloc_and_dissolve_huge_page(struct hstate *h, struct page *old_page)
> > +{
> > +	gfp_t gfp_mask = htlb_alloc_mask(h) | __GFP_THISNODE;
> > +	int nid = page_to_nid(old_page);
> > +	struct page *new_page;
> > +	int ret = 0;
> > +
> > +	/*
> > +	 * Before dissolving the page, we need to allocate a new one for the
> > +	 * pool to remain stable. Using alloc_buddy_huge_page() allows us to
> > +	 * not having to deal with prep_new_page() and avoids dealing of any
> 				   ~ prep_new_huge_page() ?

Yep, clumsy.
@Andrew: could you please amend that or should I send a new version?

Thanks

-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ