Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2334797rwr; Fri, 21 Apr 2023 07:34:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZvAzHNl9EibM1DpzooAbcsMMIAsC98rw8VVTrukQnmCziAWksXb6Ej+rxWz+UM2kgcCeXk X-Received: by 2002:a17:90a:48:b0:246:fbef:790e with SMTP id 8-20020a17090a004800b00246fbef790emr4925435pjb.3.1682087668228; Fri, 21 Apr 2023 07:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682087668; cv=none; d=google.com; s=arc-20160816; b=UPmm8ctdAccZbAZgtqivtwnh+FVQCkFiAj1TpK72kYwbtXqhcHcpCagSXi/0myrutL HGKkLzOBYUAT7I+Kny7gtDWKBwQEpDoPnoIVkdswzJrO776vhnWknZ9k2bJt+Yppu/kn pOE5C4p3qW/sd35yXi+kX+NV7qn4oGeVDqXf2BlkVuPLYQyoIxU9yBCRX/j8DHLJEOuq J+jSV3dUw4uhnNSAhMP/R/kHfAeSFvkinUU+kl78i3SwDTSfeUko9Cuco7bX9HQNxopv MfvIa3zxqnUQqxmfJJq5VgtS9/Qm9dHZV6QZk/oADFyBoaGYLAG8Vj1t9Pd3ySObSaZz BtQw== 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=nKhBu8sG6Yo56k0RSsJ8wWqsAKsW1s8Uamb5SWZYgmk=; b=Ig/8D2YRdzX8EAfQOn3FQY2B8UZ2nxbe8azhSyKmopkKISqKcwyDWiKoqK3j6ebqtS 3Z/McaUT/01LitNL+PfmE9PZoeZr8CLMOB2rhq//1RikY8Yx1q4H5gZ+tohj617FyOas 8ynxawAvvu+s5m2FUYpHqw5G42hiw8fKMiMmPgQuzcHPGRH+MdZkQ/cxhDQOvpVpyDbH l46yhtbUTZk4Lnhsqmhl4Hj3nTx2/q6Wn/m/e+UwGDAMLnjGViYxNpyPmg0ilBtl83cH k+WWU/BLZLz2dyduQSg+mxnml2o/WBmTxCJnlqc517feio47KLA0+ZNN/RhlydsXsbXj 76cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=n3ftHlJT; 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 w11-20020a17090abc0b00b0024696759991si7327196pjr.47.2023.04.21.07.34.15; Fri, 21 Apr 2023 07:34:28 -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=@gmail.com header.s=20221208 header.b=n3ftHlJT; 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 S232648AbjDUOb3 (ORCPT + 99 others); Fri, 21 Apr 2023 10:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbjDUOb1 (ORCPT ); Fri, 21 Apr 2023 10:31:27 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BD514695; Fri, 21 Apr 2023 07:31:26 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1a66e7a52d3so18841735ad.0; Fri, 21 Apr 2023 07:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682087486; x=1684679486; 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=nKhBu8sG6Yo56k0RSsJ8wWqsAKsW1s8Uamb5SWZYgmk=; b=n3ftHlJTpDJTkhfmUdCx6lBZTh4cfghTRGbTz3FvC4THayyOQtgN77Abu9ocarHQgr 8nFhZuVDAb2VCja7jEil9DfV3soQQHx42HhgvhLV7AzRJvfv3KepPonCF0oergHy5x3I Fw4buBJcMGJYJ6stwT0NRdlkt022MQK52ST0n+kOsFD7W2ql3m1a0+CjfJhhdDtXhTQE bqKPWgh80N1ZAbqlVQUfNYl6sbvah77a5gQ/8BB6jLQhV3Acjhs2d2m704esGj2SK1Tb woSvx4G+raElIdfKeYFOO9AOn4ocPOyPmCnhAfQkrqR2iA86UW3A+NgQa4vAESxzRtzQ 8Rww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682087486; x=1684679486; 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=nKhBu8sG6Yo56k0RSsJ8wWqsAKsW1s8Uamb5SWZYgmk=; b=NYDpIcUIpCPJ44lNOLzD+q2ps7NgbSirbZ7XF2wp1ic4ngKul+f4rQJavA8I6fnCdq Kza7DVldZmMtIbceWq5vTIvdLvUWVsSpFZ53M8O+W7KS6aqTUp7OdJ7wT8PI5+0Gp/Nx mQyDmVo23PrIILyiPB/gtxfqRX0CquSkjHosMqdkJQG1CIHIZAh829cTSEhquWpSzQYU UCQe8P7Io8az7zoVUJoETep5wk2/7mi5jyVHx/L3fPl6itn1WtZ8Q7BDFVTg6SwEftom rq69licFU7J2NuQiEQRAFjLUs/+7GnnjLQTHe4LiE4VQ9zy8G4HIcv5tjp9ZVXLjedL/ 2c8Q== X-Gm-Message-State: AAQBX9cED/ja+qBlkbrQH7yjv75JAhFtQ2bPKCT2PBk0+gVzjO07tG1U Dh+S+3d+zl31j6Rr7prAROI= X-Received: by 2002:a17:903:40cc:b0:1a0:6bd4:ea78 with SMTP id t12-20020a17090340cc00b001a06bd4ea78mr5285204pld.31.1682087485496; Fri, 21 Apr 2023 07:31:25 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id jh22-20020a170903329600b001a5262134d7sm2828397plb.202.2023.04.21.07.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 07:31:25 -0700 (PDT) Sender: Tejun Heo Date: Fri, 21 Apr 2023 04:31:23 -1000 From: Tejun Heo To: Andrea Righi 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 28/32] sched_ext: Implement core-sched support Message-ID: References: <20230317213333.2174969-1-tj@kernel.org> <20230317213333.2174969-29-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.5 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,T_SCC_BODY_TEXT_LINE 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, Andrea. On Thu, Apr 20, 2023 at 09:56:11PM +0200, Andrea Righi wrote: > On Fri, Mar 17, 2023 at 11:33:29AM -1000, Tejun Heo wrote: > ... > > > > +static int balance_scx(struct rq *rq, struct task_struct *prev, > > + struct rq_flags *rf) > > +{ > > + int ret; > > + > > + ret = balance_one(rq, prev, rf, true); > > + > > + /* > > + * When core-sched is enabled, this ops.balance() call will be followed > > + * by put_prev_scx() and pick_task_scx() on this CPU and pick_task_scx() > > + * on the SMT siblings. Balance the siblings too. > > + */ > > + if (sched_core_enabled(rq)) { > > + const struct cpumask *smt_mask = cpu_smt_mask(cpu_of(rq)); > > balance_scx() should be a no-op if CONFIG_SCHED_SMT is undefined or we > may get a build error here. > > For example with a minimal ppc64le config (and CONFIG_SCHED_SMT off) I > can reproduce this: > > ./arch/powerpc/include/asm/smp.h:139:22: error: implicit declaration of function 'cpu_smt_mask'; did you mean 'cpu_cpu_mask'? [-Werror=implicit-function-declaration] > > So maybe have something like this (or similar): > > #ifdef CONFIG_SCHED_SMT > ... > #else > static inline int balance_scx(struct rq *rq, struct task_struct *prev, > struct rq_flags *rf) > { > return 0 > } > #endif Will fix. Thank you. -- tejun