Re: Concurrent read/writes on the same file

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Fri, 11 Dec 1998 15:42:59 +0000


On Fri, Dec 11, 1998 at 02:18:03PM +0000, Stephen C. Tweedie wrote:
> > Wouldn't a per-inode rwlock_t be efficient for this? (Instead of the
> > current per-inode writer semaphore).
>
> I've considered it before, but it would be terrible for performance.
> For database writes, you _really_ want to be able to queue multiple
> writes to the file at once and have the kernel sort them out (think
> asynchronous IO using threads).

No, no! We already serialise the copy-from-user part of writes (using
inode->i_sem).

I mean what about using a read-write lock instead of a semaphore, so
that concurrent *reads* are permitted, but not at the same time as the
copy-from-user part of writes.

-- Jamie

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