Re: [PATCH] blk-iocost: Fix systemtap error on iocost_ioc_vrate_adj
From: Waiman Long
Date: Tue Apr 21 2020 - 14:36:42 EST
On 4/21/20 10:59 AM, Steven Rostedt wrote:
> On Tue, 21 Apr 2020 09:07:55 -0400
> Waiman Long <longman@xxxxxxxxxx> wrote:
>
>> diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
>> index 7ecaa65b7106..c2f580fd371b 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;
> Regardless if this helps systemtap or not, I like the patch because the
> current code is rather ugly, and this patch makes it more readable.
>
> Suggestion: change the topic to remove systemtap, as that's not going to be
> the true reason for acceptance of this patch. It should just be about
> cleaning up the trace event itself.
>
> Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
>
> -- Steve
>
OK, will send a v2 patch to update the commit log. Thanks for the review.
Cheers,
Longman