Received: by 10.223.185.116 with SMTP id b49csp8830243wrg; Fri, 2 Mar 2018 08:39:30 -0800 (PST) X-Google-Smtp-Source: AG47ELs+gCexxpuxA437vLLZiK9JQK+N91p3NDUxCB5i2eJo8/7Qg48zvrqfgAFKesGs1HaAQHzW X-Received: by 10.99.122.86 with SMTP id j22mr4998808pgn.351.1520008769918; Fri, 02 Mar 2018 08:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520008769; cv=none; d=google.com; s=arc-20160816; b=VFRVf8zsg9PeROrnqkF3EpDk2u+rJmE2C91HoJl1TjYUUD2cHpqWT/p7vO2Dtqiajc FvgI63xTygizbIUgVv1CZlajYriror9P3hqu2zftlk//Hii2Ifhp3R8a6cR8vQYyAWRQ 6A75nFieI59q9Sohf/A9d75dcxhcDnZOwye9kze1D+KZDuhtPebG90v44UIN4PxcO6Km b3vqf1MZzTbDlYWE0d/3WCkDibGrYSRPuw8sB8j5WSUA4Wysegctqk8Z4/f565FIeLkc R9zQCt5sVb6Xm9Yu8vu/2VC31UavlhApBC/IW7bvN6JUuJ5wMME7/FwYEv9z+HLm/eZz zo6g== 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=W1H4NBpPiZq3jCjCdemfz0FeyneO1twN7y+Re4vC1vo=; b=aCCm1/Y6WZV2zxn4WpBQ7nrBQz4+ybTTQOjfwsAgTo0WIM37HF4NZ9n6DudkY8mvaS tkUF40OwTI0016rBPwi3r2bn8dqwADNsejG6C6KFQsbJJC4wP7OijssXliAmHkD59jYR hpmg2/QNRm62fHV0E6Vi5NNN3h2UljzdNaI/6EjU4NeKGf+uYY2o25vth5lUK5VGD2qZ DEDpL/8S9hTwgsugzwhDMA1WNfD2TeY2wx8Z1z6irw3UPgx8Z+F40FJUPVhPrjI4qE5L /2QWgBNDUjx7DqMtwJihXAdeeyIWpLyMS4k9Whv0FjsDCpqMWM4GXdEqglqCmsw6C1j1 MAvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=loT0yNh+; 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 a61-v6si4986380pla.689.2018.03.02.08.39.15; Fri, 02 Mar 2018 08:39:29 -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=loT0yNh+; 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 S936441AbeCBQSv (ORCPT + 99 others); Fri, 2 Mar 2018 11:18:51 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34171 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936422AbeCBQSp (ORCPT ); Fri, 2 Mar 2018 11:18:45 -0500 Received: by mail-pg0-f66.google.com with SMTP id m19so3965693pgn.1 for ; Fri, 02 Mar 2018 08:18:44 -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=W1H4NBpPiZq3jCjCdemfz0FeyneO1twN7y+Re4vC1vo=; b=loT0yNh+Yc6DPzY1vNloeBMy0ybV+2pxgpxwYF9LULEODQ9nBPV0bck9RBj6SA1fBN N0OvqZilmPfBUqL+ThNHM1oolD30HmkORtxsxrjlc8EQlGExpo9Q5j8qHWBHiW2of/KG 21ZxRmUxwJGVwjJXlg2TjEz896yJcwlo/FqHKhQJlDln7HpW4CkH3Fs3muquaJYYz3A7 tq4bR5XpxqaejAVAWc25klejAcKLMa/NaExWyK/ImG9CniGYh2dJvnXHNS6R3fkaQAjS /x6GKcN5/Z7vTiZ3fi9cHVUEdCik9if+HDH9N8KUl0qReunAQUo21uwNg371Gprz5URv d7XQ== 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=W1H4NBpPiZq3jCjCdemfz0FeyneO1twN7y+Re4vC1vo=; b=NrhlkkESWSsm56cMyDRdPpbzAFffwT5x2VqHwK5xLZqMAaQIq6OZ0D9dqzrbLSP1kC g/bgwblQnmSgBbGrgFUF2T1RuYVKt5aRj4vIgMzKBUyWCDW2XpVSPb9tOKwbxOPEhi3G P+pobTfSirt6V5pqY6X1q8py4UZI0vzc1F+9kaSqERhfpDDXJ7TMh3A2Ly4e4KuOGUai dlekKAhyRC/eV2tbx3qd9U+eFg6C8N+iXy4G/J/CIEXb8d9/Zdro3yrLaSrTxAURRIBW PfqV/BZeXKgy1S/oyB7tuZlhgEQ4rOU5Ej8IVLsaSXIXL6KF0FgDWxllkqjCJU1eFvXt Wl9g== X-Gm-Message-State: APf1xPDgN9QwGCG7gzNyScIljeyecmpCX7g9b/VYf/npvPR0enZgEvhj AMkigea0HVbGIFwlIaVbXfFb7w== X-Received: by 10.99.39.131 with SMTP id n125mr4936393pgn.292.1520007524146; Fri, 02 Mar 2018 08:18:44 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id f11sm13380884pfa.166.2018.03.02.08.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 08:18:43 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ernOM-00047l-9c; Fri, 02 Mar 2018 09:18:42 -0700 Date: Fri, 2 Mar 2018 09:18:42 -0700 From: Jason Gunthorpe To: Stephen Bates Cc: Keith Busch , 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 , 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: <20180302161842.GB14861@ziepe.ca> References: <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> <20180301234930.GG14799@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:57:43PM +0000, Stephen Bates wrote: > > We don't want to lump these all together without knowing which region you're allocating from, right? > > In all seriousness I do agree with you on these Keith in the long > term. We would consider adding property flags for the memory as it > is added to the p2p core and then the allocator could evolve to > intelligently dish it out. Attributes like endurance, latency and > special write commit requirements could all become attributes in > time. Perhaps one more reason for a central entity for p2p memory > allocation so this code does not end up having to go into many > different drivers? I fear we will find that every kind of P2P memory has special allocator requirements and dumping it all into one giant pool is not going to be helpful. This allocator is already seems not useful for the P2P target memory on a Mellanox NIC due to the way it has a special allocation flow (windowing) and special usage requirements.. Nor can it be usefull for the doorbell memory in the NIC. Both of these are existing use cases for P2P with out of tree patches.. The allocator seems to only be able to solve the CMB problem, and I think due to that it is better to put this allocator in the NVMe driver and not the core code.. At least until we find a 2nd user that needs the same allocation scheme... Jason