From owner-cvs-src@FreeBSD.ORG Fri Aug 8 17:25:15 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECF8D1065752; Fri, 8 Aug 2008 17:25:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8A3A78FC2E; Fri, 8 Aug 2008 17:25:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m78HP7fM030456; Fri, 8 Aug 2008 13:25:07 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Alan Cox Date: Fri, 8 Aug 2008 13:12:36 -0400 User-Agent: KMail/1.9.7 References: <200808081343.m78DhwYE068477@repoman.freebsd.org> <200808081226.32089.jhb@freebsd.org> <489C7D7F.4090806@cs.rice.edu> In-Reply-To: <489C7D7F.4090806@cs.rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808081312.36678.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Fri, 08 Aug 2008 13:25:07 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7981/Fri Aug 8 11:29:53 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Ed Schouten , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/io iodev.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 17:25:16 -0000 On Friday 08 August 2008 01:08:15 pm Alan Cox wrote: > John Baldwin wrote: > > > > >Also, I don't see why memrw() is not MPSAFE actually (on amd64 and i386 at > >least). Stephan (ups@) even has a comment to that effect. The MTRR stuff > >backing memioctl() on x86 might need locking, but I think that is all mem(4) > >is missing. > > > > > > > > There is nothing there that requires Giant specifically. However, the > use of some lock in memrw() does have an arguably useful but small > effect: overlapping operations will be serialized. So, if you're ever > trying to debug something involving memrw(), you won't be staring at > essentially random state. On amd64 there is already an sx lock over the pmap bits to temporarily map the page. If desired, that could always be expanded. As it is, Giant is dropped if you block on a lockmgr or sx lock (or go to sleep), so Giant doesn't always serialize operations anyway. -- John Baldwin