lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878uy2ytd8.fsf@tassilo.jf.intel.com>
Date:	Wed, 09 Oct 2013 15:25:23 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	"H. Peter Anvin" <hpa@...ux.intel.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Clark Williams <williams@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Kleen\, Andi" <andi.kleen@...el.com>
Subject: Re: [RFC][PATCH] x86: Lazy disabling of interrupts

"H. Peter Anvin" <hpa@...ux.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@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ