From owner-freebsd-current@FreeBSD.ORG Mon Oct 11 21:52:53 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 E0FBE16A4CE for ; Mon, 11 Oct 2004 21:52:53 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89E2343D5C for ; Mon, 11 Oct 2004 21:52:53 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i9BLpJGl056002; Mon, 11 Oct 2004 17:51:20 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i9BLpJhG055992; Mon, 11 Oct 2004 17:51:19 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 11 Oct 2004 17:51:19 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Daniel Eriksson In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: Giant-free ahc? 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: Mon, 11 Oct 2004 21:52:54 -0000 On Mon, 11 Oct 2004, Daniel Eriksson wrote: > Is anyone working on fine-grained locking for the ahc driver? > > I just upgraded one of my servers from UP to SMP, and noticed that > *Giant showed up a lot when running top for processes accessing data on > the SCSI discs. It could be a GIANT lock for some other resource of > course, but since the ahc driver reports [GIANT-LOCKED] during boot, and > since all the processes were accessing data on SCSI discs I just assumed > it was waiting for a lock in the ahc driver. It could well be that there's a lot of contention on Giant for VFS and disk I/O operations; however, top is unfortunately not a very good tool for diagnosing that, as the services top uses to monitor the system require Giant, increasing the chances of Giant contention being observed by top. Patches to reduce the use of Giant in sysctl() were recently posted to a mailing list (arch@?) and it could well be that those patches help reduce the Giant-related noise that top sees. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research