Re: [PATCH v2 7/8] zbd: initialize valid data bytes accounting at file set up

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

 



On Wed, Feb 08, 2023 at 05:03:30AM +0000, Shinichiro Kawasaki wrote:
> On Feb 07, 2023 / 14:06, Niklas Cassel wrote:
> > On Tue, Feb 07, 2023 at 03:37:38PM +0900, Shin'ichiro Kawasaki wrote:
> > > The valid data bytes accounting field is initialized at file reset,
> > > after each job started. Each job locks zones to check write pointer
> > > positions of its write target zones. This can cause zone lock contention
> > > with write by other jobs.
> > >
> > > To avoid the zone lock contention, move the initialization from file
> > > reset to file set up before job start. It allows to access the write
> > > pointers and the accounting field without locks. Remove the lock and
> > > unlock codes which are no longer required. Ensure the locks are not
> > > required by checking run-state in the struct thread_data.
> > >
> > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> > > ---

(snip)

> > > @@ -1252,10 +1251,6 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f)
> > >
> > >	zb = zbd_get_zone(f, f->min_zone);
> > >	ze = zbd_get_zone(f, f->max_zone);
> > > -	vdb = zbd_set_vdb(td, f);
>
> The zbd_set_vbd() call in zbd_file_reset() is removed here. Then the check is
> done only at zbd_setup_files() as you expect.

Sorry, I missed that you also removed the only other place that called this
function.

zbd_setup_files() calls functions that are named e.g.:
	if (!zbd_verify_sizes())
		return 1;

	if (!zbd_verify_bs())
		return 1;

Perhaps consider renaming this function to something like
zbd_verify_and_set_vbd(), since this function is now only
called from zbd_setup_files().


Regardless if you rename or not:
Reviewed-by: Niklas Cassel <niklas.cassel@xxxxxxx>



[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