RE: Adding IO engine

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

 



On your response of 2)

No, ->io_u_init() is always called after ->get_file_size(), whereas ->iomem_alloc() is called before ->get_file_size() only in some peculiar cases.

I'd like Jens to explain if by design or in which case that  ->iomem_alloc() is called before  ->get_file_size?


-----Original Message-----
From: fio-owner@xxxxxxxxxxxxxxx [mailto:fio-owner@xxxxxxxxxxxxxxx] On Behalf Of Sitsofe Wheeler
Sent: Monday, April 10, 2017 1:31 PM
To: Deyoung Hong (dhong) <dhong@xxxxxxxxxx>
Cc: fio@xxxxxxxxxxxxxxx
Subject: Re: Adding IO engine

Hi,

On 10 April 2017 at 18:45, Deyoung Hong (dhong) <dhong@xxxxxxxxxx> wrote:
>
> 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?

Normally you check for the dependencies in ./configure and only output
a symbol if the requirements for compiling a test program are all
satisfied. A common trend is to add a --disable-* flag to ensure your
engine is not built even if all its dependencies are available. You
can then check for the symbol in a variety of places in the code and
in the Makefile to decide what to build and when. When submitting a
new engine it is also important to submit documentation about the
engine to at least the HOWTO and include an example jobfile that
demonstrates how to use the IO engine. An example of a recently merged
IO engine can be found over on https://github.com/axboe/fio/pull/243 .
Other IO engines that aren't that old are engines/pmemblk.c and
engines/dev-dax.c ,

> 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?   My current work around is to check in ->iomem_alloc() each time and do initializion first if has not.

Perhaps you could do it in ->io_u_init() ?

-- 
Sitsofe | http://sucs.org/~sits/
--
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
��.n��������+%������w��{.n�������^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[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