Re: [PATCH] 2.2.14 make_request SMP safe?

From: Ingo Molnar (mingo@chiara.csoma.elte.hu)
Date: Fri Apr 14 2000 - 06:41:19 EST


On Thu, 13 Apr 2000, Roger Larsson wrote:

> if (buffer_locked(bh))
> return;
> lock_buffer(bh);
>
> But since interrupts are not disabled (IMHO) and no other locks are
> held (IMHO) there is a small (and rather unlikely) window for a
> dead-lock...

the above 2.2 code is 100% safe because we never lock buffers outside of
the big kernel lock. This was the reason why RAID0 broke subtly in 2.3,
because in 2.3 ll_rw_block() is done outside of the big kernel lock as
well.

interrupts can only unlock buffers, so there is no race. We only have to
synchronize with 'system call level' [non-irq, non-bh, non-tasklet, etc.]
code.

        Ingo

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



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:24 EST