Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2007 23:12:00 +0200
From:      Maciej Sobczak <prog@msobczak.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Lockless uidinfo.
Message-ID:  <46CB5520.4090505@msobczak.com>
In-Reply-To: <200708211403.29293.jhb@freebsd.org>
References:  <20070818120056.GA6498@garage.freebsd.pl>	<20070818155041.GY90381@elvis.mu.org>	<20070818161449.GE6498@garage.freebsd.pl> <200708211403.29293.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:

> Memory barriers on another CPU don't mean anything about the CPU thread 2 is 
> on.

Of course they do. Otherwise they would be completely useless.

 > Memory barriers do not flush caches on other CPUs, etc.

Membars are not about caches, but about visibility and ordering. Cache 
is transparent and that is guaranteed by hardware - there is no need to 
involve any software tricks to make cache work correctly. You can 
influence their performance, but not correctness.

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46CB5520.4090505>