[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

From: Vladimir Grebenschikov <vova_at_fbsd.ru>
Date: Mon, 30 Jun 2008 22:28:44 +0400
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  _at_ 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
Received on Tue Jul 01 2008 - 02:40:15 UTC

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