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:	Wed, 21 Dec 2011 10:52:37 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH for-3.3] mempool: clean up and document synchronization
 and memory barrier usage

Hello,

On Wed, Dec 21, 2011 at 06:40:58PM +0100, Oleg Nesterov wrote:
> > The first paragraph is saying that at that point full barrier (for
> > both stores and loads) is necessary at that point and the second
> > paragraph is a bit confusing but the last sentence seems to say that
> > only loads after the unlock can creep above unlock,
> 
> Probably, this is because the comment tries to explain the possible
> reordering with the subsequent "if (condition)" check, so it only
> mentions loads.

Ah, I see.

> > Anyways, yeah, you're right.  We need a smp_wmb() before returning but
> > I think the comment on top of prepare_to_wait() is misleading.
> 
> Hmm. I am not sure I understand... Although almost everything written
> in English looks misleading to me ;)

Amen. :) I missed the context there, so please forget about it.

> > Great, thanks.  I'll wait a bit for futher comments and repost w/
> > smp_wmb() added.
> 
> Well. This is almost off-topic, but perhaps we can add
> smp_mb__after_unlock() ? We already have smp_mb__after_lock.
> Afaics prepare_to_wait() could use it.
> 
> I am not talking about perfomance issues, just I think the code
> will be more understandable.

Hmmm... maybe.  I really don't know.

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