All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Lee Revell <rlrevell@joe-job.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: preempt timing violations
Date: Mon, 26 Jul 2004 11:22:51 +0200	[thread overview]
Message-ID: <20040726092251.GA25904@elte.hu> (raw)
In-Reply-To: <1090832953.6936.114.camel@mindpipe>


* Lee Revell <rlrevell@joe-job.com> wrote:

> > this is the normal sys_exit()->exit_mmap()->unmap_vmas() path. It's
> > weird that it generated a 2ms latency. What are the values of
> > voluntary_preemption and kernel_preemption on your current kernel? With
> > a 2:0 setting we ought to have a reschedule point every 32 pages.  Do
> > you know which application triggers this latency and is it easy to
> > reproduce?
> > 
> 
> 2 and 1.  Now that I think about it, this could have happened during
> bootup, before my rc.local set these.  I will try passing them on the
> kernel command line. 

hm, if you enabled kernel_preemption then the get_user_pages() fix in
-J3 should already be available via normal kernel preemption, because
make_pages_present() is preemptible. I am wondering whether the
preempt-timing patch properly deals with CONFIG_PREEMPT? Did those
latencies get accompanied by a real Alsa XRUN as well? (assuming you can
set the XRUN threshold to be close to the preempt-timing threshold.)

> Not sure I understand the difference between 2:1 and 2:0.  Would the
> latter make the kernel only preemptible at the voluntary preemption
> points?

yes, this is the default on bootup. 1:0 is in essence what we are using
in the latest development kernels of Fedora Core 3, hence the focus and
distinction. It is an intermediate preemptability step between the
vanilla kernel and full CONFIG_PREEMPT. If the concept produces a stable
enough kernel for use in bigger distros such as FC3 it could pave the
way for more mainstream acceptance of CONFIG_PREEMPT.

> > does this one trigger when you are using the VGA console? (or fbcon)?
> > 
> > it's not immediately obvious to me precisely where this latency comes
> > from, it would be nice to know how to reproduce it.
> 
> It think this one was caused by switching virtual consoles.  At one
> point Andrew Morton suggested I remove the (un)lock_kernel calls from
> do_tty_write.  This fixed the problem, with no detectable side
> effects.  Maybe this could be incorporated into voluntary-preempt, it
> would be useful to have more than one person to test it.

if it's the text consoles that you used then most latencies are caused
by the text-video-RAM copying. Even today's fast videocards do that with
very bad performance - especially since we often do copies within
videoram too. Such a copying of ~6K of videoram can easily take 3-4
msecs.

If the tty layer is run without the kernel lock then this copying
becomes preemptible. Could you send me the current tty-unlock patch that
you are using? (i've seen some early ones.)

	Ingo

  reply	other threads:[~2004-07-26  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26  3:51 preempt timing violations Lee Revell
2004-07-26  8:50 ` Ingo Molnar
2004-07-26  9:09   ` Lee Revell
2004-07-26  9:22     ` Ingo Molnar [this message]
2004-07-26  9:25     ` Ingo Molnar
2004-07-26 15:43   ` preempt timing violations (unmap_vmas) Rudo Thomas

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=20040726092251.GA25904@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    /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.