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?