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
| ||
|
Date: Tue, 8 Feb 2022 11:06:08 +0100 From: Oscar Salvador <osalvador@...e.de> To: Miaohe Lin <linmiaohe@...wei.com> Cc: akpm@...ux-foundation.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 2/4] mm/memory_hotplug: avoid calling zone_intersects() for ZONE_NORMAL On Mon, Feb 07, 2022 at 09:36:41PM +0800, Miaohe Lin wrote: > If zid reaches ZONE_NORMAL, the caller will always get the NORMAL zone no > matter what zone_intersects() returns. So we can save some possible cpu > cycles by avoid calling zone_intersects() for ZONE_NORMAL. > > Signed-off-by: Miaohe Lin <linmiaohe@...wei.com> Reviewed-by: Oscar Salvador <osalvador@...e.de> > --- > mm/memory_hotplug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index cbc67c27e0dd..140809e60e9a 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -826,7 +826,7 @@ static struct zone *default_kernel_zone_for_pfn(int nid, unsigned long start_pfn > struct pglist_data *pgdat = NODE_DATA(nid); > int zid; > > - for (zid = 0; zid <= ZONE_NORMAL; zid++) { > + for (zid = 0; zid < ZONE_NORMAL; zid++) { > struct zone *zone = &pgdat->node_zones[zid]; > > if (zone_intersects(zone, start_pfn, nr_pages)) > -- > 2.23.0 > > -- Oscar Salvador SUSE Labs
Powered by blists - more mailing lists