From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 23 05:47:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77EA61065687 for ; Fri, 23 Jul 2010 05:47:17 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 007058FC1A for ; Fri, 23 Jul 2010 05:47:16 +0000 (UTC) Received: by fxm13 with SMTP id 13so5268113fxm.13 for ; Thu, 22 Jul 2010 22:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=LIFdsQb8a29o//jBedTZ8v+XFiUHqGE5y/eaxkJKynw=; b=dyK2KlS3KmzD6UzrA1ZeqO1WVxamTgEuB6GtyImTMmJX//xIF4sTV7GiqCei9cSV6l PJ120456YZ36lQbBb9pCoH2fscUXkmu+Ee6PXnSWoLfoxyuLWjN+eMHKpphCCCzT1mrP vLYNYa5fJBHvIGz7sCi23IC1TNuu6EuI/Ea7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=PZ5qTFPfkDPt3i7GAIhn6hYcL+TRS/uURyUUqGGuHUuXXUQJBSH/Q+RaRWfZckSQJv i4Vf7bkG4Te77m96GgQxN3lXTnUyDjK9E85YKBLiHV9K5DiqK/u6xri2MDoBKlNNqXlL JaV5Xeg7SaOmm3osq5KzM79hYJSX8+f6ex3GM= Received: by 10.223.119.210 with SMTP id a18mr2844713far.52.1279864035785; Thu, 22 Jul 2010 22:47:15 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id q17sm3599809faa.45.2010.07.22.22.47.14 (version=SSLv3 cipher=RC4-MD5); Thu, 22 Jul 2010 22:47:15 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C492CE0.3050105@FreeBSD.org> Date: Fri, 23 Jul 2010 08:47:12 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Jerry Toung , freebsd-hackers@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Giant free GEOM/CAM XPT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 05:47:17 -0000 Jerry Toung wrote: > Hello List, > while going through the xpt code (8.0 RELEASE), it seems to me that some > gains can be had > in src/sys/geom/geom_disk.c where dp->d_strategy(bp2) is surrounded by Giant > lock. Especially in the case > where one has 2+ controllers on the system with /dev/daXX attached to them > during heavy I/O. Giant locked there only if DISKFLAG_NEEDSGIANT flag is set, which da driver is not doing. > I am currently trying to get rid of giant there, but it branches in sys/cam > and sys/dev/twa. Definitely not a > trivial exercise. The dependency on Giant seems to come from the XPT code. > > would be neat if I could just use the SIM lock, which is per controller. > > Question: do you think it's worth the effort? I think you misunderstood something. Most of CAM protected by SIM locks. If some SIMs use Giant for that purpose - it is their own problem. But as I can see, twa uses own lock, not Giant. -- Alexander Motin