From owner-freebsd-current@FreeBSD.ORG Tue Jul 20 16:39:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCA1116A4CE; Tue, 20 Jul 2004 16:39:39 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74E6443D64; Tue, 20 Jul 2004 16:39:39 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i6KGd5CL099705; Tue, 20 Jul 2004 12:39:05 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i6KGd4E0099701; Tue, 20 Jul 2004 12:39:05 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 20 Jul 2004 12:39:04 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Mark Murray In-Reply-To: <200407201554.i6KFsCtW079782@grimreaper.grondar.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: jesk cc: scottl@FreeBSD.ORG cc: freebsd-current@FreeBSD.ORG cc: markm@FreeBSD.ORG Subject: Re: I/O or Threading Suffer X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2004 16:39:39 -0000 On Tue, 20 Jul 2004, Mark Murray wrote: > Robert Watson writes: > > Mark -- how much > > computation is being done here -- would it be worth dropping the Giant > > lock during that computation so that the thread can yield without > > generating a priority inversion? > > I'm sure it could. There are some Giant issues related to the UIO stuff > that bit me in the bum when I removed the NEEDS_GIANT flag from the > device, but I'm reasonably sure that with careful work this can be > untangled. UIO shouldn't require Giant. Are you sure it still does? FYI, I'm not even thinking you have to mark the whole device driver as not requiring Giant, just dropping Giant about some of the long running work (and maybe conditional on the amount of work). For a small random read, it's not worth it, but for sustained large reads of randomness, it might be interesting to see what impact it has. We could even consider a yield of some sort. Anyhow, up front, it might be sufficient to drop and reacquire giant and see what impact it has for the test scenario we're currently looking at. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research