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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jun 2014 16:46:34 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Christoph Lameter <cl@...two.org>
Cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] percpu: add data dependency barrier in percpu
 accessors and operations

On Thu, Jun 19, 2014 at 03:42:07PM -0500, Christoph Lameter wrote:
> In that case special care needs to be taken to get this right. True.
> 
> I typically avoid these scenarios by sending an IPI with a pointer to the
> data structure. The modification is done by the cpu for which the per cpu
> data is local.
> 
> Maybe rewrite the code to avoid writing to other processors percpu data
> would be the right approach?

It depends on the specific use case but in general no.  IPIs would be
far more expensive than making use of proper barriers in vast majority
of cases especially when the "hot" side is data dependency barrier,
IOW, nothing.  Also, we are talking about extremely low frequency
events like init and recycling after reinit.  Regular per-cpu
operation isn't really the subject here.

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