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: <1236333543.7260.138.camel@pasglop>
Date:	Fri, 06 Mar 2009 20:59:03 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-arch <linux-arch@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH] irq: remove IRQF_DISABLED


> If you have distinct interrupt priorities, you can
> 
> 1) provide an interrupt stack for each priority
> 2) mask all lower priorities when handling one
> 
> Would that not work?

The PIC does that already. IE. it will only interrupt again before
->eoi() for an interrupt of a higher priority. But by using
IRQF_DISABLED, you mask interrupts in the core, and thus effectively
completely prevents the whole thing.

> The problems with enabling irqs in hardirq handlers are that you get
> unlimited irq nesting, which is bad for your stack, furthermore, somehow
> people thing it makes things 'faster' because the irq-off latency goes
> down.

No, you don't get unlimited IRQ nesting, at least not on sane archs with
a decent PIC that does things like what I described above :-)

> The latter just isn't true, as you still have preemption disabled, so
> everything but irqs still suffers.
> 
> The only way to make things low-latency is to pull work out of
> non-preemptable context. Using threaded IRQs is one way to do that.

Cheers,
Ben.


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