Re: sched_yield() is very slow when other threads are busy on FreeBSD-current

From: NIIMI Satoshi <sa2c_at_sa2c.net>
Date: Tue, 02 Oct 2007 21:52:33 +0900
Hi,

Jeff Roberson wrote:
> Can you please try the enclosed patch and tell me if it addresses your 
> problem?

I've tested with SCHED_4BSD and SCHED_ULE.

7-CURRENT, SCHED_4BSD, HZ=100:
      81.14 real        80.32 user         0.00 sys
      80.85 real        80.03 user         0.00 sys
      82.37 real        81.54 user         0.00 sys

7-CURRENT, SCHED_4BSD, HZ=1000:
       3.06 real         2.84 user         0.00 sys
       3.08 real         2.87 user         0.00 sys
       3.00 real         2.80 user         0.01 sys

7-CURRENT, SCHED_ULE, HZ=100:
       9.03 real         8.93 user         0.00 sys
       1.68 real         1.67 user         0.00 sys
       9.13 real         9.04 user         0.00 sys

7-CURRENT, SCHED_ULE, HZ=1000:
       4.49 real         4.38 user         0.00 sys
       4.57 real         4.48 user         0.00 sys
       4.78 real         4.67 user         0.01 sys

6.2-RELEASE, SCHED_4BSD, HZ=100:
       0.55 real         0.55 user         0.00 sys
       0.54 real         0.54 user         0.00 sys
       0.60 real         0.60 user         0.00 sys

6.2-RELEASE, SCHED_4BSD, HZ=1000:
       0.29 real         0.29 user         0.00 sys
       0.27 real         0.26 user         0.00 sys
       0.28 real         0.28 user         0.00 sys

I picked up 3 medians of 5 tests since durations are not stable on
SCHED_ULE.

SCHED_ULE is much faster than before, but still slower than 6.2-RELEASE.
SCHED_4BSD is still very slow with small HZ.

Thanks,
-- 
NIIMI Satoshi
Received on Tue Oct 02 2007 - 10:52:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:18 UTC