Date: Thu, 15 Sep 2005 12:45:55 +0530 From: Joseph Koshy <joseph.koshy@gmail.com> To: Oliver Lehmann <lehmann@ans-netz.de> Cc: current@freebsd.org Subject: Re: low(er) disk performance with sched_4bsd then with sched_ule Message-ID: <84dead7205091500152a7c25d1@mail.gmail.com> In-Reply-To: <20050915000053.448f251b.lehmann@ans-netz.de> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84dead7205091500152a7c25d1>