Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4926420imw; Tue, 19 Jul 2022 16:27:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tOyGMDK4tOa1bLZesIzplDDWh+Rk9RmKsKBuYmJN7nrDxHyK54vzN0prVk6zNE8jXJMdUi X-Received: by 2002:a17:907:a067:b0:72b:8f93:dff with SMTP id ia7-20020a170907a06700b0072b8f930dffmr32389254ejc.238.1658273279535; Tue, 19 Jul 2022 16:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658273279; cv=none; d=google.com; s=arc-20160816; b=qR3K/va2B8RJq32GwPfOCP4UjSJ2W8na5ARUfKXAEqHlm1InfJlS3sCH3edryLIIJd 0csKi8FjM13PW3UDtVC/XokF1AWWYPbtt8/sUlVfgVzUH1gNbPKw11mK4ZREXo1AMFJQ A3L0E+2WXOTHiq+rcRu+LbW72LKRaU/7ZdKzJKejrd5xll6MS5KtU3kVVBbB3qrLcsGm NhSCJG2yLNaZQ2g0cM2JIA7DbgYaJw/Olrkaq5UVPbepU8D/5+xFTimKBNboBOH3rZ6x Sfic00vUChOXKsn790XcSoNIRc737XCNcEN4SuIyeKUOXipCgO+csuS6I7KSmML+iKfw PtMA== 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:dkim-signature:date; bh=otC1tTkwE6VyOKni7sKSG3LnYp+1TQS+Z3cn/1v0m9s=; b=qmTh30VK7Bx0Q9Bdmg/mmo6BCpHL1/epKSCXaCM0OaxxM+15FbT0HA3EzDfadJ7k/j GVDp4CZXxlX++EP4gh81bbY23g//EzPLA9eTB0iEj9E5HEV/rQ9lBMksvOj8QCItygEc Xyh2hUEHEOq5IW4mfTY69PZ+pCKEI6wBiZnbOrrDysrKNMRrIxPYzAeMVy4c/CCxCTOX RSFge5F+rtky9AxvZr+E7WaNPtqWE8QKaVX4wEFnlr4d+6Bup1BqryTUhEyexYCCq3Ee BrzDuQERbQjygDTG48cdr0XYCUqnjpIKdWut3KelHVBPXupVYAUAmIgrQRsMjvXLEBe5 KZ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=j6s0Z0QO; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw39-20020a1709066a2700b0072f1c8d0e62si6002450ejc.95.2022.07.19.16.27.34; Tue, 19 Jul 2022 16:27:59 -0700 (PDT) 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=@linux.dev header.s=key1 header.b=j6s0Z0QO; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234205AbiGSXV4 (ORCPT + 99 others); Tue, 19 Jul 2022 19:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236287AbiGSXVv (ORCPT ); Tue, 19 Jul 2022 19:21:51 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD6A509C0; Tue, 19 Jul 2022 16:21:44 -0700 (PDT) Date: Tue, 19 Jul 2022 16:21:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1658272902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=otC1tTkwE6VyOKni7sKSG3LnYp+1TQS+Z3cn/1v0m9s=; b=j6s0Z0QO0xQ76TiNRXJwxfXbcoQvlVDfcJqv5ru8r9pULc32wyjPkP1lkd+Qt2Ih8PqYVJ oG8+yhiUYoxFx9fHeTAt4SSHh3EIRzexhj+FcEUTHm/JJdBkS1A+HkQuW0z+Odl7LazgJv 3vKva4+MhTzM9id5gYAACJoiFrGdbDc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Ren Zhijie Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, mgorman@techsingularity.net, mingo@redhat.com, peterz@infradead.org Subject: Re: [PATCH rfc 0/6] Scheduler BPF Message-ID: References: <20210916162451.709260-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 On Tue, Jul 19, 2022 at 09:17:24PM +0800, Ren Zhijie wrote: > Hi Roman and list, > > We want to implement a programmable scheduler to meet the schedule > requirements of different workloads. > > Using BPF, we can easily deploy schedule policies for specific workloads, > quickly verifying without modifying the kernel code. This greatly reduces > the cost of deploying new schedule policies in the production environment. > > Therefore, we want to continue to develop based on your patch. We plan to > merge it into the openeuler open-source community and use the community to > continuously evolve and maintain it. > (link: https://www.openeuler.org/en/) > > We made some changes to your patch: > 1. Adapt to the openeuler-OLK-5.10 branch, which mostly base on linux > longterm branch 5.10. > 2. Introduce the Kconfig CONFIG_BPF_SCHED to isolate related code at compile > time. > 3. helpers bpf_sched_entity_to_cgrpid() and > bpf_sched_entity_belongs_to_cgrp() are modified to obtain the task group to > which the sched entity belongs through se->my_q->tg->css.cgroup. > > We have some ideas for the next iteration of Scheduler BPF that we would > like to share with you: > 1.The tag field is added to struct task_struct and struct task_group. Users > can use the file system interface to mark different tags for specific > workloads. The bpf prog obtains the tags to detect different workloads. > 2.Add BPF hook and helper to scheduling processes such as select_task_rq and > pick_next_task to enable scalability. > > It's a new attempt, and there's bound to be a lot of problems later, but > it's exciting that it makes the schduler programmable. Hi Ren! Great to hear my work is useful and thank you for describing your plans! I'm not actively working on it right now, but I might start again in the future. Let me know if I can help you with this effort. Thanks!