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:	Thu, 02 Apr 2009 14:55:48 +0900
From:	Tejun Heo <tj@...nel.org>
To:	David Miller <davem@...emloft.net>
CC:	linux-kernel@...r.kernel.org
Subject: Re: More problems in setup_pcpu_remap()

Hello, David.

David Miller wrote:
>> I guess we'll have to put a cap on how high possible cpus can be for
>> remap allocator.  e.g. if single chunk size is over 20% of the whole
>> vmalloc area, don't use remap.  Does anyone have a good random %
>> number on mind?
> 
> I would suggest instead to rethink what this code is doing.

Actually, I've been looking at the numbers and I'm not sure if the
concern is valid.  On x86_32, the practical number of maximum
processors would be around 16 so it will end up 32M, which isn't nice
and it would probably a good idea to introduce a parameter to select
which allocator to use but still it's far from consuming all the VM
area.  On x86_64, the vmalloc area is obscenely large at 2^45, ie 32
terabytes.  Even with 4096 processors, single chunk is measly 0.02%.

If it's a problem for other archs or extreme x86_32 configurations, we

can add some safety measures but in general I don't think it is a
problem.

> It would make more sense to carve up 2MB chunks into some-power-of-2
> pieces and use that as the unit size.
>
> You could retain the NUMA goals of this function, as well as the
> ability to be using 2MB pages in the TLBs.

Can you please elaborate a bit?

> And consider that if the dynamic allocation part of this code triggers
> even once, you'll end up eating twice as much VMALLOC space.
> 
> Using 2MB per cpu is just rediculious, and really not even necessary.

The focus at the moment is using large page for the first chunk to
reduce pressure on TLB, not necessarily actually using 2MB for each
unit.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ