public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Clark Williams <williams@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Andrew Morton <akpm@linux-foundation.org>, "Kleen\,
	Andi" <andi.kleen@intel.com>
Subject: Re: [RFC][PATCH] x86: Lazy disabling of interrupts
Date: Wed, 09 Oct 2013 15:25:23 -0700	[thread overview]
Message-ID: <878uy2ytd8.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <5255C07E.70805@linux.intel.com> (H. Peter Anvin's message of "Wed, 09 Oct 2013 13:45:50 -0700")

"H. Peter Anvin" <hpa@linux.intel.com> writes:

>> Summary
>> -------
>> 
>> Although the extreme case shows a nice improvement, I'm skeptical if it
>> is worth doing for real world applications.
>
> You did the experiment, and credit to you for not going "I did the work,
> now include it" but rather for publishing the results so we can learn
> from them.
>
> It *does* make me wonder if we can leverage RTM for a significant subset
> of these (as an interrupt will abort a transaction); that should be
> substantially cheaper and less complex.

I miss the original context and can't find the original patchkit, but:

- If the goal is to lower interrupt latency then RTM would still
need to use a fallback, so the worst case would be the fallback, thus
not be better.

- If the goal is to make CLI/STI faster:
I'm not sure RTM is any faster than a PUSHF/CLI/POPF pair. It may
well be slightly slower in fact (guessing here, haven't benchmarked)

- Also when you abort you would need to reexecute of course.

- My TSX patchkit actually elides CLI/STI inside transactions
(no need to do them, as any interrupt would abort anyways)
but the main motivation was to avoid extra aborts.

- That said, I think a software CLI/STI is somewhat useful for profiling,
as it can allow to measure how long interrupts are delayed
by CLI/STI.  I heard use cases of this, but I'm not 
sure how common it really is

[I presume a slightly modified RT kernel could also give the same
profiling results]

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2013-10-09 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20131009144150.108f7041@gandalf.local.home>
2013-10-09 20:45 ` [RFC][PATCH] x86: Lazy disabling of interrupts H. Peter Anvin
2013-10-09 22:25   ` Andi Kleen [this message]
2013-10-10  0:36     ` Steven Rostedt
2013-10-10  3:39       ` David Miller
2013-10-10  3:54         ` Steven Rostedt
2013-10-10  4:53     ` Ingo Molnar
     [not found] ` <20131010001153.1f171bff@gandalf.local.home>
2013-10-10  4:19   ` David Miller
2013-10-10  9:03     ` Borislav Petkov
2013-10-10 12:30       ` Steven Rostedt
2013-10-10 13:40         ` Borislav Petkov
2013-10-10 12:27 Steven Rostedt <rostedt@goodmis.org> (by way of Steven Rostedt <rostedt@goodmis.org>) (by way of Steven Rostedt
2013-10-10 14:45 ` anish singh

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=878uy2ytd8.fsf@tassilo.jf.intel.com \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=williams@redhat.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