[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CA0D660.3010804@goop.org>
Date: Mon, 27 Sep 2010 10:37:36 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Greg KH <gregkh@...e.de>, Alan Cox <alan@...rguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...ux.intel.com>,
Ian Jackson <Ian.Jackson@...citrix.com>,
Steven Rostedt <rostedt@...dmis.org>,
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Subject: Powertop shows events/0 waking at high rate due to ptys
Hi,
I noticed on one of my systems that powertop was showing events/0 waking
at a high rate (~2000 times/sec, HZ=1000). After a lot of tracing I
found it was due to writes pending to ptys which hadn't been read.
Specifically, in flush_to_ldisc(), these lines seem to be causing the
repeated wakeups:
if (!tty->receive_room) {
schedule_delayed_work(&tty->buf.work, 1);
break;
}
After reading the pending writes the system settles down and wakeups
drops to a normal low level.
The program provoking this was Xen's xenconsoled, which manages running
domains' consoles; the unread output was various domains console
output. This doesn't seem to be related to Xen at all: Ian Jackson put
together a small standalone program (attached) which reproduces the
problem; he reports that this wakeup behaviour is a regression compared
to a 2.6.16 Debian kernel.
Compile ptypolling with: gcc -o ptypolling ptypolling.c -g -lutil
After running ptypolling, powertop shows events/0 waking at a high
rate. ptypolling itself is blocked in a select() and is idle.
Thanks,
J
View attachment "ptypolling.c" of type "text/x-csrc" (1176 bytes)
Powered by blists - more mailing lists