Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4657612pxv; Tue, 6 Jul 2021 06:19:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6GtJEVI8WGCuEdYGxfKx5eDZk5nKum/qPs/kOVGV/nokqCxSL5w9vTeyf5G6O1SBpJ8Rn X-Received: by 2002:a17:907:3d9f:: with SMTP id he31mr11596474ejc.95.1625577574681; Tue, 06 Jul 2021 06:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625577574; cv=none; d=google.com; s=arc-20160816; b=nueZXMKYiAMffhfbl3cchPepE1VbYMmiU+kL8UAeLhITUjrS9j3jAXrAUEJLEJYfYB IghuZx1xX2rnv+7qDUR2GxmiufGRu0OlCgraREdiD30nYOhiijyvHP8EP7MC2cuFyZO3 ZyEXRak2vIUwhdGlUVH0lTCJjJbnlwtAmY53UQ6bsJhDnqCnT/UxBXld4NMGBmMLIcd5 Xi7PfKKYJK55T9pb1cMNOAO8mjFUTihMeghdU6+CMxJldVCQNAxDt4Q9c546uEttiq5b CXsIqxmnBieUL7goHYjQiVwI2G+2VAakzp8oHIKbM0WEvokGcc5zgykWOEyU9wR1LGxr crdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U9D/asRW8RIRRhOKKkNY/c0bgyv3JnZBPRvStuSKb28=; b=zMGbQw4PkCkPVZ++/WeLVqaAsb2/JzPBERDoVr5MppV8rODQYAyDnSFeBvkK+Roe+L g0E8ihBGnmznqfPhAUKtcP39mzbt0dsoNJ4y0fCO12ZSnRw/HDb2kbW7IJn2eFS9OJH4 wWHo2DBp4pjnN6VZngIrdrsYWxYd7YMEA21zekoEU9ycR+vT4TbR0sWoDQE1KiFiB5MP xLsZ8DkiRxkXh5DaJvMDaa5+NE9DB23mL6kKon/17v+HkwEaKjceIibWtUstLXjw7tsr wJsvURfERh4C4jDBd1D8akW3WNnoEG2Slum9V5v8mDzlE69AeISMtmDrVvrEdAs/kYwx 49Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=cB9WV9sN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si7880647eds.398.2021.07.06.06.19.11; Tue, 06 Jul 2021 06:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=cB9WV9sN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbhGFNTx (ORCPT + 99 others); Tue, 6 Jul 2021 09:19:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbhGFNTw (ORCPT ); Tue, 6 Jul 2021 09:19:52 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E118C061760 for ; Tue, 6 Jul 2021 06:17:12 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id l17-20020a9d6a910000b029048a51f0bc3cso9736733otq.13 for ; Tue, 06 Jul 2021 06:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U9D/asRW8RIRRhOKKkNY/c0bgyv3JnZBPRvStuSKb28=; b=cB9WV9sNtYm4EIQPRYYsOGXCyC85KX4IvPilkqi+DXH4BpSsZyGkNpW3uSI8JnhhUm Uoplzu3pWcmKt7UBmyg4GG/1Ehm8EZCdN1AUKXSFMtmPdYVFA4tSUwyZPyO+z/eahKfZ PrBc3UQ6AHFgqTPV3OhYjDG9m5j2bWR34qSio= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U9D/asRW8RIRRhOKKkNY/c0bgyv3JnZBPRvStuSKb28=; b=SHTEP/ocmE4sKDmK9tjLkzRJMq54+YN3ICP3DC/IggMwjFCLmrhQsjYz9/pQucmGYF gUpufpEa+2vB4hkBdrPadYRCUl0JDsD7BjNMC+8SHOZSGQDkKNgYkxSC7CQVFFYNaqFj d0txjl7iy2kdmxldRzNm0UWxkt8UEASJhLxRVrygyQwIqcjLfMu2o9wffwTRJBFmL9pL HtMYtTW951YozRUdFjwgP16GCSGp3OL2bsf7D+f+3u6JavJ85vIbNLFqEIf7QvuRtsAq 3VQqgY5+rjX0NfTF8gCS9gepixt+ZRyAg53WRa4U0h5vSE1T2m1emCSQj8tC+mcdoKPr vEhg== X-Gm-Message-State: AOAM531inK7iq903se/jTVKAJs7t2zHH9UhL+QHlz1/uNgNYDbhWeq+A Ci5+IKm4V/wSo8ILka2C9nnCUJuk4DPE836FnIVJpA== X-Received: by 2002:a05:6830:2366:: with SMTP id r6mr14854251oth.188.1625577431903; Tue, 06 Jul 2021 06:17:11 -0700 (PDT) MIME-Version: 1.0 References: <20210705130314.11519-1-ogabbay@kernel.org> <20210706122110.GA18273@lst.de> In-Reply-To: From: Daniel Vetter Date: Tue, 6 Jul 2021 15:17:00 +0200 Message-ID: Subject: Re: [Linaro-mm-sig] [PATCH v4 0/2] Add p2p via dmabuf to habanalabs To: Oded Gabbay Cc: Christoph Hellwig , Oded Gabbay , "Linux-Kernel@Vger. Kernel. Org" , Greg Kroah-Hartman , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Gal Pressman , sleybo@amazon.com, Maling list - DRI developers , Jason Gunthorpe , linux-rdma , Linux Media Mailing List , Doug Ledford , Dave Airlie , Alex Deucher , Leon Romanovsky , amd-gfx list , "moderated list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 6, 2021 at 2:46 PM Oded Gabbay wrote: > > On Tue, Jul 6, 2021 at 3:23 PM Daniel Vetter wrote: > > > > On Tue, Jul 06, 2021 at 02:21:10PM +0200, Christoph Hellwig wrote: > > > On Tue, Jul 06, 2021 at 10:40:37AM +0200, Daniel Vetter wrote: > > > > > Greg, I hope this will be good enough for you to merge this code. > > > > > > > > So we're officially going to use dri-devel for technical details review > > > > and then Greg for merging so we don't have to deal with other merge > > > > criteria dri-devel folks have? > > > > > > > > I don't expect anything less by now, but it does make the original claim > > > > that drivers/misc will not step all over accelerators folks a complete > > > > farce under the totally-not-a-gpu banner. > > > > > > > > This essentially means that for any other accelerator stack that doesn't > > > > fit the dri-devel merge criteria, even if it's acting like a gpu and uses > > > > other gpu driver stuff, you can just send it to Greg and it's good to go. > > > > > > > > There's quite a lot of these floating around actually (and many do have > > > > semi-open runtimes, like habanalabs have now too, just not open enough to > > > > be actually useful). It's going to be absolutely lovely having to explain > > > > to these companies in background chats why habanalabs gets away with their > > > > stack and they don't. > > > > > > FYI, I fully agree with Daniel here. Habanlabs needs to open up their > > > runtime if they want to push any additional feature in the kernel. > > > The current situation is not sustainable. > Well, that's like, your opinion... > > > > > Before anyone replies: The runtime is open, the compiler is still closed. > > This has become the new default for accel driver submissions, I think > > mostly because all the interesting bits for non-3d accelerators are in the > > accel ISA, and no longer in the runtime. So vendors are fairly happy to > > throw in the runtime as a freebie. > > > > It's still incomplete, and it's still useless if you want to actually hack > > on the driver stack. > > -Daniel > > -- > I don't understand what's not sustainable here. > > There is zero code inside the driver that communicates or interacts > with our TPC code (TPC is the Tensor Processing Core). > Even submitting works to the TPC is done via a generic queue > interface. And that queue IP is common between all our engines > (TPC/DMA/NIC). The driver provides all the specs of that queue IP, > because the driver's code is handling that queue. But why is the TPC > compiler code even relevant here ? Can I use the hw how it's intended to be used without it? If the answer is no, then essentially what you're doing with your upstream driver is getting all the benefits of an upstream driver, while upstream gets nothing. We can't use your stack, not as-is. Sure we can use the queue, but we can't actually submit anything interesting. And I'm pretty sure the point of your hw is to do more than submit no-op packets to a queue. This is all "I want my cake and eat it too" approach to upstreaming, and it's totally fine attitude to have, but if you don't see why there's maybe an different side to it then I don't get what you're arguing. Upstream isn't free lunch for nothing. Frankly I'm starting to assume you're arguing this all in bad faith just because habanalabds doesn't want to actually have an open driver stack, so any attack is good, no matter what. Which is also what everyone else does who submits their accel driver to upstream, and which gets us back to the starting point of this sub-thread of me really appreciation how this will improve background discussions going forward for everyone. Like if the requirement for accel drivers truly is that you can submit a dummy command to the queues then I have about 5-10 drivers at least I could merge instantly. For something like the intel gpu driver it would be about 50 lines of code (including all the structure boiler plate the ioctls require)in userspace to submit a dummy queue command. GPU and accel vendors would really love that, because it would allow them to freeload on upstream and do essentially nothing in return. And we'd end up with an unmaintainable disaster of a gpu or well accelerator subsystem because there's nothing you can change or improve because all the really useful bits of the stack are closed. And ofc that's not any companies problem anymore, so ofc you with the habanalabs hat on don't care and call this *extreme*. > btw, you can today see our TPC code at > https://github.com/HabanaAI/Habana_Custom_Kernel > There is a link there to the TPC user guide and link to download the > LLVM compiler. I got stuck clicking links before I found the source for that llvm compiler. Can you give me a direct link to the repo with sourcecode instead please? Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch