public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Andrew Morton <akpm@zip.com.au>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] syscall latency improvement #1
Date: Sat, 26 Jan 2002 04:00:05 +0000	[thread overview]
Message-ID: <20020126040005.H5730@kushida.apsleyroad.org> (raw)
In-Reply-To: <18993.1011984842@warthog.cambridge.redhat.com> <Pine.LNX.4.33.0201251626490.2042-100000@penguin.transmeta.com> <3C51FF0C.D3B1E2F7@zip.com.au>
In-Reply-To: <3C51FF0C.D3B1E2F7@zip.com.au>; from akpm@zip.com.au on Fri, Jan 25, 2002 at 04:57:48PM -0800

Andrew Morton wrote:
> > NOTE! There are potentially other ways to do all of this, _without_ losing
> > atomicity. For example, you can move the "flags" value into the slot saved
> > for the CS segment (which, modulo vm86, will always be at a constant
> > offset on the stack), and make CS=0 be the work flag. That will cause the
> > CPU to trap atomically at the "iret".
> 
> Ingo's low-latency patch put markers around the critical code section,
> and inspected the return EIP on the way back out of the interrupt.
> If it falls inside the racy region, do special stuff.

Latency tests showed that fixed the problem as well as the cli.  It's
just _much_ uglier to read, is all.

Although it saves the cli from syscalls and interrupts, it adds back a
small cost to interrupts.  Fortunately, syscall latency is far more
important than interrupt latency.

If we're going to micro-optimise the system calls, then markers are
definitely the way to fix the return path race IMHO.

-- Jamie

  parent reply	other threads:[~2002-01-26  4:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-25 18:54 [PATCH] syscall latency improvement #1 David Howells
2002-01-25 22:35 ` Robert Love
2002-01-26 10:07   ` Nigel Gamble
2002-01-25 23:07 ` Paul Mackerras
2002-01-26  0:39 ` Linus Torvalds
2002-01-26  0:57   ` Andrew Morton
2002-01-26  1:20     ` Linus Torvalds
2002-01-26  4:00     ` Jamie Lokier [this message]
2002-01-28 14:18     ` Denis Vlasenko
2002-01-28 10:30       ` Andrew Morton
2002-01-28 15:28         ` Jeff Dike
2002-01-29  0:53         ` Rusty Russell
2002-01-29 12:54         ` Pavel Machek
2002-01-29 12:59         ` Denis Vlasenko
2002-02-21  7:10           ` Cameron Simpson
2002-01-26 18:39   ` [PATCH] " Alan Cox
2002-01-27 19:59     ` Jamie Lokier
     [not found] <18993.1011984842@warthog.cambridge.redhat.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0201251626490.2042-100000@penguin.transmeta.com.suse.lists.linux.kernel>
2002-01-26  1:24   ` Andi Kleen
2002-01-26  1:53     ` Linus Torvalds
2002-01-26  2:03       ` Andi Kleen
2002-01-26  2:14         ` Linus Torvalds
2002-01-26  2:26           ` Andi Kleen
2002-01-26  2:39             ` Dave Jones
2002-01-26  2:53           ` Davide Libenzi
2002-01-26  2:10       ` Andrew Morton
2002-01-26  3:06         ` Robert Love
2002-01-26  3:20           ` Robert Love

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=20020126040005.H5730@kushida.apsleyroad.org \
    --to=lk@tantalophile.demon.co.uk \
    --cc=akpm@zip.com.au \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox