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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHVum0f3F51Nu=vxP_qStp+DW+q9AOZKh4RQTrz-Jk-=T9CYnQ@mail.gmail.com>
Date:   Tue, 28 Mar 2023 10:12:07 -0700
From:   Vipin Sharma <vipinsh@...gle.com>
To:     David Matlack <dmatlack@...gle.com>
Cc:     seanjc@...gle.com, pbonzini@...hat.com, bgardon@...gle.com,
        jmattson@...gle.com, mizhang@...gle.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Patch v4 12/18] KVM: x86/mmu: Allocate NUMA aware page tables on
 TDP huge page splits

On Thu, Mar 23, 2023 at 3:15 PM David Matlack <dmatlack@...gle.com> wrote:
>
> On Mon, Mar 06, 2023 at 02:41:21PM -0800, Vipin Sharma wrote:
> > +
> > +void *kvm_mmu_get_free_page(gfp_t gfp, int nid)
> > +{
> > +#ifdef CONFIG_NUMA
>
> Is this #ifdef necessary? alloc_pages_node() is defined regardless of
> CONFIG_NUMA.
>

It is not necessary. Only advantage will be skipping the if()
condition check. I will remove it.

> > +     struct page *page;
> > +
> > +     if (nid != NUMA_NO_NODE) {
> > +             page = alloc_pages_node(nid, gfp, 0);
> > +             if (!page)
> > +                     return (void *)0;
> > +             return page_address(page);
> > +     }
> > +#endif /* CONFIG_NUMA */
> > +     return (void *)__get_free_page(gfp);
> > +}
> > +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ