Re: [RFC] atomic highmem kmap page pinning
From: Nicolas Pitre
Date: Wed Mar 04 2009 - 21:38:21 EST
On Thu, 5 Mar 2009, Minchan Kim wrote:
> I thought kmap and dma_map_page usage was following.
>
> kmap(page);
> ...
> dma_map_page(...)
> invalidate_cache_line
>
> kunmap(page);
>
> In this case, how do pkmap_count value for the page passed to dma_map_page become 1 ?
> The caller have to make sure to complete dma_map_page before kunmap.
The caller doesn't have to call kmap() on pages it intends to use for
DMA.
> Do I miss something ?
See above.
> > > As far as I understand, To make irq_disable to prevent this problem is
> > > rather big cost.
> >
> > How big? Could you please elaborate on the significance of this cost?
>
> I don't have a number. It depends on you for submitting this patch.
My assertion is that the cost is negligible. This is why I'm asking you
why you think this is a big cost.
Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/