Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1883981ybz; Thu, 30 Apr 2020 07:11:22 -0700 (PDT) X-Google-Smtp-Source: APiQypIic8EZQKcGhfuFSG6tOBRl/7gRHPITEGPjerFvCfB577qaDuHbkK/OY++s3hKu9KweB9Xn X-Received: by 2002:a17:906:1751:: with SMTP id d17mr2772993eje.314.1588255882361; Thu, 30 Apr 2020 07:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588255882; cv=none; d=google.com; s=arc-20160816; b=PmE793HOp5oeSNIwm983q3Sks6aZNksrBQ9A8kk+MVCUmOUejWJqq9k7jX9BB4biKn TAPSzuOzh3W/Odk+HpOSAMNMS5Ch7M2S0sLPaaCvvx3t7ihJZ/oP8Aj9RvKd4VD9Ipca ZVLaen0zIJlDxsR8XR6Nm2Zg4YY7iU8sG/83pQW8v5/mY8CqIEDISiZZdor8EOvDPRmB 6/5E3GCsCVocDswCI7hl3CKv/3pRr8orvH/Safv8746VO6CU2UpfXkJDncvWyw5FvtcM 5tpirlMmd9yrnppf3ut5niAQNlbUH+b+sT7yVNwzPBfZcHTSN8+Wlzx8wSgsgwaxDFzh 0WQw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/2Q15GPhQzGKL/8ZP2UmZiqDYds09rGx/AYom2Pwqm0=; b=0BJ8AEMWiId8oI0QvQNruwRH2SEIEk3o81ishbkiGYb6mwMZ9APAN6l8E8d5IvoZZl Na+nwMhNoKlm+kQhrB3MMJRjs9vPSvAqVQ/fOAk3u5nQK7BI/mjU8Grl22ifBl2CTI12 ByG6sERt5etqKHFNfxYU72TWPx/Yp9O4B1BfF34S5BmLAGRIO6IlPfMMshX6uMbTswNh 3/jAOFEglGnPHjU7te60eBOiB3BJ2aC0NzruuyHpuQA/Xf3I2VCew6gV7wQe/xt/d2aa 9uCvFgwed8k/UNFv/5gy6gK1ZaMtOGKcIW9UZG/eWdz1XnoEUMMpf7v5cOEkAQKvDyav LYOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IY30U2oh; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si6262085eda.9.2020.04.30.07.10.54; Thu, 30 Apr 2020 07:11:22 -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=IY30U2oh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728283AbgD3OJZ (ORCPT + 99 others); Thu, 30 Apr 2020 10:09:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:60562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728206AbgD3Nvv (ORCPT ); Thu, 30 Apr 2020 09:51:51 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E7E62137B; Thu, 30 Apr 2020 13:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588254710; bh=f3rOv7jXSBRKwhcH/xi8Az3LAJfn4iVHQU1B6aVHB9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IY30U2oh9MrEZihzty+OrwogRcmoRZkLZZbMnPCctwIStG6MhnEq9U8n73kr1MXOT 4Wjq5UcsigCa0i2LIclqkeHrHVdeBKV/7Ac1mvw5EIaGVE9anC17HS2eW0Fi+HXYCe ZJ8ENhDd79MniQtOxVjRoJ1666GADxsOmqKl0Rtg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Waiman Long , Steven Rostedt , Tejun Heo , Jens Axboe , Sasha Levin , linux-block@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 58/79] blk-iocost: Fix error on iocost_ioc_vrate_adj Date: Thu, 30 Apr 2020 09:50:22 -0400 Message-Id: <20200430135043.19851-58-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430135043.19851-1-sashal@kernel.org> References: <20200430135043.19851-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Waiman Long [ Upstream commit d6c8e949a35d6906d6c03a50e9a9cdf4e494528a ] Systemtap 4.2 is unable to correctly interpret the "u32 (*missed_ppm)[2]" argument of the iocost_ioc_vrate_adj trace entry defined in include/trace/events/iocost.h leading to the following error: /tmp/stapAcz0G0/stap_c89c58b83cea1724e26395efa9ed4939_6321_aux_6.c:78:8: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token , u32[]* __tracepoint_arg_missed_ppm That argument type is indeed rather complex and hard to read. Looking at block/blk-iocost.c. It is just a 2-entry u32 array. By simplifying the argument to a simple "u32 *missed_ppm" and adjusting the trace entry accordingly, the compilation error was gone. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Acked-by: Steven Rostedt (VMware) Acked-by: Tejun Heo Signed-off-by: Waiman Long Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-iocost.c | 4 ++-- include/trace/events/iocost.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 9a599cc28c290..2dc5dc54e257f 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1594,7 +1594,7 @@ skip_surplus_transfers: vrate_min, vrate_max); } - trace_iocost_ioc_vrate_adj(ioc, vrate, &missed_ppm, rq_wait_pct, + trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct, nr_lagging, nr_shortages, nr_surpluses); @@ -1603,7 +1603,7 @@ skip_surplus_transfers: ioc->period_us * vrate * INUSE_MARGIN_PCT, 100); } else if (ioc->busy_level != prev_busy_level || nr_lagging) { trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate), - &missed_ppm, rq_wait_pct, nr_lagging, + missed_ppm, rq_wait_pct, nr_lagging, nr_shortages, nr_surpluses); } diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h index 7ecaa65b7106e..c2f580fd371b1 100644 --- a/include/trace/events/iocost.h +++ b/include/trace/events/iocost.h @@ -130,7 +130,7 @@ DEFINE_EVENT(iocg_inuse_update, iocost_inuse_reset, TRACE_EVENT(iocost_ioc_vrate_adj, - TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 (*missed_ppm)[2], + TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm, u32 rq_wait_pct, int nr_lagging, int nr_shortages, int nr_surpluses), @@ -155,8 +155,8 @@ TRACE_EVENT(iocost_ioc_vrate_adj, __entry->old_vrate = atomic64_read(&ioc->vtime_rate);; __entry->new_vrate = new_vrate; __entry->busy_level = ioc->busy_level; - __entry->read_missed_ppm = (*missed_ppm)[READ]; - __entry->write_missed_ppm = (*missed_ppm)[WRITE]; + __entry->read_missed_ppm = missed_ppm[READ]; + __entry->write_missed_ppm = missed_ppm[WRITE]; __entry->rq_wait_pct = rq_wait_pct; __entry->nr_lagging = nr_lagging; __entry->nr_shortages = nr_shortages; -- 2.20.1