From owner-freebsd-current@FreeBSD.ORG Tue Apr 6 00:57:32 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 64EEC16A4CE for ; Tue, 6 Apr 2004 00:57:32 -0700 (PDT) Received: from hewey.af.speednet.com.au (udsl-3-062.QLD.dft.com.au [202.168.108.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACC3143D48 for ; Tue, 6 Apr 2004 00:57:30 -0700 (PDT) (envelope-from andyf@speednet.com.au) Received: from hewey.af.speednet.com.au (hewey.af.speednet.com.au [172.22.2.17])i367uj3Z057178; Tue, 6 Apr 2004 17:56:45 +1000 (EST) (envelope-from andyf@speednet.com.au) Date: Tue, 6 Apr 2004 17:56:42 +1000 (EST) From: Andy Farkas X-X-Sender: andyf@hewey.af.speednet.com.au To: Xin LI In-Reply-To: <20040406071205.GA2819@frontfree.net> Message-ID: <20040406174155.S56300@hewey.af.speednet.com.au> References: <009401c41ba5$3b000f70$0c00a8c0@artem> <20040406071205.GA2819@frontfree.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Artem Koutchine cc: freebsd-current@freebsd.org Subject: Re: Qustion about being "Giant-locked" 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, 06 Apr 2004 07:57:32 -0000 On Tue, 6 Apr 2004, Xin LI wrote: > On Tue, Apr 06, 2004 at 11:03:13AM +0400, Artem Koutchine wrote: > > While booting i see many drivers marked > > as [Giant-locked]. > > Is being Giant-locked good or bad what are the > > implications? > It's not good if you have a computer with multiple processors. I have a box with 4 ppro-200 cpus. It has 4 adaptec eisa scsi controllers, each controlling 2 disks. All 8 disks are in the same vinum raid-5 volume. I have a large (1.5gig) file on this volume. This is what happens when I run md5 on this file 4 times concurrently: %%% > md5 really-big-file & [2] 78243 > md5 really-big-file & [3] 78244 > md5 really-big-file & [4] 78245 > md5 really-big-file & [5] 78246 > vmstat -c10 -w6 procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 am0 in sy cs us sy id 1 2 3 73308 28668 235 1 1 0 255 16 0 0 362 390 829 8 4 88 1 2 3 73308 21300 0 0 0 0 310 0 0 0 382 5928 11671 8 28 64 1 1 3 73308 29248 0 0 0 0 323 653 0 0 384 5769 11363 8 27 65 2 2 2 73308 20592 31 0 1 0 393 0 2 0 423 5614 11226 8 28 64 2 2 2 73308 27968 0 0 0 0 347 653 1 0 420 5655 11352 7 29 64 2 3 2 73308 19940 0 0 0 0 335 0 0 0 385 5563 11108 7 28 65 2 3 2 73308 26788 0 0 0 0 369 654 0 0 391 5608 11168 8 27 65 2 2 2 73308 34112 0 0 0 0 354 653 0 0 391 5656 11352 8 28 64 2 3 2 73308 25064 0 0 0 0 375 0 0 0 393 5687 11315 8 27 65 2 3 2 73308 32512 0 0 0 0 344 655 0 0 386 5664 11284 8 27 65 %%% As you can see, only 8% of all cpus are being used to calculate the md5s. At least 2 cpus are constantly idle. > grep GIANT /var/run/dmesg.boot fxp0: [GIANT-LOCKED] ahc0: [GIANT-LOCKED] ahc1: [GIANT-LOCKED] ahc2: [GIANT-LOCKED] ahc3: [GIANT-LOCKED] amr0: [GIANT-LOCKED] ahc4: [GIANT-LOCKED] ahc5: [GIANT-LOCKED] atkbd0: [GIANT-LOCKED] -- :{ andyf@speednet.com.au Andy Farkas System Administrator Speednet Communications http://www.speednet.com.au/