Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp818547pxa; Wed, 5 Aug 2020 13:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdDtYxuM7Zjv+eG3YqSsKJWJZcaBG2Sw+3Jw/EIExEQHsxe9Y5BWNG4Qvq/vpt8LFHZH8E X-Received: by 2002:a17:906:25d0:: with SMTP id n16mr809601ejb.306.1596659696384; Wed, 05 Aug 2020 13:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596659696; cv=none; d=google.com; s=arc-20160816; b=EuInHOqIUopeRsvlZCbJqROOlLbYh++DC5sNktgkx+8Z68cJrIN4o2UYIcITblewwW SlqiYNEQd0a8DwArXGJMsotmoooU/U9v2jcYMjMx3bJVTyCRh7GZIkqiWrZi7DzK7e48 fRQOyJXa/GDwhdXhe+zv78z5e7tuV7MQiQ/wg8Zq+bE9LQNov72bp+NrhGoSfm6RDEEF Ytx7fxem97PCJyweWqUUlCyvaPHvdEp9eNZfK7caJRgcjTHSXSrwmQBJLMgYqUPyuFf9 uTKCuTGA2ob1odHdp2OYi1f6N48mXL3TsGNDwk4MMbaRIv5nv9Q/+X6PXnxxEXOa26Xx Ridg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=8B67PlklxUGzIOZVHxF/ayR8w2AByyTls0ffTVLHi6c=; b=O/WZWv/oPbIjcRMqgndXze/QgKfP6qWl4EkmxLFdt5/ttvAbjHy+KjLyXqUDmyQtco pFfZVD3e8jAlcwYhv2proppP8RfWxEsKT9R2xNzlosM6EHuJCJBfEhMei4uzWxulj6S8 Pj1E9O22nNjOUehv4L9Ti6IICw8Z8fv/+xAsKYjennNoNhNxIg27MBn2y3asYDlzgFNK v8FVIUyfUeQfI3t5kT8CaAhpTOzLyOpqXJizVfD1xo1Bc89vVWZmvYIpyFZoBx+RHy/O HFXf9gvHMT14ATow1z+dJ7tcid6t9zJ3x9GY8bCQL5hxVhCxiYvkjIrfPdCWgAao9Oqz OzfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S70ZBaYy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo25si1906709edb.186.2020.08.05.13.34.34; Wed, 05 Aug 2020 13:34:56 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S70ZBaYy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726201AbgHEUbw (ORCPT + 99 others); Wed, 5 Aug 2020 16:31:52 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:35732 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726078AbgHEUbu (ORCPT ); Wed, 5 Aug 2020 16:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596659509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=8B67PlklxUGzIOZVHxF/ayR8w2AByyTls0ffTVLHi6c=; b=S70ZBaYy9hx4LDPAnyAXZe0/vyZ1VqUNf5eX8XMQbV6vYdObGshJ+eO55wm/YN28R4Xr3U iXR91M44KJlonwG9f/qhzuNzjJl/UUdp/dWxrOwEF7mZwAreVXuC8T7IE+NFSH1v5vYvPU Js/0dPyleWQBqObm6mOtLOExlbJzyZA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-fg4jNGiPMd6zoITUhJ1LtQ-1; Wed, 05 Aug 2020 16:31:45 -0400 X-MC-Unique: fg4jNGiPMd6zoITUhJ1LtQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 731D580BCAB; Wed, 5 Aug 2020 20:31:44 +0000 (UTC) Received: from pauld.bos.com (dhcp-17-51.bos.redhat.com [10.18.17.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0917610013D7; Wed, 5 Aug 2020 20:31:39 +0000 (UTC) From: Phil Auld To: linux-kernel@vger.kernel.org Cc: Qais Yousef , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Steven Rostedt , Juri Lelli Subject: [PATCH] sched: Fix use of count for nr_running tracepoint Date: Wed, 5 Aug 2020 16:31:38 -0400 Message-Id: <20200805203138.1411-1-pauld@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The count field is meant to tell if an update to nr_running is an add or a subtract. Make it do so by adding the missing minus sign. Fixes: 9d246053a691 ("sched: Add a tracepoint to track rq->nr_running") Signed-off-by: Phil Auld --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 3fd283892761..28709f6b0975 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1999,7 +1999,7 @@ static inline void sub_nr_running(struct rq *rq, unsigned count) { rq->nr_running -= count; if (trace_sched_update_nr_running_tp_enabled()) { - call_trace_sched_update_nr_running(rq, count); + call_trace_sched_update_nr_running(rq, -count); } /* Check if we still need preemption */ -- 2.26.2