All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] init: do not create lat logs when not needed
Date: Mon, 17 Jan 2022 09:51:33 +0000	[thread overview]
Message-ID: <YeU8JHc1ZsgZE2Yq@x1-carbon> (raw)
In-Reply-To: <20220117021127.9259-1-damien.lemoal@wdc.com>

On Mon, Jan 17, 2022 at 11:11:27AM +0900, Damien Le Moal wrote:
> When any of the options disable_lat, disable_slat and disable_clat are
> used, there is no need to create the lat log associated with the
> disabled latency. In addition, when write_lat_log is also specified,
> this change avoids the creation of empty latency log files.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  init.c | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/init.c b/init.c
> index 5f069d9a..07daaa84 100644
> --- a/init.c
> +++ b/init.c
> @@ -1586,17 +1586,23 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
>  		else
>  			suf = "log";
>  
> -		gen_log_name(logname, sizeof(logname), "lat", pre,
> -				td->thread_number, suf, o->per_job_logs);
> -		setup_log(&td->lat_log, &p, logname);
> +		if (!o->disable_lat) {
> +			gen_log_name(logname, sizeof(logname), "lat", pre,
> +				     td->thread_number, suf, o->per_job_logs);
> +			setup_log(&td->lat_log, &p, logname);
> +		}
>  
> -		gen_log_name(logname, sizeof(logname), "slat", pre,
> -				td->thread_number, suf, o->per_job_logs);
> -		setup_log(&td->slat_log, &p, logname);
> +		if (!o->disable_slat) {
> +			gen_log_name(logname, sizeof(logname), "slat", pre,
> +				     td->thread_number, suf, o->per_job_logs);
> +			setup_log(&td->slat_log, &p, logname);
> +		}
>  
> -		gen_log_name(logname, sizeof(logname), "clat", pre,
> -				td->thread_number, suf, o->per_job_logs);
> -		setup_log(&td->clat_log, &p, logname);
> +		if (!o->disable_clat) {
> +			gen_log_name(logname, sizeof(logname), "clat", pre,
> +				     td->thread_number, suf, o->per_job_logs);
> +			setup_log(&td->clat_log, &p, logname);
> +		}
>  
>  	}
>  
> -- 
> 2.34.1
> 

Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>

  reply	other threads:[~2022-01-17  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  2:11 [PATCH] init: do not create lat logs when not needed Damien Le Moal
2022-01-17  9:51 ` Niklas Cassel [this message]
2022-01-17 14:22 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YeU8JHc1ZsgZE2Yq@x1-carbon \
    --to=niklas.cassel@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.