All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	mingo@elte.hu, akpm@osdl.org,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] x86 NMI-safe INT3 and Page Fault (v5)
Date: Mon, 21 Apr 2008 11:11:11 -0400	[thread overview]
Message-ID: <20080421151111.GA6563@Krystal> (raw)
In-Reply-To: <20080421150825.GA4070@Krystal>

* Mathieu Desnoyers (compudj@krystal.dyndns.org) wrote:
> * H. Peter Anvin (hpa@zytor.com) wrote:
> > Pavel Machek wrote:
> >> On Thu 2008-04-17 16:14:10, Mathieu Desnoyers wrote:
> >>> (hopefully finally CCing LKML) :)
> >>>
> >>> Implements an alternative iret with popf and return so trap and exception
> >>> handlers can return to the NMI handler without issuing iret. iret would 
> >>> cause
> >>> NMIs to be reenabled prematurely. x86_32 uses popf and far return. x86_64 
> >>> has to
> >>> copy the return instruction pointer to the top of the previous stack, 
> >>> issue a
> >>> popf, loads the previous esp and issue a near return (ret).
> >> sounds expensive. Does it slow down normal loads?
> >
> > It should *only* be used to return from NMI, #MC or INT3 (breakpoint), 
> > which should never happen in normal operation, and even then only when 
> > interrupting another NMI or #MC handler.
> >
> > 	-hpa
> >
> 
> Just to be clear : the added cost on normal interrupt return is to add a
> supplementary test of the thread flags already loaded in registers and

err, by thread flag, I meant thread preempt count. And it's not in
registers, so it has to be read from the data cache (it's clearly
already there).

> a conditional branch. This is used to detect if we are nested over an
> NMI handler. I doubt anyone ever notice an impact caused by this added
> test/branch.
> 
> Mathieu
> 
> -- 
> Mathieu Desnoyers
> Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

      parent reply	other threads:[~2008-04-21 15:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080417165839.GA25198@Krystal>
     [not found] ` <20080417165944.GB25198@Krystal>
2008-04-17 20:14   ` [RFC PATCH] x86 NMI-safe INT3 and Page Fault (v5) Mathieu Desnoyers
2008-04-17 20:29     ` Andrew Morton
2008-04-17 21:16       ` Mathieu Desnoyers
2008-04-17 21:26         ` Andrew Morton
2008-04-17 22:01     ` Andi Kleen
2008-04-18  0:06       ` Mathieu Desnoyers
2008-04-18  8:07         ` Andi Kleen
2008-04-19 21:00           ` Mathieu Desnoyers
2008-04-18 11:30         ` Andi Kleen
2008-04-19 21:23           ` Mathieu Desnoyers
2008-04-21 14:00     ` Pavel Machek
2008-04-21 14:22       ` H. Peter Anvin
2008-04-21 14:51         ` Mathieu Desnoyers
2008-04-21 15:08         ` Mathieu Desnoyers
2008-04-21 15:08           ` H. Peter Anvin
2008-04-21 15:21             ` Mathieu Desnoyers
2008-04-21 15:47             ` Mathieu Desnoyers
2008-04-21 17:23               ` Pavel Machek
2008-04-21 17:28                 ` H. Peter Anvin
2008-04-21 17:42                   ` Mathieu Desnoyers
2008-04-21 17:59                     ` H. Peter Anvin
2008-04-22 13:12                       ` Mathieu Desnoyers
2008-04-21 15:11           ` Mathieu Desnoyers [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=20080421151111.GA6563@Krystal \
    --to=compudj@krystal.dyndns.org \
    --cc=akpm@osdl.org \
    --cc=fche@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rostedt@goodmis.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.