Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2002 02:10:02 -0700 (PDT)
From:      Alexander Popkov <voodoo_alex@mail.ru>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/43887: abnormal CPU useage when use pthread_mutex
Message-ID:  <200210100910.g9A9A2om006191@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/43887; it has been noted by GNATS.

From: Alexander Popkov <voodoo_alex@mail.ru>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Jian Tang <t_fisher@163.com>
Subject: Re: kern/43887: abnormal CPU useage when use pthread_mutex
Date: Thu, 10 Oct 2002 12:55:27 +0400

 Hello Jian,
 
 Thursday, October 10, 2002, 12:15:24 PM, you wrote:
 
 JT> When I ran this program, I found that the usage of CPU is very high. 
 JT> CPU states: 25.3% user,  0.0% nice, 71.6% system,  0.4% interrupt,  2.7% idle
 
 JT> To reduce the usage of CPU,I added the time of usleep. I found that when the time of usleep is large than 1000,the status of cpu came back normal.
 JT> CPU states:  0.0% user,  0.0% nice,  1.6% system,  0.4% interrupt, 98.1% idle
 
 JT> I guess this problem is caused by the scheduler of thread. 
 
 Yes.
 FreeBSD 4.6 - too.
 
 [voodoo@alpha tmp]$ uname -a
 FreeBSD alpha.millenniumrise.ru 4.6-STABLE FreeBSD 4.6-STABLE #4: Thu Aug  8 17:01:06 MSD 2002     root@damn.millenniumrise.ru:/usr/obj/usr/src/sys/ALPHA  i386
 
 with usleep(800):
 --------------------------------
 CPU states: 25.3% user,  0.0% nice, 70.8% system,  3.1% interrupt,  0.8% idle
 
   PID USERNAME  PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  4075 voodoo     39   0  1088K   564K RUN      0:09 71.58% 32.32% a.out
 
 with usleep(1100):
 --------------------------------
 CPU states:  4.3% user,  0.0% nice,  1.2% system,  0.8% interrupt, 93.8% idle
 
   PID USERNAME  PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
  4133 voodoo      2   0  1088K   564K RUN      0:00  0.00%  0.00% a.out
 
 -- 
 Best regards,
  Alexander                            mailto:voodoo_alex@mail.ru
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210100910.g9A9A2om006191>