Re: [PATCH v2 6/6] stat: make add lat percentile functions inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021/11/23 23:27, Niklas Cassel wrote:
> From: Niklas Cassel <niklas.cassel@xxxxxxx>
> 
> Now when add_lat_percentile_prio_sample() has been simplified,

s/when/that

> make both add lat percentile functions inline, just like add_stat_sample().
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx>
> ---
>  stat.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/stat.c b/stat.c
> index 678fe953..48c70072 100644
> --- a/stat.c
> +++ b/stat.c
> @@ -3052,9 +3052,10 @@ void add_sync_clat_sample(struct thread_stat *ts, unsigned long long nsec)
>  	add_stat_sample(&ts->sync_stat, nsec);
>  }
>  
> -static void add_lat_percentile_sample(struct thread_stat *ts,
> -				      unsigned long long nsec,
> -				      enum fio_ddir ddir, enum fio_lat lat)
> +static inline void add_lat_percentile_sample(struct thread_stat *ts,
> +					     unsigned long long nsec,
> +					     enum fio_ddir ddir,
> +					     enum fio_lat lat)
>  {
>  	unsigned int idx = plat_val_to_idx(nsec);
>  	assert(idx < FIO_IO_U_PLAT_NR);
> @@ -3062,10 +3063,10 @@ static void add_lat_percentile_sample(struct thread_stat *ts,
>  	ts->io_u_plat[lat][ddir][idx]++;
>  }
>  
> -static void add_lat_percentile_prio_sample(struct thread_stat *ts,
> -					   unsigned long long nsec,
> -					   enum fio_ddir ddir,
> -					   bool high_prio)
> +static inline void add_lat_percentile_prio_sample(struct thread_stat *ts,
> +						  unsigned long long nsec,
> +						  enum fio_ddir ddir,
> +						  bool high_prio)
>  {
>  	unsigned int idx = plat_val_to_idx(nsec);
>  
> 

With the commit message typo fixed,

Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>

-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux