Received: by 10.223.185.116 with SMTP id b49csp7868626wrg; Thu, 1 Mar 2018 12:36:25 -0800 (PST) X-Google-Smtp-Source: AG47ELsKf34SZq1Bea+rAOm27s6pALb8VN1x+LmNc0mXcrwSbsC6AhnWF2HWSlISOW4oSUytrl9Y X-Received: by 10.98.72.10 with SMTP id v10mr3185943pfa.148.1519936585014; Thu, 01 Mar 2018 12:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519936584; cv=none; d=google.com; s=arc-20160816; b=TzrJHMt87m8+BUJ05ECnGsgNT1oP2IkGOa7hJ7XoPHCgliUqagRrRDSdhBF0eaSPIJ 8h1gFAm1BN9bPl9OTW+U5lcidMDupyFTMIRBO1PQkWZVsgC8/Au0N7Grei+6S14vw+D4 FoJFmo/cvKxOFbvIMYLAJnTAdZgVqkcTcfmd9/Q/UK9iU/P+itIDcogQYfin2bAF5e1C DtVIP439dhZvnJHhvt7G9TWVXjXj7gEB9GYNN8L9k9dhK6WmZlJxxpGTXVNiY0KR7E9v 7++CHtTe8Aod++qKeyAe+Vv36V7Re2wYG5qDMzELZsWJXkH+lTauLeZ+u+d045k8T8hT 39NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to :reply-to:from:subject:arc-authentication-results; bh=mSrRp6nSaH1hNayIKh+89sbaZOhC5oA0RHhwq+MPTSE=; b=y5iKsGNsaC9sFg5u2tkJXB1kCeWcqI3dt828yDMZbXV7ucjAQvsAm5XW/kIOXivWMr Elax/UV1qb1BDnGhpBKBtYZHezay9S5U3M96SX8rE21qs71pUwNmujEcoErgvEHvFZad yesxUxqIOaEyDuEB2L85v2ihWXr6dnMaUcArBNL31PASqR402wajuaS0e1WNKi2P4J8A YO6ML6Ze5v6BaeVZ+GsiAQN4RxBI+LOlj6d8scAkHvVj79j5NsDvvdN2vyTRjGCQmPfX rkMIJqz+aWg1OYRvfwjw6jEPO4m+ry56o2ytynDCUWwS/FyPRzGM0auariinEvSEToLj LkfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d81si3534403pfj.222.2018.03.01.12.36.09; Thu, 01 Mar 2018 12:36:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034200AbeCAUew (ORCPT + 99 others); Thu, 1 Mar 2018 15:34:52 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51984 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033189AbeCAUeu (ORCPT ); Thu, 1 Mar 2018 15:34:50 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w21KYGaD013428 for ; Thu, 1 Mar 2018 15:34:49 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gem4kmhdq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 01 Mar 2018 15:34:49 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Mar 2018 20:34:46 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 1 Mar 2018 20:34:42 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w21KYfjo48758838; Thu, 1 Mar 2018 20:34:41 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A82352043; Thu, 1 Mar 2018 19:26:25 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id EB43052041; Thu, 1 Mar 2018 19:26:24 +0000 (GMT) Received: from pasglop (unknown [9.192.160.12]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 8B71DA001E; Fri, 2 Mar 2018 07:34:38 +1100 (AEDT) Subject: Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory From: Benjamin Herrenschmidt Reply-To: benh@au1.ibm.com To: Dan Williams Cc: Logan Gunthorpe , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma , linux-nvdimm , linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Alex Williamson , Oliver OHalloran Date: Fri, 02 Mar 2018 07:34:37 +1100 In-Reply-To: References: <20180228234006.21093-1-logang@deltatee.com> <1519876489.4592.3.camel@kernel.crashing.org> <1519876569.4592.4.camel@au1.ibm.com> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5 (3.26.5-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18030120-0016-0000-0000-0000052B9DEA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030120-0017-0000-0000-00002868A417 Message-Id: <1519936477.4592.23.camel@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-01_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803010252 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-03-01 at 11:21 -0800, Dan Williams wrote: > On Wed, Feb 28, 2018 at 7:56 PM, Benjamin Herrenschmidt > wrote: > > On Thu, 2018-03-01 at 14:54 +1100, Benjamin Herrenschmidt wrote: > > > On Wed, 2018-02-28 at 16:39 -0700, Logan Gunthorpe wrote: > > > > Hi Everyone, > > > > > > > > > So Oliver (CC) was having issues getting any of that to work for us. > > > > > > The problem is that acccording to him (I didn't double check the latest > > > patches) you effectively hotplug the PCIe memory into the system when > > > creating struct pages. > > > > > > This cannot possibly work for us. First we cannot map PCIe memory as > > > cachable. (Note that doing so is a bad idea if you are behind a PLX > > > switch anyway since you'd ahve to manage cache coherency in SW). > > > > Note: I think the above means it won't work behind a switch on x86 > > either, will it ? > > The devm_memremap_pages() infrastructure allows placing the memmap in > "System-RAM" even if the hotplugged range is in PCI space. So, even if > it is an issue on some configurations, it's just a simple adjustment > to where the memmap is placed. But what happens with that PCI memory ? Is it effectively turned into nromal memory (ie, usable for normal allocations, potentially used to populate user pages etc...) or is it kept aside ? Also on ppc64, the physical addresses of PCIe make it so far appart that there's no way we can map them into the linear mapping at the normal offset of PAGE_OFFSET + (pfn << PAGE_SHIFT), so things like page_address or virt_to_page cannot work as-is on PCIe addresses. Ben.