Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751623AbcLET1f (ORCPT ); Mon, 5 Dec 2016 14:27:35 -0500 Received: from ale.deltatee.com ([207.54.116.67]:45877 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbcLET1a (ORCPT ); Mon, 5 Dec 2016 14:27:30 -0500 To: Jason Gunthorpe , Dan Williams References: <20161130162353.GA24639@obsidianresearch.com> <5f5b7989-84f5-737e-47c8-831f752d6280@deltatee.com> <61a2fb07344aacd81111449d222de66e.squirrel@webmail.raithlin.com> <20161205171830.GB27784@obsidianresearch.com> <20161205180231.GA28133@obsidianresearch.com> <20161205191438.GA20464@obsidianresearch.com> Cc: Stephen Bates , Haggai Eran , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-nvdimm@ml01.01.org" , "christian.koenig@amd.com" , "Suravee.Suthikulpanit@amd.com" , "John.Bridgman@amd.com" , "Alexander.Deucher@amd.com" , "Linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Max Gurtovoy , "linux-pci@vger.kernel.org" , "serguei.sagalovitch@amd.com" , "Paul.Blinzer@amd.com" , "Felix.Kuehling@amd.com" , "ben.sander@amd.com" From: Logan Gunthorpe Message-ID: <10356964-c454-47fb-7fb3-8bf2a418b11b@deltatee.com> Date: Mon, 5 Dec 2016 12:27:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161205191438.GA20464@obsidianresearch.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 50.66.97.235 X-SA-Exim-Rcpt-To: ben.sander@amd.com, felix.kuehling@amd.com, paul.blinzer@amd.com, serguei.sagalovitch@amd.com, linux-pci@vger.kernel.org, maxg@mellanox.com, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, alexander.deucher@amd.com, john.bridgman@amd.com, suravee.suthikulpanit@amd.com, christian.koenig@amd.com, linux-nvdimm@ml01.01.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, haggaie@mellanox.com, sbates@raithlin.com, dan.j.williams@intel.com, jgunthorpe@obsidianresearch.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: Enabling peer to peer device transactions for PCIe devices X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 780 Lines: 18 On 05/12/16 12:14 PM, Jason Gunthorpe wrote: > But CMB sounds much more like the GPU case where there is a > specialized allocator handing out the BAR to consumers, so I'm not > sure a general purpose chardev makes a lot of sense? I don't think it will ever need to be as complicated as the GPU case. There will probably only ever be a relatively small amount of memory behind the CMB and really the only users are those doing P2P work. Thus the specialized allocator could be pretty simple and I expect it would be fine to just return -ENOMEM if there is not enough memory. Also, if it was implemented this way, if there was a need to make the allocator more complicated it could easily be added later as the userspace interface is just mmap to obtain a buffer. Logan