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]
Date: Sat, 22 Jun 2024 06:13:24 -1000
From: Tejun Heo <tj@...nel.org>
To: Xavier <xavier_qy@....com>
Cc: longman@...hat.com, mkoutny@...e.com, lizefan.x@...edance.com,
	hannes@...xchg.org, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH-cpuset v6 0/2] Add Union-Find and use it to optimize
 cpuset

Hello, Xavier.

On Sat, Jun 22, 2024 at 03:14:22PM +0800, Xavier wrote:
> To Tejun,
> Since union_find operation does not require contiguous physical memory, I
> have replaced the previous allocation method with vzalloc.

Oh, that's not what I meant. Sorry about not being clearer. What I was
trying to say was that requiring consecutive allocation whether kzalloc or
vzalloc is unlikely to work for kernel data structures. The reason why I
mentioned vmalloc was because it's easy to end up in sizes that require
vmalloc with consecutive allocations and vmallocs are rather expensive and
not that great - ie. having to use vmalloc may negate the benefits of better
algorithm in most cases.

Skimming the code, there's nothing requiring consecutive allocations. Is
there a reason why this can't follow the usual convention that kernel data
structures follow (e.g. list, rbtree) where allocation is left to the users?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ