Re: Adding IO engine

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

 



On Tue, Apr 11, 2017 at 8:22 AM, Deyoung Hong (dhong) <dhong@xxxxxxxxxx> wrote:
> I would think both ->setup and ->get_file_size should be called before

get_file_size is not being called if the engine provides setup()
method. If it doesn't, fio calls get_file_size too early, to my
recollection even before the engine has been properly initialized, and
that's why setup() workaround exists.

> ->iomem_alloc, but I have an fio job file (case problem reported by the
> user) where ->iomem_alloc is called before ->setup.

if you see this happening (although, from my year-old recollection,
that's not the case with setup()), just submit a bug report showing
your job file and call sequence.

Regards,
Andrey

> My main question is
> that an fio bug (minor)?  If someone would like to fix it, I can send a test
> job file.
>
>
>
> Thanks,
>
> Deyoung
>
>
>
>
>
> From: Andrey Kuzmin [mailto:andrey.v.kuzmin@xxxxxxxxx]
> Sent: Monday, April 10, 2017 2:40 PM
> To: Deyoung Hong (dhong) <dhong@xxxxxxxxxx>
> Cc: fio@xxxxxxxxxxxxxxx
> Subject: RE: Adding IO engine
>
>
>
>
>
>
>
> On Apr 11, 2017 00:21, "Deyoung Hong (dhong)" <dhong@xxxxxxxxxx> wrote:
>
> The concept of "file" can represent a special device and driver unknown to
> the system, and get_file_size() and/or setup() are usually the first APIs
> that fio should call where the device will be initialized and set its max
> size so that fio can know the device "file" capacity.  Such device has to be
> initialized prior to IO (DMA) buffer allocation/free that is specific only
> to that device.   There isn't any other fio plugin APIs that precede
> iomem_alloc, and I think iomem_alloc/free were added specifically to support
> that special device.
>
>
>
>
>
> No, the API was added to support I/O engines with special requirements re
> I/O buffer memory, with no relation to special files. If you have specific
> file setup requirements, your engine should provide setup method. As far as
> I recall, it occurs before iomem initialization.
>
>
>
> Regards,
>
> Andrey
>
>
> How is that a misconception?
>
>
>
> -----Original Message-----
> From: fio-owner@xxxxxxxxxxxxxxx [mailto:fio-owner@xxxxxxxxxxxxxxx] On Behalf
> Of Andrey Kuzmin
> Sent: Monday, April 10, 2017 12:44 PM
> To: Deyoung Hong (dhong) <dhong@xxxxxxxxxx>
> Cc: fio@xxxxxxxxxxxxxxx
> Subject: Re: Adding IO engine
>
> On Mon, Apr 10, 2017 at 8:45 PM, Deyoung Hong (dhong) <dhong@xxxxxxxxxx>
> wrote:
>> Hi Jens,
>>
>> I have a couple basic questions:
>>
>> 1)  If I want to submit a new IO engine with fio and it has a dependency
>> on an external library, how does that work when fio is compiled?  Please
>> also point me to info how to submit a new IO engine to be packaged with fio?
>>
>> 2)  I've seen cases where the ->iomem_alloc() function (i.e. for a custom
>> IO engine) is invoked first by fio before ->get_file_size() or ->setup().
>> This causes an issue since IO memory allocation can have dependency on
>> certain initialization (for the custom IO engine) that is done in
>> ->get_file_size().   I just wonder if that's an fio bug or how it should be?
>
> It sounds more like a misconception re iomem_{alloc,free} API. It is
> about buffers I/O goes to/from, not files. As an example (and the root
> cause behind the API proposal), I wanted to be able to allocate
> buffers in DMAable memory as my engine required that to interact with
> hardware directly.
>
> Being unrelated to files by design, buffer initialization occurs way
> before file setup as it did in fio before iomem_* API was introduced.
>
> Regards,
> Andrey
>
>
>
>>   My current work around is to check in ->iomem_alloc() each time and do
>> initializion first if has not.
>>
>> Thanks,
>> Deyoung
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe fio" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fio" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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