Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Nov 1998 14:44:15 -0500 (EST)
From:      Snob Art Genre <benedict@echonyc.com>
To:        questions@FreeBSD.ORG
Subject:   X and my WM using 40% CPU on an idle system
Message-ID:  <Pine.GSO.4.02.9811221430490.19477-100000@echonyc.com>

next in thread | raw e-mail | index | archive | help
Hello hackers,
  I noticed today that wmaker and XF86_S3V were stealing precious cycles
from my rc5 client!  As in:

 PID USERNAME  PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
 1224 ben       105  19   744K   456K RUN    295:40 60.23% 60.23% rc5des
 1102 ben         2   0  2848K  2296K select  53:34 18.58% 18.58% wmaker
 1099 ben         2   0 11208K 10292K select  52:21 17.93% 17.93% XF86_S3V

This seems more than a little weird on an idle system.  Furthermore,
quite a bit of this excessive CPU usage is in the kernel.

CPU states: 16.3% user, 54.5% nice, 28.8% system,  0.4% interrupt,  0.0%
idle

I'm running 3.0-current, and XFree86 version 3.3.2.3.

I don't know how long this has been going on, I just noticed it today.
The X server seems to be looping on read, writev, gettimeofday, select,
like so:

  1099 XF86_S3V RET   writev 32/0x20
  1099 XF86_S3V CALL  gettimeofday(0xefbfd8c4,0)
  1099 XF86_S3V RET   gettimeofday 0
  1099 XF86_S3V CALL  select(0x80,0x1ed930,0,0,0)
  1099 XF86_S3V RET   select 1
  1099 XF86_S3V CALL  read(0x7,0x3ec008,0x1000)
  1099 XF86_S3V GIO   fd 7 read 4 bytes
       "+\0\^A\0"

Wmaker seems to be doing something similar.  I'm not sure where either
of these loops begins or ends, but here's what seems to be a complete
cycle from wmaker:

  1102 wmaker   CALL  read(0x3,0xefbfda10,0x20)
  1102 wmaker   GIO   fd 3 read 32 bytes
"\^A\^B\M^D\M-x\0\0\0\0\^Q\0\0\^A\0\0\0\0\0\0\0\0\^A\0\0\0\0\0\0\0\^T\
        \M-C\^_\0"
  1102 wmaker   RET   read 32/0x20
  1102 wmaker   CALL  ioctl(0x3,FIONREAD,0xefbfd21c)
  1102 wmaker   RET   ioctl 0
  1102 wmaker   CALL
select(0x4,0xefbfdbb8,0xefbfdb38,0xefbfdab8,0xefbfdab0)
  1102 wmaker   RET   select -1 errno 22 Invalid argument
  1102 wmaker   CALL  gettimeofday(0xefbfdc38,0)
  1102 wmaker   RET   gettimeofday 0
  1102 wmaker   CALL  ioctl(0x3,FIONREAD,0xefbfd424)
  1102 wmaker   RET   ioctl 0
  1102 wmaker   CALL  ioctl(0x3,FIONREAD,0xefbfd424)
  1102 wmaker   RET   ioctl 0
  1102 wmaker   CALL  gettimeofday(0xefbfda2c,0)
  1102 wmaker   RET   gettimeofday 0
  1102 wmaker   CALL  write(0x3,0x63800,0x4)
  1102 wmaker   GIO   fd 3 wrote 4 bytes
       "+\0\^A\0"
  1102 wmaker   RET   write 4

I have a weird feeling they're talking to each other.  If I suspend
wmaker, XF86's CPU usage drops to zero.

Does anyone out there have any clues for me?


 Ben

"You have your mind on computers, it seems." 


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.02.9811221430490.19477-100000>