Re: [patch][cft] zero-copy dma cd writing and ripping

Jens Axboe (axboe@suse.de)
Mon, 28 Oct 2002 16:08:32 +0100


On Mon, Oct 28 2002, David S. Miller wrote:
> On Mon, 2002-10-28 at 04:42, Jens Axboe wrote:
> > > This work reminds me that get_user_pages() (or it's callers)
> > > need to be doing some flush_dcache_page()
> >
> > Was wondering about that. Can you tell me what it needs? And what about
> > bio_unmap_user(), surely that needs to flush cache as well for reads?
>
> Documentation/cachetlb.txt describes where flush_dcache_page is needed.
> If that doesn't describe it enough for you, that is a bug and please
> tell me what part is confusing so I may make the document better.

Ok what I make of this is that from bio_map_user() (which does a
get_user_pages() I need to do a

if (write_to_vm)
flush_dcache_page(page);

and in bio_unmap_user() I do

if (!write_to_vm)
flush_dcache_page(page);

is that correct?

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/