Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6028913pxb; Mon, 14 Feb 2022 13:30:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJze9j79WR9qyuAjOesOsgDrO5Iw/689nWay+ZHhCQJ5rp2rMTjEA6UcqiGhDUJiUWm7afA4 X-Received: by 2002:a17:90b:3841:: with SMTP id nl1mr655542pjb.151.1644874202552; Mon, 14 Feb 2022 13:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644874202; cv=none; d=google.com; s=arc-20160816; b=Fwkfe/CPKzgCYLcQ6RtkvsyvT7fXZCXuX7QSGqZOUfWts6r8WhdKf/ufuUNnYlkubg cEEv3O73G4CQrrqIh06WNHmnD0X2R6bwO7G8N8xPL5clsUGagFfFkqvIMLtrogxCNtSo Rhp7XB5t18fkUg4jJJCCkrcn0ZDFSRC26KxGhrf/WB/Se7yoxvj336o/sDRf7SUcTM49 YzD8nUTBmy6YDeK7FgEeAZnyKUgEfShMeD/S/sEcThWt9FNjS2xrUmZ1zroGuqdSZy8u 7IeAtaJMZXJU+CcrP0KPOmz/7W0wA7K6znQtyQ+wOSOxMB99vZGIO3r5w+LSwqky+MMG wZwA== 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=wAGH315FsgjXdEGosIxU9yIWVg26bgKxObDK7qxcQ9o=; b=N9vWsAufPnRyyY0FbHlP0t9Cf2JfVCbAVdhbGyveFgxdblQTrFbjlDRHPFfMvCTw+N Ap/GbtcBV6XfbLjDqyoMPVOASRAcD+CBnqBHDejrQ8EBvC/Ly7RdHTtivEYNq0jhhTUJ Leqfq28pi3DL+DtoYwx79VCKtEaotamPtDpoxALyazi/QhcdNxhZpCN0lzuZ/P3+T6vk 0ymwXd/Jb6tHz4vE1L8KRKaH/BXeWj7RB6C4oDdmLBcP08rjWn5amdCMA/dpFgUyRx2X ugj22ExsofQypHB+yI0xML64tnp3U7YCBnKF4wpWQ0W3IOh0vtBNtvexC9+g6tko96wV tBzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EU778RaL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x19si827867pga.392.2022.02.14.13.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:30:02 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EU778RaL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D79009A98E; Mon, 14 Feb 2022 12:49:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiBNUtH (ORCPT + 99 others); Mon, 14 Feb 2022 15:49:07 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:59620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbiBNUtF (ORCPT ); Mon, 14 Feb 2022 15:49:05 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4390F1275FF for ; Mon, 14 Feb 2022 12:48:45 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id f37so6711918lfv.8 for ; Mon, 14 Feb 2022 12:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wAGH315FsgjXdEGosIxU9yIWVg26bgKxObDK7qxcQ9o=; b=EU778RaLDa/8FhJux3O09PvW3/LCZKPXp2DEFIoy3E0/73tubhMvN6FLWVL/0bcIJW kmCnl5Rc6b20E+xTOO/KCGrPDECOpDCo/nXmeIOuENhZ10zOy0IF3Ph387b1C8fJzq5D +WjvseaeLKZ8mgXil65+h1q2t7pc8gvHirSGUwM9w31eIQ4CFgJL4tlDfb98dwjLGGaI oKjbNkxktCSCXTv4prlhEbo9s9sT7DZTHxj6OpsP3QwYf4mqyLx0SJJnVML5/95sQgyb lYEW9dTjF6nZxRSHVkN/BN9o2g2BHt5B8QNM0gL8UjDYHW8ypcP+fBvoFUxYojQxDjSt GgWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wAGH315FsgjXdEGosIxU9yIWVg26bgKxObDK7qxcQ9o=; b=FgbtObHAM6Ru9BIw3Oy2X71RUgUbMfo3/vZuXURhlJIxFVnWNKWGx4okPOGvZ7inlQ zhJNrV2Xr9QTXzWqd98B42R5pZOkNv9t7et0CNcYbqDmB2KIUgJWgU8grumtZIZP0xKl oAYnV8tQACSztHTAJ/1ZxSYU716j6KlZH0XJiaG5Ob1aZ8PF7siIpTNcWILzMSVZGDz9 WYTmfsMEU6Y5UFte2V/08byjVCECh8pUJr09XOqlUSNzcu6RBZumyNHDTqIp9R08A84y 0OcLDzqrMCx3kXtOVEH1spGONLAOlYu7aS8OFyKLEzScQgP6M//vaxCPqbJpDLhrR/Se fMuA== X-Gm-Message-State: AOAM531JgUJU5DR7ArvVJo08cATX32mcBP17Wj07mw3AFyNIi8MSpdCJ glWxtP07eSVEsXKOR5ATFPNbRo8G0NEfaT2xLcKGYUZQvm2TYQ== X-Received: by 2002:a05:6512:4012:: with SMTP id br18mr536955lfb.533.1644871042491; Mon, 14 Feb 2022 12:37:22 -0800 (PST) MIME-Version: 1.0 References: <20220211161831.3493782-1-tjmercier@google.com> <20220211161831.3493782-7-tjmercier@google.com> In-Reply-To: From: John Stultz Date: Mon, 14 Feb 2022 12:37:11 -0800 Message-ID: Subject: Re: [RFC v2 6/6] android: binder: Add a buffer flag to relinquish ownership of fds To: Todd Kjos Cc: Suren Baghdasaryan , Greg Kroah-Hartman , "T.J. Mercier" , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Benjamin Gaignard , Liam Mark , Laura Abbott , Brian Starkey , Tejun Heo , Zefan Li , Johannes Weiner , Kalesh Singh , Kenny.Ho@amd.com, DRI mailing list , "open list:DOCUMENTATION" , LKML , linux-media , "moderated list:DMA BUFFER SHARING FRAMEWORK" , cgroups mailinglist Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 14, 2022 at 12:19 PM Todd Kjos wrote: > On Mon, Feb 14, 2022 at 11:29 AM Suren Baghdasaryan wrote: > > On Mon, Feb 14, 2022 at 10:33 AM Todd Kjos wrote: > > > > > > Since we are creating a new gpu cgroup abstraction, couldn't this > > > "transfer" be done in userspace by the target instead of in the kernel > > > driver? Then this patch would reduce to just a flag on the buffer > > > object. > > > > Are you suggesting to have a userspace accessible cgroup interface for > > transferring buffer charges and the target process to use that > > interface for requesting the buffer to be charged to its cgroup? > > Well, I'm asking why we need to do these cgroup-ish actions in the > kernel when it seems more natural to do it in userspace. > In case its useful, some additional context from some of the Linux Plumber's discussions last fall: Daniel Stone outlines some concerns with the cgroup userland handling for accounting: https://youtu.be/3OqllZONTiQ?t=3430 And the binder ownership transfer bit was suggested here by Daniel Vetter: https://youtu.be/3OqllZONTiQ?t=3730 thanks -john