Re: ANNOUNCE: big change in PCM kernel API

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 8 Jan 2000 22:45:33 +0000 (GMT)


> ALSA has already the same behaviour (also for OSS emulation) and the
> inode lock is dropped on write (to tell you the truth I'd have preferred
> that sys_write transfer the inode->i_sem handling entirely to
> f_op->write, but probably the efficiency impact of the double down/up is
> small)
>
> I'm not sure to understand the second part (and one sleeping on a write
> locks out the other), can you rephrase that?

If you don't drop the lock then what can occur is what you already avoided
by dropping the lock

Task1
sys_write(sound_fd, buf, len)
driver write
driver does blocking wait for 10 seconds

Task2
sys_write
sleep in inode lock for 10 seconds

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