Re: [PATCH] O_DIRECT with hardware blocksize alignment

Andrea Arcangeli (andrea@suse.de)
Sat, 12 Jan 2002 13:31:22 +0100


On Wed, Jan 09, 2002 at 07:56:07PM +0000, Joel Becker wrote:
> Folks,
> Some major users of O_DIRECT (Oracle, for instance) align and
> size I/O based on the 512byte hardware blocksize common to most hard
> disk drives. The current O_DIRECT code enforces that the alignment and
> size of the I/O match the software blocksize (inot->i_sb->s_blocksize).
> This patch relaxes that restriction to a minimum of the hardware
> blocksize. In the interest of efficiency,
> min(I/O alignment, s_blocksize) is used as the effective
> blocksize. eg:
>
> I/O alignment s_blocksize final blocksize
> 8192 4096 4096
> 4096 4096 4096
> 512 4096 512

this falls in the same risky category of the vary-I/O patch from Badari
(check the discussion on l-k) for rawio, so to make it safe it also will
need to check for the same new per-blkdev bitflag before you can trigger
the scaling (if the bitflag says 'no', it will have to enforce
softblocksize b_size etc). (and then you will get the same optimization
in brw_kiovec as well as rawio, also while not doing softblocksize
aligned I/O, but still large I/O) So I suggest you to check Badari's
stuff and the thread on l-k and to make a new patch incremental with his
code (note: I still had some problem with his latest patch but it's not
far from a final version)

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/