Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755162AbbHLQBL (ORCPT ); Wed, 12 Aug 2015 12:01:11 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:36078 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753552AbbHLQBD (ORCPT ); Wed, 12 Aug 2015 12:01:03 -0400 MIME-Version: 1.0 In-Reply-To: <1439363150-8661-30-git-send-email-hch@lst.de> References: <1439363150-8661-1-git-send-email-hch@lst.de> <1439363150-8661-30-git-send-email-hch@lst.de> Date: Wed, 12 Aug 2015 09:01:02 -0700 X-Google-Sender-Auth: eZaVXoqdsc3fijjVhhGuuPDmGqg Message-ID: Subject: Re: [PATCH 29/31] parisc: handle page-less SG entries From: Linus Torvalds To: Christoph Hellwig Cc: Jens Axboe , Dan Williams , Vineet Gupta , =?UTF-8?Q?H=C3=A5vard_Skinnemoen?= , Hans-Christian Egtvedt , Miao Steven , David Howells , Michal Simek , "the arch/x86 maintainers" , David Woodhouse , Alex Williamson , grundler@parisc-linux.org, Linux Kernel Mailing List , "linux-arch@vger.kernel.org" , linux-alpha@vger.kernel.org, "linux-ia64@vger.kernel.org" , linux-metag@vger.kernel.org, linux-mips , Parisc List , ppc-dev , linux-s390 , sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, "linux-nvdimm@lists.01.org" , Linux Media Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1400 Lines: 34 On Wed, Aug 12, 2015 at 12:05 AM, Christoph Hellwig 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). The reason? 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 broken ones.. 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 *documented* somewhere. (And maybe it is, and I just didn't get to that patch yet) Linus -- 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/