From owner-svn-src-all@FreeBSD.ORG Wed Jul 22 18:45:33 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 131BF1065672; Wed, 22 Jul 2009 18:45:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Wed, 22 Jul 2009 14:44:52 -0400 User-Agent: KMail/1.6.2 References: <200907221432.n6MEWcXB043644@svn.freebsd.org> In-Reply-To: <200907221432.n6MEWcXB043644@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200907221445.25404.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Konstantin Belousov Subject: Re: svn commit: r195820 - in head/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 18:45:33 -0000 On Wednesday 22 July 2009 10:32 am, Konstantin Belousov wrote: > Author: kib > Date: Wed Jul 22 14:32:38 2009 > New Revision: 195820 > URL: http://svn.freebsd.org/changeset/base/195820 > > Log: > When the page caching attributes are changed, after new mapping > is established, OS shall flush the caches on all processors that > may have used the mapping previously. This operation is not needed > if processors support self-snooping. If not, but clflush > instruction is implemented on the CPU, series of the clflush can be > used on the mapping region. Otherwise, we have to flush the whole > cache. The later operation is very expensive, and AMD-made CPUs do > not have self-snooping. > > Implement cache flush for remapped region by using clflush for > amd64, when supported by CPU. --- >8 --- SKIP --- >8 --- > @@ -267,6 +274,13 @@ outw(u_int port, u_short data) > } > > static __inline void > +mfence(void) > +{ > + > + __asm__ __volatile("mfence" : : : "memory"); > +} > + > +static __inline void > ia32_pause(void) > { > __asm __volatile("pause"); Is there any reason why you want mfence() instead of mb() from machine/atomic.h? Jung-uk Kim