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 X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57377C433DB for ; Mon, 1 Feb 2021 16:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAE5864EC2 for ; Mon, 1 Feb 2021 16:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231778AbhBAQwI (ORCPT ); Mon, 1 Feb 2021 11:52:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbhBAQwB (ORCPT ); Mon, 1 Feb 2021 11:52:01 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B082AC061786; Mon, 1 Feb 2021 08:51:19 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id a12so23740104lfb.1; Mon, 01 Feb 2021 08:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wF7mWC2M9iBBc+ACGYALfCAPMzd/Re2kA54W5usB+9c=; b=cOQzkJjTPteBDAyEwI88kZ6IB+wiDX+1y1GIGJanexyB8HynFGGumgPPIB53qiYArs +e7ZbAKr52jZx90yInF//sIz6yDHJwouIdUUpr7f+3RpMaze56OrOgLqkai2EYjbnhH4 +TjotrLukfQlGShqfr5pes94GebIp75G5LolNlKBcwL38rvVt6GF8CQLI1q9GB1HPcmR z6CAHvTshHpQ4KeHiHwtBkg9OEvkkecyzIew0dLXYR5N/LDEFQ7bsggyocEzRyVr7DKk qvBdOSvfJVBUqSYoCtiKeZRvkxoEahCvcvZBJrQYAMMjBUSPic/kfUiYpdD6bVKsvhMk 3tsw== 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=wF7mWC2M9iBBc+ACGYALfCAPMzd/Re2kA54W5usB+9c=; b=Y1pQjEKYg8M5tDAuMWB4GcZzrE/9wTMdeoSK3zTO8Ie8CPtT/aXFYg5Ry0jIzTH4BL hfTDPIRhNJlcCth2pmSezZwXG/ExkjqcJlSICKlGBVgCUhZ9mrYOVOTXebKj7gMVMFne QoEA71I8Ja3KtmGmKL3kiaQt7JOUsYa2ylLVQ4IazLu8hS6Qvd96nSDb2Zi/gs704+jN dSXZXcpAiijuuoPx0lpyrJp/IHJFbI2i28m+AjSpQKL7rdJ47/BdXHBm3AVykzc06X6y +Z/YG6IIErZ+mY/kxUgsEkGqLcC0Z4JTq2IroRkCH3g++Lw9RMdpm5QP6+fZ2Y2KaK+C 2ZMw== X-Gm-Message-State: AOAM532zBjWeFqWbNmQ8LrshOAig7XrSIqpPc59SeL9DZItPDQNgD3/z y3xyZF2rgys3ycL90szgqgTGD1ad9PrR9VHuhgY= X-Google-Smtp-Source: ABdhPJwU19Ykz6zVy5HPScLPfN7sZ41eNDew+I/XiJKnUJb0R2TV/4YtlOqZLFcdbXx3hMrOMozaP/L2VFq0o4gRw5Y= X-Received: by 2002:a19:ec03:: with SMTP id b3mr9452260lfa.608.1612198278259; Mon, 01 Feb 2021 08:51:18 -0800 (PST) MIME-Version: 1.0 References: <20201007152355.2446741-1-Kenny.Ho@amd.com> <20201103053244.khibmr66p7lhv7ge@ast-mbp.dhcp.thefacebook.com> <20201103210418.q7hddyl7rvdplike@ast-mbp.dhcp.thefacebook.com> <20201103232805.6uq4zg3gdvw2iiki@ast-mbp.dhcp.thefacebook.com> In-Reply-To: From: Kenny Ho Date: Mon, 1 Feb 2021 11:51:07 -0500 Message-ID: Subject: Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL To: Daniel Vetter Cc: Alexei Starovoitov , Dave Airlie , Kenny Ho , Alexander Viro , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , bpf , Network Development , Linux-Fsdevel , "open list:CONTROL GROUP (CGROUP)" , Alex Deucher , amd-gfx list , DRI Development , Brian Welty Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org [Resent in plain text.] On Mon, Feb 1, 2021 at 9:49 AM Daniel Vetter wrote: > - there's been a pile of cgroups proposal to manage gpus at the drm > subsystem level, some by Kenny, and frankly this at least looks a bit > like a quick hack to sidestep the consensus process for that. No Daniel, this is quick *draft* to get a conversation going. Bpf was actually a path suggested by Tejun back in 2018 so I think you are mischaracterizing this quite a bit. "2018-11-20 Kenny Ho: To put the questions in more concrete terms, let say a user wants to expose certain part of a gpu to a particular cgroup similar to the way selective cpu cores are exposed to a cgroup via cpuset, how should we go about enabling such functionality? 2018-11-20 Tejun Heo: Do what the intel driver or bpf is doing? It's not difficult to hook into cgroup for identification purposes." Kenny