Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752348AbaKJMmN (ORCPT ); Mon, 10 Nov 2014 07:42:13 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:63746 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156AbaKJMmL (ORCPT ); Mon, 10 Nov 2014 07:42:11 -0500 X-IronPort-AV: E=Sophos;i="5.07,352,1413244800"; d="scan'208";a="191161107" Date: Mon, 10 Nov 2014 12:41:58 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Stefano Stabellini CC: Catalin Marinas , Will Deacon , "xen-devel@lists.xensource.com" , "konrad.wilk@oracle.com" , "Ian.Campbell@citrix.com" , "david.vrabel@citrix.com" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v7 3/8] arm64: introduce is_device_dma_coherent In-Reply-To: Message-ID: References: <20141106103337.GA19702@e104818-lin.cambridge.arm.com> <20141107110524.GA21875@localhost> <20141107160006.GE29148@e104818-lin.cambridge.arm.com> <20141107181430.GH29148@e104818-lin.cambridge.arm.com> <20141110101645.GA21366@e104818-lin.cambridge.arm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Nov 2014, Stefano Stabellini wrote: > > BTW, pfn_valid() is more expensive than simply comparing the mfn with > > pfn for dom0. The calling code knows this already and it may be quicker > > to simply pass a "bool foreign" argument. > > Good point, I can compare mfn and pfn here. > I cannot do the same in unmap_page and the various sync operations, > because there is no pfn available, but maybe I could use > set_page_private to set a flag. I'll think about it. But of course there is no struct page either so I think pfn_valid will have to stay in unmap and sync -- 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/