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: <1288849366.2718.42.camel@edumazet-laptop>
Date:	Thu, 04 Nov 2010 06:42:46 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Shaohua Li <shaohua.li@...el.com>
Cc:	lkml <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Andi Kleen <andi@...stfloor.org>,
	"hpa@...or.com" <hpa@...or.com>
Subject: Re: [RFC 4/4]x86: avoid tlbstate lock if no enough cpus

Le jeudi 04 novembre 2010 à 13:21 +0800, Shaohua Li a écrit :
> On Wed, 2010-11-03 at 17:08 +0800, Eric Dumazet wrote:
> > Le mercredi 03 novembre 2010 à 16:41 +0800, Shaohua Li a écrit :
> > 
> > > yes, this is ok. we might need avoid some cpu hotplug race too. I'll
> > > post a new patch later.
> > > 
> > > 
> > 
> > Hmm, maybe only set the variable "must take the lock", never unset it.
> I followed your suggestions to use nr_cpu_ids, it should be good enough.
> 

Yes, unfortunately not on HP machines, because of their tendency to have
holes in CPU numberings :)

This can probably can improved later.

Thanks

> Thanks,
> Shaohua
> 
> 
> This one isn't related to previous patch. If online cpus are below
> NUM_INVALIDATE_TLB_VECTORS, we don't need the lock. The comments
> in the code declares we don't need the check, but a hot lock still
> needs an atomic operation and expensive, so add the check here.
> 
> Uses nr_cpu_ids here as suggested by Eric Dumazet.
> 
> Signed-off-by: Shaohua Li <shaohua.li@...el.com>
> ---

Acked-by: Eric Dumazet <eric.dumazet@...il.com>



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