Re: low(er) disk performance with sched_4bsd then with sched_ule

From: Joseph Koshy <joseph.koshy_at_gmail.com>
Date: Thu, 15 Sep 2005 12:45:55 +0530
ol> I did this now for bs=64k count=32000. The results are here: 
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 = (struct thread *)(v & MTX_FLAGMASK);
    517 #ifdef ADAPTIVE_GIANT
    518                 if (TD_IS_RUNNING(owner)) {
    519 #else
    520                 if (m != &Giant && TD_IS_RUNNING(owner)) {
    521 #endif
    522                         turnstile_release(&m->mtx_object);
    523                         while (mtx_owner(m) == 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].

-- 
FreeBSD Volunteer,     http://people.freebsd.org/~jkoshy
Received on Thu Sep 15 2005 - 05:15:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:43 UTC