Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1250982pxa; Thu, 20 Aug 2020 06:47:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/1yALrg/aSB0KUaSdh4I+k69RzoQoxvdZhgli6A+bRlwA88PLSTPtTFwkDaCxLoiYYmFs X-Received: by 2002:a50:fa94:: with SMTP id w20mr3077534edr.82.1597931254615; Thu, 20 Aug 2020 06:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597931254; cv=none; d=google.com; s=arc-20160816; b=Pc545RSyqmckLCaLtaUVrK3RmXsI8jkoa7umBS2g6ejbswEwIoERICY6vYuWHzHlCI 1ku54vzWjC8+wT+/qFwfUs4I+pJ8OeAH2HXYUrli7VnfoyXoNQrq8HhKOvplU+A96QIx FdrvcCXnYyS/NqsI8BST4/BrVyBRZVUUxEBs9NHNnS6Iv0H/QEv26HCfFykJVWSOlyrd eqMwrApnk/uerg1Xcv9WbY0uvnz5FRl3jmYCqC8v2fCkWuLx1tn/dGDELToo3U8qd+NQ zvZwWvHtRmPUZVo0TKIbtkYXp5fhrmewgFeJTzb65oeG3TJWITbRgA+mEdHuQxOT/F16 IcwA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jk2fx0GbyX7IoIxmTERH1FClGgcnMafUrrvTBRPeV2U=; b=FSFjRMEbCHwW1Jgq7BVUriwcFXLWTRMvvZFMso2l6h8jkc0HrsUWwytxEqBnSqoz5i i1bSvGcynbwX1YuPKFV/nIrBn8xydtjlbGNCI5/HwBF78C/h7MImHoPY9EL1NMAmFaNe OvfTcnWKLlKNIY+u8O9PJkpfFmrHZ8xPnbJZ/nPkjwBGTw3cVse3Lb4HsJjUxrmazVG2 mGJnV35dbk5R68WJeRu4X4RMgPrCf2lIsRLISkwIo5LOobYkX4b9fTcOFVCLvTTpgxpj JKI/dAHvvkhPzjx+mIegMQr/paL8GzoTNjMmHqBZVz4ujatQ+OdGHRPYW2yjxj130QI2 m+Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Afn2QTCd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si1651099edb.188.2020.08.20.06.47.10; Thu, 20 Aug 2020 06:47:34 -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=@kernel.org header.s=default header.b=Afn2QTCd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728944AbgHTNpt (ORCPT + 99 others); Thu, 20 Aug 2020 09:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:37404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726899AbgHTJ1n (ORCPT ); Thu, 20 Aug 2020 05:27:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED9DF22D04; Thu, 20 Aug 2020 09:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915662; bh=L0c2TyP0QmAn666VFjlvTxbnwnAQCCcLSbvt6gQ+sfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Afn2QTCdiO1xLZWlY/K/G/0k96rzd+H/gJzp/UO8j5b0LZ38Kn5uPYcDH38RYk9NB 4zY/FDRmS2gbCZTAjym8QzoQ2dKnaHCDUcMZfwHKqOcRJ+DvKme5e102FHWvfOsry/ JFn9yVNJz9VwWBBvUH60fGa5eSxN8TBL4B/pyQZk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Kevin Hao , "Steven Rostedt (VMware)" Subject: [PATCH 5.8 090/232] tracing/hwlat: Honor the tracing_cpumask Date: Thu, 20 Aug 2020 11:19:01 +0200 Message-Id: <20200820091617.192793137@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Hao commit 96b4833b6827a62c295b149213c68b559514c929 upstream. In calculation of the cpu mask for the hwlat kernel thread, the wrong cpu mask is used instead of the tracing_cpumask, this causes the tracing/tracing_cpumask useless for hwlat tracer. Fixes it. Link: https://lkml.kernel.org/r/20200730082318.42584-2-haokexin@gmail.com Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 0330f7aa8ee6 ("tracing: Have hwlat trace migrate across tracing_cpumask CPUs") Signed-off-by: Kevin Hao Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_hwlat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c @@ -283,6 +283,7 @@ static bool disable_migrate; static void move_to_next_cpu(void) { struct cpumask *current_mask = &save_cpumask; + struct trace_array *tr = hwlat_trace; int next_cpu; if (disable_migrate) @@ -296,7 +297,7 @@ static void move_to_next_cpu(void) goto disable; get_online_cpus(); - cpumask_and(current_mask, cpu_online_mask, tracing_buffer_mask); + cpumask_and(current_mask, cpu_online_mask, tr->tracing_cpumask); next_cpu = cpumask_next(smp_processor_id(), current_mask); put_online_cpus(); @@ -373,7 +374,7 @@ static int start_kthread(struct trace_ar /* Just pick the first CPU on first iteration */ current_mask = &save_cpumask; get_online_cpus(); - cpumask_and(current_mask, cpu_online_mask, tracing_buffer_mask); + cpumask_and(current_mask, cpu_online_mask, tr->tracing_cpumask); put_online_cpus(); next_cpu = cpumask_first(current_mask);