I've checked the code, it seems that contention is impossible:
The lock is only acquired in 'end_io_async()', and that
function is usually called from 'end_that_request_first'
which must be called with the io_request_lock acquired.
Ok, we don't want to rely on that, the interface should be SMP safe,
but one global spinlock is sufficient.
Andrea wrote:
> Since the wastage will be only in SMP I don't care too much, I
> would prefer to remove the buffer field that is useless instead
> of dropping a nice per-pagemap spinlock.
That's an invalid argument: remove both if that's possible, but
you cannot argue 'because I saved memory with the buffer/inode field
I can waste the memory somewhere else'.
-- Manfred
- 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/