All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Greg KH <gregkh@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: Powertop shows events/0 waking at high rate due to ptys
Date: Thu, 30 Sep 2010 09:19:07 +0200	[thread overview]
Message-ID: <20100930071907.GA2429@ucw.cz> (raw)
In-Reply-To: <4CA1367F.7040106@goop.org>

On Mon 2010-09-27 17:27:43, Jeremy Fitzhardinge wrote:
>  On 09/27/2010 11:15 AM, Alan Cox wrote:
> > Really the line discipline should wake the work queue when it sets
> > tty->receive_room non-zero, but while only n_tty currently uses that
> > facility the existing code doesn't do it in any kind of race-free manner
> > and sometimes is only saved by the polling picking it up.
> >
> > It's all really just a symptom of the fact that input and output buffers
> > shouldn't be attached to the tty in the first place but to a struct
> > representing the physical port. Fix that and the race conditions in
> > serial output go away, as do the potential crashes and this wakeup stuff
> > as well as a ton of locking in the irq/tx/rx paths. In several cases it
> > also saves you an entire copy.
> >
> > Unfortunately while I got the tty port structures into lots of places
> > needed the job never gone done.
> 
> OK, so it sounds like there's a basic design problem here which will
> need some non-trivial work to fix.  In the meantime we'll need to look
> at doing something to work around the issue, since it ends up consuming
> a non-trivial amount of CPU in events/0.  I guess reducing HZ would be
> the first, simplest thing to do, but changing xenconsoled to avoid
> writing to readerless ptys might not be too hard.

Replace "1" in schedule_delayed_work with (HZ/100) should make it
better, and looks like good thing while better fix is prepared?



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2010-09-30 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 17:37 Powertop shows events/0 waking at high rate due to ptys Jeremy Fitzhardinge
2010-09-27 18:15 ` Alan Cox
2010-09-28  0:27   ` Jeremy Fitzhardinge
2010-09-30  7:19     ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100930071907.GA2429@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@linux.intel.com \
    --cc=gregkh@suse.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.