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] [day] [month] [year] [list]
Message-Id: <20091005.211852.12665189.davem@davemloft.net>
Date:	Mon, 05 Oct 2009 21:18:52 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	Ramkrishna.Vepa@...erion.com
Cc:	Sreenivasa.Honnur@...erion.com, netdev@...r.kernel.org
Subject: Re: [net-next-2.6 PATCH 8/9] vxge: Acquire correct lock based on
 interrupt context.

From: "Ramkrishna Vepa" <Ramkrishna.Vepa@...erion.com>
Date: Mon, 5 Oct 2009 22:36:22 -0400

>> > - Added macros that check if the thread is in interrupt context or
> not
>> to
>> >   acquire or release locks
>> >
>> > Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@...erion.com>
>> 
>> There is nothing at all wrong with using irqsave/irqrestore spin lock
>> calls when you're already in an interrupt.
>> 
>> I don't see any reason for this change.
> [Ram] Right, but why have the additional step of saving and restoring
> the flags while in the interrupt context?

Do you know that in the interrupt handler, cpu interrupts are
actually enabled?

And the cost is (relatively speaking) next to nothing.  You're
in the process of taking cache misses and toucing PIO registers
(on the order of thousands of cycles).

Not doing a IRQ save/restore is going to save you a hand full
of cycles.

The new branch mispredict you might get there is probably more
expensive or of equal expense to the IRQ save/restore itself.

This change makes really no sense, NO OTHER DRIVER does crap
like this.  Because there is no reason to.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ