[fwd] cvs commit: src/lib/libthr/thread thr_mutex.c thr_umtx.c thr_umtx.h src/sys/kern kern_umtx.c src/sys/sys umtx.h

Vladimir Grebenschikov vova at fbsd.ru
Tue Jul 1 04:55:36 UTC 2008


On Tue, 2008-06-24 at 07:32 +0000, David Xu wrote:

This commit makes threaded application almost unusable on 8-CURRENT.

Applications eat 100% CPU all the time and works _very_ slowly.
(top shows several threads for every constantly applications eating CPU)

Following applications are affected for me: firefox, evolution, eclipse
(probably more).

Reverting user-land part of commit fixes problem, reverting kernel
changes nothing regarding the problem.

I have:
FreeBSD 8.0-CURRENT #0: Fri Jun 20 17:14:23 MSD 2008
    root at vbook.fbsd.ru:/usr/obj/usr/src/sys/VBOOK
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz (1995.01-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6f6  Stepping = 6
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe3bd<SSE3,RSVD2,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2

> davidxu     2008-06-24 07:32:12 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libthr/thread    thr_mutex.c thr_umtx.c thr_umtx.h 
>     sys/kern             kern_umtx.c 
>     sys/sys              umtx.h 
>   Log:
>   SVN rev 179970 on 2008-06-24 07:32:12Z by davidxu
>   
>   Add two commands to _umtx_op system call to allow a simple mutex to be
>   locked and unlocked completely in userland. by locking and unlocking mutex
>   in userland, it reduces the total time a mutex is locked by a thread,
>   in some application code, a mutex only protects a small piece of code, the
>   code's execution time is less than a simple system call, if a lock contention
>   happens, however in current implemenation, the lock holder has to extend its
>   locking time and enter kernel to unlock it, the change avoids this disadvantage,
>   it first sets mutex to free state and then enters kernel and wake one waiter
>   up. This improves performance dramatically in some sysbench mutex tests.
>   
>   Tested by: kris
>   Sounds great: jeff
>   
>   Revision  Changes    Path
>   1.75      +33 -35    src/lib/libthr/thread/thr_mutex.c
>   1.17      +60 -10    src/lib/libthr/thread/thr_umtx.c
>   1.14      +13 -9     src/lib/libthr/thread/thr_umtx.h
>   1.71      +142 -35   src/sys/kern/kern_umtx.c
>   1.33      +3 -1      src/sys/sys/umtx.h
> _______________________________________________
> cvs-src at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/cvs-src
> To unsubscribe, send any mail to "cvs-src-unsubscribe at freebsd.org"
-- 
Vladimir B. Grebenschikov
vova at fbsd.ru


More information about the cvs-src mailing list