lkml.org 
[lkml]   [2002]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [2.4.17/18pre] VM and swap - it's really unusable
From
Date
On Sun, 2002-01-13 at 06:39, Russell King wrote:
> On Sat, Jan 12, 2002 at 10:10:55PM -0500, Robert Love wrote:
> > It can if we increment the preempt_count in disable_irq_nosync and
> > decrement it on enable_irq.
>
> Who says you're going to be enabling IRQs any time soon? AFAIK, there is
> nothing that requires enable_irq to be called after disable_irq_nosync.
>
> In fact, you could well have the following in a driver:
>
> /* initial shutdown of device */
>
> disable_irq_nosync(i); /* or disable_irq(i); */
>
> /* other shutdown stuff */
>
> free_irq(i, private);
>
> and you would have to audit all drivers to find out if they did this -
> this would seriously damage your preempt_count.

I wasn't thinking. Anytime we are in an interrupt handler, preemption
is disabled. Regardless of how (or even if) interrupts are disabled.
We bump preempt_count on the entry path. So, no problem.

Robert Love

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

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