Deadlocks with recent SMP current
Dan Nelson
dnelson at allantgroup.com
Mon Aug 16 11:40:13 PDT 2004
In the last episode (Aug 16), Slawek Zak said:
> Another thing is bothering me. In top I see:
>
> CPU states: 16.2% user, 0.0% nice, 2.5% system, 1.0% interrupt, 80.3% idle
> Mem: 254M Active, 605M Inact, 254M Wired, 16K Cache, 112M Buf, 2622M Free
> Swap: 4096M Total, 4096M Free
>
> PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
> 37033 mysql 20 0 265M 178M kserel 0 610:59 124.37% 124.37% mysqld
>
> MySQLd is running with libpthread and can go up to 400% without
> significantly afecting the idle percentage shown by top. I don't see
> how I could fit 400% into 20% on those two suckers, therefore I ask
> :)
The CPU accounting for KSE threads is a bit inaccurate; new threads
inherit the CPU usage of their parent, so if a program does a lot of
computation, then spawns a bunch of threads, you would end up with 50
threads each with 90% cpu. Top then totals them all up :) I don't know
if it's possible to accurately display per-thread CPU usage in a M:N
threading scheme.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-current
mailing list