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:	Sun, 16 Dec 2007 10:36:21 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	Wang Chen <wangchen@...fujitsu.com>,
	Gerrit Renker <gerrit@....abdn.ac.uk>, davem@...emloft.net,
	andi@...stfloor.org, netdev@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Christoph Lameter <clameter@....com>
Subject: Re: [PATCH 3/3] [UDP6]: Counter increment on BH mode

On Sat, Dec 15, 2007 at 07:43:28PM +0100, Ingo Molnar wrote:
>
> we could perhaps introduce stat_smp_processor_id(), which signals that 
> the CPU id is used for statistical purposes and does not have to be 
> exact? In any case, your patch looks good too.

Unfortunately that doesn't work because we can then have two
CPUs trying to update the same counter which may corrupt it.

However, an optimisation is indeed possible with some work.
If we can get the address of the per-cpu counter against
some sort of a per-cpu base pointer, e.g., %gs on x86, then
we can do

	incq	%gs:(%rax)

where %rax would be the offset with %gs as the base.  This would
obviate the need for the CPU ID and therefore avoid disabling
preemption.

Hmm, wasn't Christoph working on something like that?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ