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: <ZtXvxuD-xkUkveRo@pc636>
Date: Mon, 2 Sep 2024 19:03:02 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Uladzislau Rezki <urezki@...il.com>,
	Adrian Huang <adrianhuang0701@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Adrian Huang <ahuang12@...ovo.com>
Subject: Re: [PATCH 1/1] mm: vmalloc: Optimize vmap_lazy_nr arithmetic when
 purging each vmap_area

Hello!

> 
> Hi,
> 
> unrelated to your use case, but something that coud easily save a few cycles
> on some system, IMHO.
> 
> Maybe:
> 
> #if NR_CPUS > 1
> static __read_mostly unsigned int nr_vmap_nodes = 1;
> static __read_mostly unsigned int vmap_zone_size = 1;
> #else
> #define nr_vmap_nodes	1
> #define vmap_zone_size	1
> #endif
> 
> So that the compiler can do a better job because some loops can be optimized
> away and there is no need to access some memory to get theses values.
> 
> Not sure if such a use case can exist or is of any interest.
> 
> This is valide because of [1] and the #ifdef around the num_possible_cpus()
> declaration [2, 3].
> 
> 
> Just my 2c.
> 
Thank you, i see your point.

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ