lkml.org 
[lkml]   [1999]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel-hacking-HOWTO: An lk primer seeks feedback
On 20 Sep 1999, Jes Sorensen wrote:

>enable_irq/disable_irq are quite expensive and should not be used

disable_irq is expensive but disable_irq_nosync is quite fast as it
complete even if there are other irq running at the same time.

>are better off disabling interrupts directly on the device (most sane
>hardware has a bit to disable it) or using spin locks.

If you need to grab the spinlock for a rasonable time then the best is to
disable_irq_nosync and then grab the spinlock as 3c509 does, so you won't
harm irq latency and you'll scale equally well as a local cli on SMP.

Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.032 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site