From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25685C433F5 for ; Mon, 14 Feb 2022 20:49:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbiBNUtK (ORCPT ); Mon, 14 Feb 2022 15:49:10 -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-Google-Smtp-Source: ABdhPJybrY+AtUQHWjp3j2rvRJhBPEQOOF5VWwSAKp+0WfViYgyz3tPMp/imOig+wlvQ20J5Rfsw3M7JV5CsRYOdaJU= 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" 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