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: <20090112214643.GD7320@elte.hu>
Date:	Mon, 12 Jan 2009 22:46:43 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Frederik Deweerdt <frederik.deweerdt@...og.eu>
Cc:	andi@...stfloor.org, tglx@...utronix.de, hpa@...or.com,
	linux-kernel@...r.kernel.org, Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [patch] tlb flush_data: replace per_cpu with an array


* Frederik Deweerdt <frederik.deweerdt@...og.eu> wrote:

> Hi,
> 
> On x86_64 flush tlb data is stored in per_cpu variables. This is 
> unnecessary because only the first NUM_INVALIDATE_TLB_VECTORS entries 
> are accessed.
>
> This patch aims at making the code less confusing (there's nothing 
> really "per_cpu") by using a plain array. It also would save some memory 
> on most distros out there (Ubuntu x86_64 has NR_CPUS=64 by default).

indeed, well spotted!

This construct was indeed an abuse of the per_cpu facilities.

Note that beyond the obvious memory savings, your patch should make the 
code a bit faster and a bit smaller as well in the SMP TLB flush codepath: 
the smp_flush_state data structure is 64 (or 128) bytes so static array 
arithmetics will be faster than the per_cpu indirection.

I have applied your patch to tip/x86/mm, thanks Frederik!

	Ingo
--
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