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.8 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 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 9D264C43461 for ; Fri, 7 May 2021 19:55:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C3AE61436 for ; Fri, 7 May 2021 19:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229942AbhEGT4w (ORCPT ); Fri, 7 May 2021 15:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbhEGT4v (ORCPT ); Fri, 7 May 2021 15:56:51 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98747C061574; Fri, 7 May 2021 12:55:50 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id b5-20020a9d5d050000b02902a5883b0f4bso8927126oti.2; Fri, 07 May 2021 12:55:50 -0700 (PDT) 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=mQnyWX8UpAFeWLBPcl0wEiusAg79AJ6iCjS7XN+qQUM=; b=O5HPILdivS0YKoqsFW5OAMccSfukgoFEyl8T8sxZ8qj4bfkEpHHl5xDocVhjtlKa/h KsmUB1DuEpCrO/tSrnyXV/6Dglcw9GYIoKGsbHmB1BVHAE7+08kotid/6awVvg2KMcLP OgJN3XzHyoWPbAGypOHIurPHF9JhVWJaE05OCMq28h2SBibVWcUrJTrDOVjDoN2ktJqH hrHWUvUXr4Zl90u3mOepyMvg6WFXF1FhjSSMN/UWyXUzr3YKNx29U1CUHg3p5WnQcjge WbRs0n0b6ywU9WJy4EGJsdc12xiRjZJondmU2lAWvgX717bAFdUw9cm8E2c4kelZO79s ASxg== 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=mQnyWX8UpAFeWLBPcl0wEiusAg79AJ6iCjS7XN+qQUM=; b=aV5LanOPeHFErWlHiyfgTiAEdY5lZQZv/lYOYzWoMRdQBc1LYCao/9nf9h9yVIrQ0r 5qi6PeFwMFMicTZ7fljCkGScYUmsaf3hmal3fpbA8AbRVEr8jRmeSDarg7MaMmS4ilfZ USyo1FafXUr6+fQsAaLf7DRrTjqCbog083hznaGwIL4gfcKDQ6djlnm6mobCUWekotL+ G6b3xcyEPAl9bA8mDTgMEgNHQTqEJjKxfv+8AdEOpbLQkGJaOa8zmzbQVVPTWa8mQ/vL OSq+8LWbqef9elK5f1xj3VmmwKadeAQYdi2LRasvmYhKCo1M5FKsnH+j/s7rie/gboeL FFSw== X-Gm-Message-State: AOAM532ytmSeuLllNvRFjRk9Rz7brKAgUTHy8WH1d2uKCCMM4Tnkyt8b gu6ylTyAcS2U/zbPDgmoIoXMsIDLDllQUWcxZtI= X-Google-Smtp-Source: ABdhPJxSN3/17xHdFjhSCghcx/8s/LWHl/NuI+//RSo2pAWsPuDQlJpfn0/5Rjl3B/LGJlLffIe5AbmBEavYIDEc+bk= X-Received: by 2002:a9d:51c6:: with SMTP id d6mr3297673oth.311.1620417349972; Fri, 07 May 2021 12:55:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alex Deucher Date: Fri, 7 May 2021 15:55:39 -0400 Message-ID: Subject: Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL To: Tejun Heo Cc: Daniel Vetter , Kenny Ho , Song Liu , Andrii Nakryiko , DRI Development , Daniel Borkmann , Kenny Ho , "open list:CONTROL GROUP (CGROUP)" , Brian Welty , John Fastabend , Alexei Starovoitov , amd-gfx list , Martin KaFai Lau , Linux-Fsdevel , Alexander Viro , Network Development , KP Singh , Yonghong Song , bpf , Dave Airlie , Alexei Starovoitov , Alex Deucher Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, May 7, 2021 at 3:33 PM Tejun Heo wrote: > > Hello, > > On Fri, May 07, 2021 at 06:54:13PM +0200, Daniel Vetter wrote: > > All I meant is that for the container/cgroups world starting out with > > time-sharing feels like the best fit, least because your SRIOV designers > > also seem to think that's the best first cut for cloud-y computing. > > Whether it's virtualized or containerized is a distinction that's getting > > ever more blurry, with virtualization become a lot more dynamic and > > container runtimes als possibly using hw virtualization underneath. > > FWIW, I'm completely on the same boat. There are two fundamental issues with > hardware-mask based control - control granularity and work conservation. > Combined, they make it a significantly more difficult interface to use which > requires hardware-specific tuning rather than simply being able to say "I > wanna prioritize this job twice over that one". > > My knoweldge of gpus is really limited but my understanding is also that the > gpu cores and threads aren't as homogeneous as the CPU counterparts across > the vendors, product generations and possibly even within a single chip, > which makes the problem even worse. > > Given that GPUs are time-shareable to begin with, the most universal > solution seems pretty clear. The problem is temporal partitioning on GPUs is much harder to enforce unless you have a special case like SR-IOV. Spatial partitioning, on AMD GPUs at least, is widely available and easily enforced. What is the point of implementing temporal style cgroups if no one can enforce it effectively? Alex > > Thanks. > > -- > tejun