Received: by 10.223.185.116 with SMTP id b49csp8008927wrg; Thu, 1 Mar 2018 15:22:01 -0800 (PST) X-Google-Smtp-Source: AG47ELt+YoGpE3KmNw7DBdoBSN0WCoonlE+0pnP7fwNWaXqVsWivwHOlcLBj48aYngBsat/DUI/a X-Received: by 10.98.249.10 with SMTP id o10mr3623329pfh.222.1519946521065; Thu, 01 Mar 2018 15:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519946521; cv=none; d=google.com; s=arc-20160816; b=dF/QC/2Vd2LTxxslE0x/GjJQszxByUaXby0oY+PDN5J7dh5LXgyY5Y799UsDvBh7t2 2uEuRNYzyeTyw4em1d2SXELLwkADDOKVbukx89zHR0zbl/9fL7dSpytc9CaANg5LQA7V fv6bIe/1fKoev5tIIAKguScgk7ANtPpoeZg422YWkpb8QwE8n8SU5dHcOcjAodBlgYCF GKYxJqtmI0PtKxE10sV/GqpSlZDCXh5PxbTDha7EdygJy48STFwFLGqAAWnizSpE2ZR6 5LMoSu9KQ1V1XhT1Z6AqSu2aq7zpvgvHP08duiIez0hxUUfFlvBv9N+9QEZxTvrGcm/D rDfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ofA/JkjMO0CRP7jaWbmq8ZYOsQRaRIYpeKgmlFTzvJY=; b=WmwDB2JrSaPMub0iGfzfhkpe6cWwEaFAh+HcvWFFfdUd8Mgv+4syfCL3bVO2R4ZvNu tgYUI4j+LnXVEaAqzlppqn6VDPDRmBRz5cMX1kY4CCDq7rWsRmSLKk2ilOUHVqXvogrN 8VowDSDVvkPT8II8EPlHUbByEEdYkduBEXptAi2tXLSERVa77wGWz0WQnjAGn9mj4UtR Lk7aXXWuAmBUyyW1qYUTRzKY4nvON0lY8u0trvryOIXA/4smNtDMo6XqmUzsu5CbjRAd WgR6asPj7rkipgE39onmfFDamqP0hcLakTmVPyZk280tRbb1yNuGqRt6OonuV7Fcy0lw to6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=kIlN3uaI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s196si3070629pgc.129.2018.03.01.15.21.46; Thu, 01 Mar 2018 15:22:01 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=kIlN3uaI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162921AbeCAXUs (ORCPT + 99 others); Thu, 1 Mar 2018 18:20:48 -0500 Received: from mail-wr0-f172.google.com ([209.85.128.172]:36405 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162891AbeCAXUq (ORCPT ); Thu, 1 Mar 2018 18:20:46 -0500 Received: by mail-wr0-f172.google.com with SMTP id v111so8305200wrb.3 for ; Thu, 01 Mar 2018 15:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ofA/JkjMO0CRP7jaWbmq8ZYOsQRaRIYpeKgmlFTzvJY=; b=kIlN3uaIfmTz9sET3bJR9vWsHss7cPA7jHmETwNKhxtxoVhHPT7Bb2tZYmIcMGN/9D xilWfeUzJxmbXThQJUz/8bOAQrtYwwk1ODCt/8h/pYatIOJLJrqvK7mnSQOK+cvbcEzz knrB921IbB/gLyatieFJ3n3UgZzo//iw/T8wyT/WeVhRh7sECqbrnPSlreszMNv4ywA4 eS+DiS/S9LkvkRiDqhWE2q+9asDVXmoq4cbDzvJ2Rbxebgf30Xx0lB5sGqWOyTprhyt+ 4wSkZUmDO2UEXqEm+7iqmIdoc9OzQedlpghv827cemlaZin8gNwLZ5y2xecPMfBusZrf /YgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ofA/JkjMO0CRP7jaWbmq8ZYOsQRaRIYpeKgmlFTzvJY=; b=WF0Ra1W4FIc/draqs6P/suen0Qb9sR15YR7iOK15QVDMoOewoqMDLxOw9nEJtinBg1 TatxcArOKiWYDMUdsO3hkrBOdEgPwfFLwAXyqnkEC17RmIjzqUq9PsLjuqCSvn3L4B/w N4eyaHBh9lYfJXUcsZjJRO4B21s3p7lJga0iV47dgA0KaFIw8RVd0/evaTJOtGWuf4oj ygf+7KBFUpK/wKWCe1ro10EuILRvgV13tQ7rm5kcLX9kc8LkAVrO1mH7Mq9GFPzeKeP+ 7KIPElSU4UxCX0SuEcRKwlQOtNCoOioOJpSegZg1+m4IlKZwr4K5N78S6731of4qjiej 5ubw== X-Gm-Message-State: APf1xPCRdD0hpZFk0JZ2lymGx39UAiI+K63CykmaOpIIC5IkbHOUo4pc sZiyj+S0OvukhAiwyis/WykguA== X-Received: by 10.223.182.76 with SMTP id i12mr3076412wre.24.1519946445073; Thu, 01 Mar 2018 15:20:45 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id z78sm7174615wrc.53.2018.03.01.15.20.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 15:20:43 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1erXV8-0003Dj-B7; Thu, 01 Mar 2018 16:20:38 -0700 Date: Thu, 1 Mar 2018 16:20:38 -0700 From: Jason Gunthorpe To: Stephen Bates Cc: Logan Gunthorpe , Sagi Grimberg , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-rdma@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "linux-block@vger.kernel.org" , Christoph Hellwig , Jens Axboe , Keith Busch , Bjorn Helgaas , Max Gurtovoy , Dan Williams , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Steve Wise Subject: Re: [PATCH v2 10/10] nvmet: Optionally use PCI P2P memory Message-ID: <20180301232038.GO19007@ziepe.ca> References: <20180228234006.21093-1-logang@deltatee.com> <20180228234006.21093-11-logang@deltatee.com> <749e3752-4349-0bdf-5243-3d510c2b26db@grimberg.me> <40d69074-31a8-d06a-ade9-90de7712c553@deltatee.com> <5649098f-b775-815b-8b9a-f34628873ff4@grimberg.me> <20180301184249.GI19007@ziepe.ca> <20180301224540.GL19007@ziepe.ca> <77591162-4CCD-446E-A27C-1CDB4996ACB7@raithlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77591162-4CCD-446E-A27C-1CDB4996ACB7@raithlin.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 01, 2018 at 11:00:51PM +0000, Stephen Bates wrote: > > Seems like a very subtle and hard to debug performance trap to leave > > for the users, and pretty much the only reason to use P2P is > > performance... So why have such a dangerous interface? > > P2P is about offloading the memory and PCI subsystem of the host CPU > and this is achieved no matter which p2p_dev is used. No, locality matters. If you have a bunch of NICs and bunch of drives and the allocator chooses to put all P2P memory on a single drive your performance will suck horribly even if all the traffic is offloaded. Performance will suck if you have speed differences between the PCI-E devices. Eg a bunch of Gen 3 x8 NVMe cards paired with a Gen 4 x16 NIC will not reach full performance unless the p2p buffers are properly balanced between all cards. This is why I think putting things in one big pool and pretending like any P2P mem is interchangable with any other makes zero sense to me, it is not how the system actually works. Proper locality matters a lot. Jason