* submit bio directly from userspace
@ 2015-10-07 14:42 Mike Krinkin
2015-10-09 11:41 ` Dmitry Monakhov
0 siblings, 1 reply; 3+ messages in thread
From: Mike Krinkin @ 2015-10-07 14:42 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe, hch, kmo, dmonakhov
Hi,
i'm developing block layer workload simulator/player and need to
generate bios as close as possible to the ones in original workload.
To play workload i employ aio + O_DIRECT, but all IOs end up as bios
with SYNC flag set. So i wonder is there any way to control bios
flags from userspace or, maybe, any other options to generate
workload from userspace except aio + O_DIRECT with more precise
control over bio flags?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: submit bio directly from userspace
2015-10-07 14:42 submit bio directly from userspace Mike Krinkin
@ 2015-10-09 11:41 ` Dmitry Monakhov
2015-10-09 14:32 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Monakhov @ 2015-10-09 11:41 UTC (permalink / raw)
To: Mike Krinkin, linux-kernel; +Cc: axboe, hch, kmo
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
Mike Krinkin <krinkin.m.u@gmail.com> writes:
> Hi,
>
> i'm developing block layer workload simulator/player and need to
> generate bios as close as possible to the ones in original workload.
> To play workload i employ aio + O_DIRECT, but all IOs end up as bios
> with SYNC flag set. So i wonder is there any way to control bios
> flags from userspace or, maybe, any other options to generate
> workload from userspace except aio + O_DIRECT with more precise
> control over bio flags?
100% agree, I've investigated existing io-load replay tools and
seems that they all use O_DIRECT(like btreplay) or
buffered-aio/{sync_file_range,fadvise} ( like fio).
So it looks like they all very inaccurate.
Jens, what do to do to replay real load in order to test fs/ioscheduler
harness? Are you interested in having such fine-tuning interface
(probably guarded by CAP_SYS_ADMIN)?
There are several places where we can pass such flag
1) iocb->aio_flag, add IOCB_FLAG_DIRECT_ASYNC
2) add new flag O_DIRECT_ASYNC to file->f_flags
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: submit bio directly from userspace
2015-10-09 11:41 ` Dmitry Monakhov
@ 2015-10-09 14:32 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2015-10-09 14:32 UTC (permalink / raw)
To: Dmitry Monakhov, Mike Krinkin, linux-kernel; +Cc: hch, kmo
On 10/09/2015 05:41 AM, Dmitry Monakhov wrote:
> Mike Krinkin <krinkin.m.u@gmail.com> writes:
>
>> Hi,
>>
>
>> i'm developing block layer workload simulator/player and need to
>> generate bios as close as possible to the ones in original workload.
>> To play workload i employ aio + O_DIRECT, but all IOs end up as bios
>> with SYNC flag set. So i wonder is there any way to control bios
>> flags from userspace or, maybe, any other options to generate
>> workload from userspace except aio + O_DIRECT with more precise
>> control over bio flags?
> 100% agree, I've investigated existing io-load replay tools and
> seems that they all use O_DIRECT(like btreplay) or
> buffered-aio/{sync_file_range,fadvise} ( like fio).
> So it looks like they all very inaccurate.
>
> Jens, what do to do to replay real load in order to test fs/ioscheduler
> harness? Are you interested in having such fine-tuning interface
> (probably guarded by CAP_SYS_ADMIN)?
A long time ago I wrote binject, which was meant to be a way to directly
inject bio's on a queue:
http://git.kernel.dk/cgit/linux-block/log/?h=binject
It hasn't been moved forward, however. I haven't looked, is is SYNC the
only flag addition we are worried about here? There are a slew of other
flags that may impact how IO is treated. For instance, file system has
tagged the request META. We can't pass that in either. Same is true for
FLUSH or FUA writes.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-09 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 14:42 submit bio directly from userspace Mike Krinkin
2015-10-09 11:41 ` Dmitry Monakhov
2015-10-09 14:32 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).