[PATCH 29/31] parisc: handle page-less SG entries
torvalds at linux-foundation.org
Thu Aug 13 02:01:02 AEST 2015
On Wed, Aug 12, 2015 at 12:05 AM, Christoph Hellwig <hch at lst.de> wrote:
> Make all cache invalidation conditional on sg_has_page() and use
> sg_phys to get the physical address directly.
So this worries me a bit (I'm just reacting to one random patch in the series).
I think this wants a big honking comment somewhere saying "non-sg_page
accesses are not necessarily cache coherent").
Now, I don't think that's _wrong_, but it's an important distinction:
if you look up pages in the page tables directly, there's a very
subtle difference between then saving just the pfn and saving the
"struct page" of the result.
On sane architectures, this whole cache flushing thing doesn't matter.
Which just means that it's going to be even more subtle on the odd
I'm assuming that anybody who wants to use the page-less
scatter-gather lists always does so on memory that isn't actually
virtually mapped at all, or only does so on sane architectures that
are cache coherent at a physical level, but I'd like that assumption
(And maybe it is, and I just didn't get to that patch yet)
More information about the Linuxppc-dev