From owner-freebsd-current@FreeBSD.ORG Thu Sep 15 07:15:56 2005 Return-Path: X-Original-To: current@freebsd.org 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 6CF6716A41F for ; Thu, 15 Sep 2005 07:15:56 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB54643D45 for ; Thu, 15 Sep 2005 07:15:55 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id i31so18103wxd for ; Thu, 15 Sep 2005 00:15:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZbxQhVDMSc1k7ipgZ89oAig+qNds7xYuS5tbkfEnofV5DGDJGkojVSMS/wE8Qy+J7SMg2a1teLU7OKzKYM/nM/tZwyprgtBs3FNJ+iU2aaStdrdlWig2aLI1whID7PKKXYyKd/MFPY2te8997kDozdYhg8Ry4XrsbDXvb4TrNog= Received: by 10.70.28.2 with SMTP id b2mr187847wxb; Thu, 15 Sep 2005 00:15:55 -0700 (PDT) Received: by 10.70.115.15 with HTTP; Thu, 15 Sep 2005 00:15:55 -0700 (PDT) Message-ID: <84dead7205091500152a7c25d1@mail.gmail.com> Date: Thu, 15 Sep 2005 12:45:55 +0530 From: Joseph Koshy To: Oliver Lehmann In-Reply-To: <20050915000053.448f251b.lehmann@ans-netz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050914194612.15692485.lehmann@ans-netz.de> <43286E37.40203@samsco.org> <20050914222013.178dc4dc.lehmann@ans-netz.de> <84dead72050914135239514c49@mail.gmail.com> <20050915000053.448f251b.lehmann@ans-netz.de> Cc: current@freebsd.org Subject: Re: low(er) disk performance with sched_4bsd then with sched_ule X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: joseph.koshy@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2005 07:15:56 -0000 ol> I did this now for bs=3D64k count=3D32000. The results are here:=20 ol> http://pofo.de/tmp/gprof.ule ol> http://pofo.de/tmp/gprof.4bsd The top consumer for the 4BSD kernel appears to be is: 70.8 187656.00 187656.00 _mtx_lock_sleep [1] The low rank of the turnstile_* functions in the profile makes me suspect that the spinning is happening in the following part of the code: "src/sys/kern/kern_mutex.c": 512 /* 513 * If the current owner of the lock is executing on another 514 * CPU, spin instead of blocking. 515 */ 516 owner =3D (struct thread *)(v & MTX_FLAGMASK); 517 #ifdef ADAPTIVE_GIANT 518 if (TD_IS_RUNNING(owner)) { 519 #else 520 if (m !=3D &Giant && TD_IS_RUNNING(owner)) { 521 #endif 522 turnstile_release(&m->mtx_object); 523 while (mtx_owner(m) =3D=3D owner && \ TD_IS_RUNNING(owner)){ 524 cpu_spinwait(); 525 } 526 continue; So the next question would be: do you have ADAPTIVE_GIANT turned on in your kernel config? What happens if you use a kernel with 'options NO_ADAPTIVE_MUTEXES' ? [Could you please post your kernel config, and the output of a dmesg after a boot]. --=20 FreeBSD Volunteer, http://people.freebsd.org/~jkoshy