Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2053682rwn; Fri, 9 Sep 2022 07:56:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR4YaVsoCwEiNM93+73WwuhHJQcpnd+owlvQbfORJctoTfvuplVNDY9r/rQHlCIKMAV05twe X-Received: by 2002:aa7:c458:0:b0:44e:9078:5712 with SMTP id n24-20020aa7c458000000b0044e90785712mr12173640edr.25.1662735389227; Fri, 09 Sep 2022 07:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662735389; cv=none; d=google.com; s=arc-20160816; b=agYeid85DwaVgn0kFZFObGyB4ZGTkZIY2gWtjf8ouL2Xk9fs0xXkJDMCuPM8Dhxl7X LPmVJCS+43gwnWdHYe+K0W0F3SVOJzT4CceCMOaW+eDpNPDJAMMmU4I0XjZT3h62+iqm N6vyc3yktG5pjQS3tKkntueaG3SzZb7jHp3dvKVNojGWO9FJz6QV/O/jKFIWVezcD1Qm tDD8J42iGav3ucVZiv5TLr1LgTzBY1lvtX63kwWQUOyD0z1eHr8GO4gPtDd1Yb4fIB75 BndgeiwjzbUshi425B/oJDnFeVf29fhWhaDorgBROgekTNwiVoWeos3NZRnAEbfOVBD8 uZcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=YCGme84nO6sBKEDLB3+s+9kW6qoJ0d6C7gstoiW8pRg=; b=it4MCYXYK+OHkUDCROMpexosFS3bznr7rRdBH02FFgsbVTeKylMwnYgZiDUN7uDwNf UBuS8DBA5kvIGc4NwqaKzCsveeFUMzkUgPNW2xFfs6La6HZOb5QxHu+Ffb8OYc/YiJhO dAayY8mLyo+kiFl+iMMZBG1HIJDjI378yXCz0hkDS+HGsyQXlKYez2E3pT1d0LyNhTGc 5rbkp2g4Wo7sSLCXky9D6AqcHiQVKe0cEOjwpUz9Y1xQGSenLkPApTNtRllsXSlB+WDZ voKhWBoVNLXueYXDu1wg35X5xiqONbVl9EaeaDTTGrzaSFVzQRVoGcceUKMAiz8wS+ab qjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Jy2SUweE; dkim=neutral (no key) header.i=@linutronix.de header.b=vGmZS6uw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm4-20020a170907948400b00771d781fb88si539270ejc.411.2022.09.09.07.56.02; Fri, 09 Sep 2022 07:56:29 -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=@linutronix.de header.s=2020 header.b=Jy2SUweE; dkim=neutral (no key) header.i=@linutronix.de header.b=vGmZS6uw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbiIIOAj (ORCPT + 99 others); Fri, 9 Sep 2022 10:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231782AbiIIOAT (ORCPT ); Fri, 9 Sep 2022 10:00:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C6D66D9E5; Fri, 9 Sep 2022 07:00:18 -0700 (PDT) Date: Fri, 09 Sep 2022 14:00:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1662732017; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YCGme84nO6sBKEDLB3+s+9kW6qoJ0d6C7gstoiW8pRg=; b=Jy2SUweE1GxMxRsHi1y24sSLE45Pe9f0Cd5WFHIul7vieOHU78YGFkn0Z4gL9SqgfyFCzu ndjc0zftnoi0YwMRZUGfgHksKwHN68afM+XP+995HrpFPjQ7Ji+AjFgdUeH0qUstmYFSZ0 FP7BQdfQgJTmrLbEzJ0mQxirYpd6MD4CdrdlaYkztRsXTOSHBlCPAI3fp6ybJkjW87LEAv 6P9ftS+8l6C9KVbWofaaTRC+Hn2hIiVT51XDKM0G2nz/2/xZlpQfNvBReqKKNbMfkuobnL /Uf7FVsl9pdybvcKmMf9FyuHLScrrAa8Pnt9DsEobblmCmRtCRQmYmANNuRycQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1662732017; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YCGme84nO6sBKEDLB3+s+9kW6qoJ0d6C7gstoiW8pRg=; b=vGmZS6uwK4OoQ0pGgTqGLPJePXIzihTy5SjJiuRZdY1UsI+5QxG6jbJxm8p/FfXp72dCJs WpYb5tDggdzdJdAQ== From: "tip-bot2 for Chengming Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/psi] sched/psi: Move private helpers to sched/stats.h Cc: Chengming Zhou , "Peter Zijlstra (Intel)" , Johannes Weiner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220825164111.29534-5-zhouchengming@bytedance.com> References: <20220825164111.29534-5-zhouchengming@bytedance.com> MIME-Version: 1.0 Message-ID: <166273201595.401.8558598021682834136.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The following commit has been merged into the sched/psi branch of tip: Commit-ID: d79ddb069c5257a924456eb99b53fc1ea715c0a3 Gitweb: https://git.kernel.org/tip/d79ddb069c5257a924456eb99b53fc1ea715c0a3 Author: Chengming Zhou AuthorDate: Fri, 26 Aug 2022 00:41:05 +08:00 Committer: Peter Zijlstra CommitterDate: Fri, 09 Sep 2022 11:08:31 +02:00 sched/psi: Move private helpers to sched/stats.h This patch move psi_task_change/psi_task_switch declarations out of PSI public header, since they are only needed for implementing the PSI stats tracking in sched/stats.h psi_task_switch is obvious, psi_task_change can't be public helper since it doesn't check psi_disabled static key. And there is no any user now, so put it in sched/stats.h too. Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20220825164111.29534-5-zhouchengming@bytedance.com --- include/linux/psi.h | 4 ---- kernel/sched/stats.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/psi.h b/include/linux/psi.h index dd74411..fffd229 100644 --- a/include/linux/psi.h +++ b/include/linux/psi.h @@ -18,10 +18,6 @@ extern struct psi_group psi_system; void psi_init(void); -void psi_task_change(struct task_struct *task, int clear, int set); -void psi_task_switch(struct task_struct *prev, struct task_struct *next, - bool sleep); - void psi_memstall_enter(unsigned long *flags); void psi_memstall_leave(unsigned long *flags); diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index baa839c..c39b467 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h @@ -107,6 +107,10 @@ __schedstats_from_se(struct sched_entity *se) } #ifdef CONFIG_PSI +void psi_task_change(struct task_struct *task, int clear, int set); +void psi_task_switch(struct task_struct *prev, struct task_struct *next, + bool sleep); + /* * PSI tracks state that persists across sleeps, such as iowaits and * memory stalls. As a result, it has to distinguish between sleeps,