Re: fio patch question on filesetup: align layout buffer

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

 



2017-08-31 1:27 GMT+03:00 Jeff Furlong <jeff.furlong@xxxxxxx>:
> Hi All,
> I see the patch at http://git.kernel.dk/cgit/fio/commit/?id=8c43ba6259409244de64f0b1d388a029e38cf3e5 and just wondered if it is still compatible with:
>
> .. option:: iomem_align=int, mem_align=int
>
>         This indicates the memory alignment of the I/O memory buffers.  Note that
>         the given alignment is applied to the first I/O unit buffer, if using
>         :option:`iodepth` the alignment of the following buffers are given by the
>         :option:`bs` used. In other words, if using a :option:`bs` that is a
>         multiple of the page sized in the system, all buffers will be aligned to
>         this value. If using a :option:`bs` that is not page aligned, the alignment
>         of subsequent I/O memory buffers is the sum of the :option:`iomem_align` and
>         :option:`bs` used.
>
> For example, if we set mem_align to something larger than page_size or bs, what does fio_memalign use?  And if we set mem_align to something between page_size and bs, what does fio_memalign use?  Thanks.

mem_align wasn't used in the layout thing, and never needed.
fio_memalign() is an alternative for posix_memalign() rather than
something to do with that option. fio_memalign() takes an alignment by
argument, and the argument for this was page_size. page_size works for
direct i/o, as it meets sector size alignment (at least for 512, 2K,
4K on all supported archs), which is what Linux and many others
require.

Btw, I'm not completely sure why fio_memalign() allocates doubled
`size'. Some of the aligned malloc implementations I've seen did take
of size*2 or alignment*2, but those didn't explicitly take the footer
(or header) size, whereas in fio it explicitly has sizeof(*f) after
the data size and max possible space for alignment. Since f->offset is
always smaller than the alignment size, it seems to me size*1 is
enough, but I might be missing something.


>
> Regards,
> Jeff
>
> --
> 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