Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6076960rwb; Sun, 11 Dec 2022 18:37:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf7V5+v2NtQ8x4vXcma42kanKlafKoQtsMrPDOLzJXaLcASCiKT4d3PiqLkV6r+nO9QM/MMr X-Received: by 2002:a17:903:11cc:b0:185:50e4:f59c with SMTP id q12-20020a17090311cc00b0018550e4f59cmr21138480plh.8.1670812660382; Sun, 11 Dec 2022 18:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670812660; cv=none; d=google.com; s=arc-20160816; b=uWXrlerOx5w3oVYasjksF0CkvKFkUBfqG+ISgqFrZdnZWz9azIWuGNvYJLv6v/jeXD FXuKstUSd2SJfuQj6O2cSrgd5g93iq8JbCxGbvPfbfDpKwAkc6svD66T/mWgRHcfuhlB 5ak5YN1zzkprA15STrNev2HW7Um3gDIkjhyWY0lmMCZzxZAd3+FyZTs7V1+2naVfl/5t ycSfRtml32aIcFLcvJVFSZ7tM15BmZ3HewPjkngeC5MsWNnbJeB5Ss7lOLGnApn3+ldj MDIqbnm1gN552x/JnhO1STqiM6dpxUP85U32RXtE2+Aj8ROYUq4MzJkoTAgxfmwuAjSa re3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=jAKAUWj36dYtyzUMLUez/vupRra0SMgKco51r7USvlA=; b=IRJemp7DioRoGHpsgJ0F1QSOIylQhH3r3JWdOu0shtzWcZpxyJw9T4SDlJmFSxUtZY C5RvA2uPLU5lpAHZCdgs8Iwsplxfsr3mCxR8vDhtEKbovi7icdrZGVhNmFJZa4Oqf9Xq g9mDSXlr5mRKXxx0RUcEOTpaF70tpdiKIoYqgKGeE2o4sBLzEmv5nmcsjzM4CDkmoBWH PYwiuR2rP4I0uIa9uzGXzZFe/MdaU/6g8cu9fRC3ydiz/YgJELJRkJcU2xBSXFYD7Szz d0UIFA2OrTunsFH1gIkrdO7YnWgjLkLmEkVjptqQpvbJnJHs09ztA+7Gw4P4H7V5apNH sx5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f3CotKsR; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a170903228400b00177568a0e53si9231065plh.252.2022.12.11.18.37.30; Sun, 11 Dec 2022 18:37:40 -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=@gmail.com header.s=20210112 header.b=f3CotKsR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbiLLCTE (ORCPT + 76 others); Sun, 11 Dec 2022 21:19:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbiLLCRM (ORCPT ); Sun, 11 Dec 2022 21:17:12 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8874E028; Sun, 11 Dec 2022 18:16:01 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id d15so993973pls.6; Sun, 11 Dec 2022 18:16:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=jAKAUWj36dYtyzUMLUez/vupRra0SMgKco51r7USvlA=; b=f3CotKsR5Vj3EPyn6fNaI9SpNCkkIxLE07NV2LJ9S7h1zVc8z4QlcYy7BIH1bpKESp yU7tZQTel+aQ4jx1zznjt7OdVSC6/76hXuwwUA+wswJO21uLP9vZ7KtYOpbCqoV8Uhi7 f6P5r21KVTJZ/PuZP+OkXW+jv23xV3zhAtIGdo35gCi2naqRez8Fj/SfB9J+iKCgns5W IwTcf+vswVrMtyTpVgsCdSOOc5nLsvsMeIafoaXcd7/s2gDc9pZSDIHwPaPaMToYD3kb jOc03lRnZMIIOfRJjt0M88ZrUAwUdJsOlPXe246WbwPJHYoSR2bk5rsKYcc9FXdXE96O 51yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jAKAUWj36dYtyzUMLUez/vupRra0SMgKco51r7USvlA=; b=I/5Tq7JAdomyW8/2N7GH4U1hcBlm2PeojxpUjHhO/aife6/nV5lAJNrMjOqTyj7ngJ I8R7sz0wNSx5x4zkWZj89eOxeLRAdyZiEASdQ3bCrU3+iebJsLL94A0tec8X8fq8fKZR U7iWHgMjiEogne+hO/c/0euHeWOhN5TPoaRMJwFW+92zEr8hMp5IfXklvimzWMMmOVOp 3nUC69T+DR4I4N/xHXudYMhV6l24N2HjiiSaheSHbtSp5AQnPtbfw11QyeTY9FcRq7kJ btjwXw9EDUG1o7j+h31vbt+ZtinjkcXVud73AoMkq6fEbM+aHHObbKrSVMnMpylSBrze AdvA== X-Gm-Message-State: ANoB5plARGH8/4PhJPZdKSC5+SKdek4Il942UyXVBLwzd1UvqOLtE2Ur X+I8e8WDZpghRjfVLBECxTQ= X-Received: by 2002:a17:90a:e409:b0:219:1a4e:349d with SMTP id hv9-20020a17090ae40900b002191a4e349dmr16368256pjb.44.1670811361024; Sun, 11 Dec 2022 18:16:01 -0800 (PST) Received: from localhost ([2620:10d:c090:400::5:53a9]) by smtp.gmail.com with ESMTPSA id pl6-20020a17090b268600b00213c7cf21c0sm4266238pjb.5.2022.12.11.18.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 18:16:00 -0800 (PST) Sender: Tejun Heo Date: Sun, 11 Dec 2022 16:15:59 -1000 From: Tejun Heo To: Julia Lawall 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 Message-ID: References: <20221130082313.3241517-1-tj@kernel.org> <20221130082313.3241517-15-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Hello, Julia. On Sun, Dec 11, 2022 at 11:33:50PM +0100, Julia Lawall wrote: > > 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. Yeah, scx_exampl_central needs to either set ops.dispatch_max_batch higher according to number of CPUs or flush and exit the loop and retry when scx_bpf_dispatch_nr_slots() reaches zero. Will update. Thanks. -- tejun