On Tue, Oct 15, 2024 at 06:54:13AM +0200, Christoph Hellwig wrote: > On Mon, Oct 14, 2024 at 07:09:08PM +0100, Robin Murphy wrote: > >>> The only case I fully understand without looking into the details > >>> is raid1, and that will obviously map the same data multiple times > >> > >> The other cases should be concurrent DIOs on same userspace buffer. > > > > active_cacheline_insert() does already bail out for DMA_TO_DEVICE, so it > > returning -EEXIST to tickle the warning would seem to genuinely imply these > > are DMA mappings requesting to *write* the same cacheline concurrently, > > which is indeed broken in general. > > Yes, active_cacheline_insert only complains for FROM_DEVICE or > BIDIRECTIONAL mappings. I can't see how raid 1 would trigger that > given that it only reads from one leg at a time. > > Ming, can you look a bit more into what is happening here? All should be READ IO which is FROM_DEVICE, please see my reply: https://lore.kernel.org/linux-block/Zw3MZrK_l7DuFfFd@fedora/ And the raid1 warning is actually from raid1_sync_request(). Thanks, Ming