Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2792803ybk; Tue, 12 May 2020 08:15:58 -0700 (PDT) X-Google-Smtp-Source: APiQypI2t27rzZYzcLruBYsuQQlGvGJ1xBD6k540OjOd4CbI85ohfV4Gw2tUs+Ense5Opb77kS7E X-Received: by 2002:a17:906:8257:: with SMTP id f23mr18311924ejx.196.1589296557901; Tue, 12 May 2020 08:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589296557; cv=none; d=google.com; s=arc-20160816; b=jvPIAyU4SC5DrIKpGB0lZGgyZvcqw45I5JkjBKfd5wm/tz9CXUy8cEKUpBH+oRMWB0 FekyzqhoR3FSma3MX5y/QLWDrCIGDbawXdE8shIxgcoa6V84aBj7Eu0Wj+fvnqj5J2H1 1Z+/rTdrsfSUXBInAeGqxMh6ycjsH2Gi4wWCD7bKWkixOIRl4qplYUqzrw+18EOSAQyF L3PeZO7CuJcWJwcxIg9JvQXH71DZn7QOKz7reJthJ13OfUFkYyviJYFP41SkFJDquhbe NsjNWy+FqwosIT62oUzNqynN1TlIPsBJ9vIV0JHlX6vAqyTPC/NDxUXGOsWZYTlTxlnN +qbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=26gG8IvsRBrkGXPEGguKp2If/qfF+UeVKlPNqDHRucI=; b=J4sZWOIX5aFRUJU8Snm/YJ2A9Eyo+0EhIZH+DLViJiJjkVFKvoaOnQToyw26+u3rV5 OPt54ZpPYoNUF7Um4uyLHKnuJn3ENd19+VI1yvKnRiGe/hasoUW0RG/qgxd+lDLNcLD6 bRG+a4vYU5jwtzn/vkeqwTCux3BN1lo6M0APAQQkZptLzXZzjJ0XTooWkdtX1WrfWlpk WqzENxmRCAamkM+kv0Jx49vmL/15TCIuTLm6u/v6RnX8L4w8oC+Vu+z0RcTSvaf1lIJW KmOBRyx8Labwz71hT5ybrW/YVPEFA7mgs1Pav+ROuiFbPOUTwNCbAiYBeHcFaQtHddwy HqAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de21si1512031edb.304.2020.05.12.08.15.32; Tue, 12 May 2020 08:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730572AbgELPNe (ORCPT + 99 others); Tue, 12 May 2020 11:13:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730224AbgELPNd (ORCPT ); Tue, 12 May 2020 11:13:33 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2F1FC061A0C; Tue, 12 May 2020 08:13:33 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jYWb1-00074F-9G; Tue, 12 May 2020 17:13:27 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id C0B721C02FC; Tue, 12 May 2020 17:13:26 +0200 (CEST) Date: Tue, 12 May 2020 15:13:26 -0000 From: "tip-bot2 for Thomas Gleixner" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched: Make scheduler_ipi inline Cc: Thomas Gleixner , Alexandre Chartre , Peter Zijlstra , x86 , LKML In-Reply-To: <20200505134058.453581595@linutronix.de> References: <20200505134058.453581595@linutronix.de> MIME-Version: 1.0 Message-ID: <158929640661.390.13262559099538803651.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 2a0a24ebb499c9d499eea948d3fc108f936e36d4 Gitweb: https://git.kernel.org/tip/2a0a24ebb499c9d499eea948d3fc108f936e36d4 Author: Thomas Gleixner AuthorDate: Fri, 27 Mar 2020 12:42:00 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 12 May 2020 17:10:49 +02:00 sched: Make scheduler_ipi inline Now that the scheduler IPI is trivial and simple again there is no point to have the little function out of line. This simplifies the effort of constraining the instrumentation nicely. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Link: https://lkml.kernel.org/r/20200505134058.453581595@linutronix.de --- include/linux/sched.h | 10 +++++++++- kernel/sched/core.c | 10 ---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 4418f5c..d4ea440 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1715,7 +1715,15 @@ extern char *__get_task_comm(char *to, size_t len, struct task_struct *tsk); }) #ifdef CONFIG_SMP -void scheduler_ipi(void); +static __always_inline void scheduler_ipi(void) +{ + /* + * Fold TIF_NEED_RESCHED into the preempt_count; anybody setting + * TIF_NEED_RESCHED remotely (for the first time) will also send + * this IPI. + */ + preempt_fold_need_resched(); +} extern unsigned long wait_task_inactive(struct task_struct *, long match_state); #else static inline void scheduler_ipi(void) { } diff --git a/kernel/sched/core.c b/kernel/sched/core.c index cd2070d..74fb89b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2312,16 +2312,6 @@ static void wake_csd_func(void *info) sched_ttwu_pending(); } -void scheduler_ipi(void) -{ - /* - * Fold TIF_NEED_RESCHED into the preempt_count; anybody setting - * TIF_NEED_RESCHED remotely (for the first time) will also send - * this IPI. - */ - preempt_fold_need_resched(); -} - static void ttwu_queue_remote(struct task_struct *p, int cpu, int wake_flags) { struct rq *rq = cpu_rq(cpu);