From owner-svn-src-head@FreeBSD.ORG Wed Mar 17 12:46:55 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFD71065675; Wed, 17 Mar 2010 12:46:55 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id D025F8FC1B; Wed, 17 Mar 2010 12:46:54 +0000 (UTC) Received: from [172.31.193.10] (rrcs-98-101-145-84.midsouth.biz.rr.com [98.101.145.84]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id o2HCkruX020492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Mar 2010 08:46:54 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu o2HCkruX020492 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1268830014; bh=wAGgeERjexT3wiRsXgv0MaEK0Bwoez1YUZ8N6fWCXI4=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nR2/OXavg6gfEH52jZ977y0yD3BPIxF6nTVH6/UIyYinLgKlfgA8PvnaEm1yJcz+6 db7/5Tkt00so25ejOWMzBxz57el7Y9PTK+HLy+F8yZUQTp6oZPvhhH4yd3iq1+SG/N WShdQ3PwVEqUKf/HMLXCzIhL1EhXZCh4SAN1ms2Y= Message-ID: <4BA0CF37.2010903@cs.duke.edu> Date: Wed, 17 Mar 2010 08:46:47 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Pyun YongHyeon References: <201003161745.o2GHjG3G051630@svn.freebsd.org> In-Reply-To: <201003161745.o2GHjG3G051630@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 12:46:55 -0000 Pyun YongHyeon wrote: > Revert r205090. > It's hard to know when the mail box register write will get flushed to > the hardware and it may take longer. > > Pointed out by: scottl I may be mis-reading the code, but it looks like the mailbox register is in memory space, which should be flushed immediately unless write-combining is enabled on the region. The bge driver does not seem to be setting up write combining. Is the concern that something may enable write combining behind your back? In that case, a wmb() could act as a serializing instruction and flush the WC buffers. Or is it something completely different? Eg, maybe the chip polls the mailboxes at some regular interval, and it doesn't notice a write immediately. So writing earlier gives a better chance that it will see the new value sooner. Drew