Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7458276rwb; Mon, 12 Dec 2022 15:08:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf56luhQV6AR5qAV3Kwp5KxmCvG6sDxNSx8q+3/JCHk/YyqAU3PvkifmCsZ6huJzHU6YvlND X-Received: by 2002:a17:902:c206:b0:18f:6b2b:e88d with SMTP id 6-20020a170902c20600b0018f6b2be88dmr8480159pll.36.1670886480077; Mon, 12 Dec 2022 15:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670886480; cv=none; d=google.com; s=arc-20160816; b=rPwVZJqMrrqC6KqqofUE41RWS7wDsRTV/1CHFTjOSjiCtPEH7hAnMZdPXvKOkycJyS Lkknb8XinbFVsYi3d02UkIO56+Dd04hIurPngL5LplhBLv25diMj4n7A7QaVQ/iuLiCP yvJJw2xtXlEImJuFz5wFL1j4PVLH71ZOo6v99nL+4Qvk/dkyh04iDcPGPPi/o66ovdlQ UWm6WQLER6Secj5cJcFNI8kdsnSzBBupfBDwnTSGwL8E/0ROZsdE/XD+3DpCi8r5T4a9 yADwgKhvGl7F4zSQqL5I/bvisXJV3mWOg5558VkdKjLAUj2e+cy4Hg3foPMrXwOyxGJu bhag== 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=zisc8FQAJzDFm4trJFIzgD9QQfRGpDr3HkVwJ+oTsJM=; b=MIg5RPS9cmhDTa3L9n8SdRIiF6Frk49AdNg1/k7P3VTh8a5e/2yZYUbmHRyysv8EDc 2bNOxvlq2KNsZ83hxMkx1lJTUbuLS1GiwuM7zo2BxGE1+nVIbYyhqf8wMyoz2TQjcklR XpGDqqvqcA3zbPJ6WfWo900UoE6dwnK/WUGsSXdEbD8z/+sizfK1a/AwKi38MsZKbRjK h7Ic9RCJ2InzVyDEHT98fkgDt/CyambdQEOKALdH41KR4I7hMeTWM9tQ4QoGz7NKnjpp C5Jl8jhp9g2jgEa4I9kvLVlVAhkfqQCK0waAsLgACnJzw38UzdadzZeLBTJoK3//RRR7 W4aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=j6fkBaTj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170902e5c500b00186abd0c784si11772574plf.217.2022.12.12.15.07.47; Mon, 12 Dec 2022 15:08:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=j6fkBaTj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233643AbiLLWTb (ORCPT + 74 others); Mon, 12 Dec 2022 17:19:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233621AbiLLWTO (ORCPT ); Mon, 12 Dec 2022 17:19:14 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A37B2EE12 for ; Mon, 12 Dec 2022 14:19:12 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id z8-20020a17090abd8800b00219ed30ce47so1436757pjr.3 for ; Mon, 12 Dec 2022 14:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zisc8FQAJzDFm4trJFIzgD9QQfRGpDr3HkVwJ+oTsJM=; b=j6fkBaTj8AwshXaywWh1a9KWsPOjHp8CRFCVBQ6q3Zz32esLihQfmQhrCt2cTWA43y teSFLYYg644Fq35Bjb8RgBsV8SXZOx81jacbSLLbmoJVYcXx5SL974sk/HmkhaYnPGXQ fG5Qm5yLPWwjqj3QWYg59p5uuDeubfTeBwvALcy2i1l2Ba9Gr0zgtDH3T7UksXDTZ6ds 8VS25Kgcnn4KU0Ztb3ck/srxcTPvK6/oHYTPk4LaG7yGvkxOgzMhrlmAoMJ/vQ0KnYwR BmTzs1zoHJMh7bAl+ji7JxV/VHTH2CkADFdUxr725pXZQcZMrETt9IFJdMixp8829TWf 1NXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zisc8FQAJzDFm4trJFIzgD9QQfRGpDr3HkVwJ+oTsJM=; b=0dYF9j22eOspWrQcz4ZjSfboiHdSSqhClUkG04+Y1wnvudxO8enaof4pEVtBZMg76T B5EnRAA46B9ZJxi53DUqZcN7+0b3LYf2lu31amM8C6gdm4qRq8DYtdt5x8BFAH9FTiKb yTLYj6CN1QDyU3vM5qaUUFrWaIREK68E2JK/eS668aXblEwUOC+53RWxEorGnOVMpjbK jZHeHmrkcP1qfXLBmj7tfojzBxVmsZpxRBGT8H+vWRMhGiE5ysCN+qvfoiTknaxWUTHH gl1e9S7cXjSnwxOzrFvF9mxX0wXRBVr1UQjgQ1nKTBC5f7f4YlTOJRfsA/qkFSaTTAl/ kmSA== X-Gm-Message-State: ANoB5pkEKYNWyoSpdFOYbMPfecVpP01u+BLWn4hFS/T9PxIAp1xarzyF /K4rHXb3CTGoJt4BcWwh4I4bXnuz40weuTwUfXf74g== X-Received: by 2002:a17:90a:4ecf:b0:219:c638:b718 with SMTP id v15-20020a17090a4ecf00b00219c638b718mr51539pjl.143.1670883551932; Mon, 12 Dec 2022 14:19:11 -0800 (PST) MIME-Version: 1.0 References: <20221130082313.3241517-1-tj@kernel.org> <20221130082313.3241517-32-tj@kernel.org> In-Reply-To: From: Josh Don Date: Mon, 12 Dec 2022 14:18:59 -0800 Message-ID: Subject: Re: [PATCH 31/31] sched_ext: Add a rust userspace hybrid example scheduler To: Peter Zijlstra Cc: Tejun Heo , torvalds@linux-foundation.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@kernel.org, brho@google.com, pjt@google.com, derkling@google.com, haoluo@google.com, dvernet@meta.com, dschatzberg@meta.com, dskarlat@cs.cmu.edu, riel@surriel.com, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, kernel-team@meta.com, Peter Oskolkov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Hey Peter, On Mon, Dec 12, 2022 at 6:03 AM Peter Zijlstra wrote: > > On Tue, Nov 29, 2022 at 10:23:13PM -1000, Tejun Heo wrote: > > From: Dan Schatzberg > > > > Atropos is a multi-domain BPF / userspace hybrid scheduler where the BPF > > part does simple round robin in each domain and the userspace part > > calculates the load factor of each domain and tells the BPF part how to load > > balance the domains. > > > > This scheduler demonstrates dividing scheduling logic between BPF and > > userspace and using rust to build the userspace part. > > And here I am, speaking neither Rust nor BPF. > > But really, having seen some of this I long for the UMCG patches -- that > at least was somewhat sane and trivially composes, unlike all this > madness. I wasn't sure if you were focusing specifically on how the BPF portion is implemented, or on UMCG vs sched_ext. For the latter, and ignoring the specifics of this example, the UMCG and sched_ext work are complementary, but not mutually exclusive. UMCG is about driving cooperative scheduling within a particular application. UMCG does not have control over or react to external preemption, nor does it make thread placement decisions. sched_ext is considering things more at the system level: arbitrating fairness and preemption between processes, deciding when and where threads run, etc., and also being able to take application-specific hints if desired.