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]
Date:	Sun, 11 Jul 2010 18:18:30 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Tejun Heo <tj@...nel.org>, Rusty Russell <rusty@...tcorp.com.au>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"the arch/x86 maintainers" <x86@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC PATCH] x86-64: software IRQ masking and handling

On Sun, Jul 11, 2010 at 3:03 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> I have seen some hits with cli-sti. I was considering swapping all
> preempt_disable() with local_irq_save() in ftrace, but hackbench showed
> a 30% performance degradation when I did that.

Yeah, but in that case you almost certainly keep the per-cpu cacheline
hot in the D$ L1 cache, and the stack tracer is presumably also not
taking any extra I$ L1 misses. So you're not seeing any of the
downsides. The upside of plain cli/sti is that they're small, and have
no D$ footprint.

And it's possible that the interrupt flag - at least if/when
positioned right - wouldn't have any additional D$ footprint under
normal load either. IOW, if there is an existing per-cpu cacheline
that is effectively always already dirty and in the cache,
But that's something that really needs macro-benchmarks - exactly
because microbenchmarks don't show those effects since they are always
basically hot-cache.

Also, the preempt code is pretty optimized and uses "add". Tejun uses
"btrl" at least in some places, which is generally not a fast
instruction.  So there's a few caveats there too. Which is why I'd
want numbers.

                   Linus
--
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