From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932406AbdJYJgb (ORCPT ); Wed, 25 Oct 2017 05:36:31 -0400 Received: from smtp-out6.electric.net ([192.162.217.192]:61925 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932300AbdJYJg2 (ORCPT ); Wed, 25 Oct 2017 05:36:28 -0400 From: David Laight To: "'Jim Quinlan'" CC: Christoph Hellwig , Robin Murphy , "linux-kernel@vger.kernel.org" , Mark Rutland , Linux-MIPS , "Florian Fainelli" , "devicetree@vger.kernel.org" , linux-pci , "Kevin Cernekee" , Will Deacon , "Ralf Baechle" , Rob Herring , bcm-kernel-feedback-list , "Gregory Fong" , Catalin Marinas , Bjorn Helgaas , Brian Norris , "linux-arm-kernel@lists.infradead.org" , Marek Szyprowski , "iommu@lists.linux-foundation.org" Subject: RE: [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic Thread-Topic: [PATCH 5/9] PCI: host: brcmstb: add dma-ranges for inbound traffic Thread-Index: AQHTSbf9TBl9DXAo7kWMSYcuxab+MqLxJ8nggAIaHwCAARHcIA== Date: Wed, 25 Oct 2017 09:36:37 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD00A24FC@AcuExch.aculab.com> References: <1507761269-7017-6-git-send-email-jim2101024@gmail.com> <589c04cb-061b-a453-3188-79324a02388e@arm.com> <20171017081422.GA19475@lst.de> <20171018065316.GA11183@lst.de> <20171019091644.GA14983@lst.de> <20171020073730.GA12937@lst.de> <20171020145752.GA4694@lst.de> <063D6719AE5E284EB5DD2968C1650D6DD009F05A@AcuExch.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v9P9aaHv005799 From: Jim Quinla > Sent: 24 October 2017 19:08 ... > Hi David, Christoph was also concerned about this: > > "For the block world take a look at __blk_segment_map_sg which does the merging > of contiguous pages into a single SG segment. You'd have to override > BIOVEC_PHYS_MERGEABLE to prevent this from happening in your supported > architectures for the block layer." > > Do you consider this a non-issue as well or can this happen and span > memory regions? Probably easiest to have an architecture limit on the addresses that can be merged. My guess is that this code only really ever merges pages that were allocated contiguously, but have got converted to a list of VA. So stopping merging over even 1MB boundaries would have minimal effect (even if done unconditionally). I even wonder if the merging is actually worthwhile at all? Maybe if any code has limits on the SG list length. (or reducing the number of cache lines the get dirtied...) David