Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5979027rwb; Sun, 11 Dec 2022 16:38:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf7++QUEedih+UFYsGXW9RwpCe3QcYAyPgEY0N+dyFcPAJBM3IuXlltjr3Ia/yosZWa6H7b9 X-Received: by 2002:a62:1c42:0:b0:577:9182:199a with SMTP id c63-20020a621c42000000b005779182199amr13178519pfc.29.1670805532519; Sun, 11 Dec 2022 16:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670805532; cv=none; d=google.com; s=arc-20160816; b=Kf1/ryEy8cio+OVdlsd8TpHq0bcSmowFTYw8wSSJauZn4T0gNwmp9W1tQgkuPYw7HK Yqko4cUQBrU6avrTUk7Y/noVX3ZNTCt5CPeBaTmBD+hQITYAjttYiqFdDGBsfquo25UM 2nMj3QSJkm0UUuCqhgDmY/esK9hUpwlVqpf3GTVOQbRJ6xhS0CDxPqWlovi/0mATdFzl HzybYUkiPKlMFiB5YtUkbhzvZzK62uwzFvnQMOYJyJ4hX16Zd3r72rnujBhn4/rG+XnD DLFKIwpnxlDHWoKVGUEDRtBYRrEC9NhZSMK/zxntCsK99uZcczBsHssz2bVtN+FMefxk 4Y8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=xKv8eN80SE3N/mAMUDX3qpnzmr8mwGvufEWjp+a7v5k=; b=pLpry+1h1mY7kdIeXzZ7SeMmvcCqD8LjNatzN0j8uU5d/HxHVRVkVkBG8i5Els7+2B MFWnF1uwBGzZOMqS5vcbV/xoGDmuTvun4m3WVOs8czjQsr9F7hfOqMuEsAmRA165gBX/ yPQO0lkBUyrggKQdGbXqp9dYfMYuOmO3btzAEfguf5GRjZcOW5Gmlfj1L89xoOp6ev4o cBPQZKKRJ4uDlNL0yGSk/+Fckta4DMnznYxK99DOTr0vwsXv6n/ly2WZsv9O7tdZq/CW wTG7ediHGI3JO/bWMtVuUbJ/DUY88LEsgR/eJ0fSKw7Rd5A+I+3mypyWrZZDrRjbzRD5 zmKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=mw1UiK3x; 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=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dc8-20020a056a0035c800b005752121f13dsi7889169pfb.113.2022.12.11.16.38.40; Sun, 11 Dec 2022 16:38:52 -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=@inria.fr header.s=dc header.b=mw1UiK3x; 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=NONE sp=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbiLKWd6 (ORCPT + 75 others); Sun, 11 Dec 2022 17:33:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230314AbiLKWdz (ORCPT ); Sun, 11 Dec 2022 17:33:55 -0500 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF52BF58; Sun, 11 Dec 2022 14:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=xKv8eN80SE3N/mAMUDX3qpnzmr8mwGvufEWjp+a7v5k=; b=mw1UiK3x/O5DaWjglFSJv4R7grcPOjULKmh2OMf005v0cU1h+w5/oHWo QnvcxlvTL+e/P1TPk3keoXTRmzZzMpXGhH8ypVEJnP1mLRJeluSJYf3+9 xtUs6nDLGQge6VmL/Mbz+aLrxewblPA+vATiO3OGz+n9YOzXwOymzEV91 Y=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.96,237,1665439200"; d="scan'208";a="82838892" Received: from 214.123.68.85.rev.sfr.net (HELO hadrien) ([85.68.123.214]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 23:33:50 +0100 Date: Sun, 11 Dec 2022 23:33:50 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Tejun Heo cc: torvalds@linux-foundation.org, mingo@redhat.com, peterz@infradead.org, 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, joshdon@google.com, 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 Subject: Re: [PATCH 14/31] sched_ext: Implement BPF extensible scheduler class In-Reply-To: <20221130082313.3241517-15-tj@kernel.org> Message-ID: References: <20221130082313.3241517-1-tj@kernel.org> <20221130082313.3241517-15-tj@kernel.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 > diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c > new file mode 100644 > index 000000000000..f42464d66de4 > --- /dev/null > +++ b/kernel/sched/ext.c > @@ -0,0 +1,2780 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. > + * Copyright (c) 2022 Tejun Heo > + * Copyright (c) 2022 David Vernet > + */ > +#define SCX_OP_IDX(op) (offsetof(struct sched_ext_ops, op) / sizeof(void (*)(void))) > + > +enum scx_internal_consts { > + SCX_NR_ONLINE_OPS = SCX_OP_IDX(init), > + SCX_DSP_DFL_MAX_BATCH = 32, This definition of SCX_DSP_DFL_MAX_BATCH makes the dispatch queue have size 32. The example central policy thus aborts if more than 32 tasks are woken up at once. julia