[SeaBIOS] [PATCH] fix two issues with virtio-blk

Sebastian Herbszt herbszt at gmx.de
Sun May 16 18:14:57 CEST 2010


Gleb Natapov wrote:
> On Sun, May 16, 2010 at 03:34:23PM +0200, Sebastian Herbszt wrote:
>> Gleb Natapov wrote:
>> >On Sat, May 15, 2010 at 10:08:54PM +0200, Sebastian Herbszt wrote:
>> >>Why is a 4 KB physical sector size needed in a VM anyway?
>> >>
>> >Performance of course. Qemu today can advertise physical block size and
>> >logical block size greater then 512 with virtio. The problem is that if
>> >logical block size != 512 boot fails.
>> >
>> >--
>> >Gleb.
>> 
>> Which OS currently has native support for 4 KB sectors and how big is the
>> performance gain?
> I believe at least Linux has it. Windows 7 aligns partition to 4K, so
> it either has it too, or ready to gain it any moment.

According to KB 923332 [1] Vista started to align partitions:

"In earlier versions of Windows, the default starting offset for the first partition on a
hard disk drive was sector 0x3F. Because this starting offset was an odd number, it
could cause performance issues on large-sector drives because of misalignment between
the partition and the physical sectors. In Windows Vista, the default starting offset will
generally be sector 0x800."

Sector 0x800 with 512 byte logical sectors is 1 MB. With 4 KB logical sectors it would
be 8 MB.

>>                   The performance without native support (emulation in 
>> BIOS) could be worse due to the additional overhead. How much performance
>> is lost if the 512 byte logical sector size emulation is done in virtio (for reads
>> it could behave like a read ahead buffer) ?
> Low performance of BIOS emulation is not a concern. BIOS is used only by
> boot loaders. OSes access disk without BIOS help.
> 
> --
> Gleb.

Legacy OS or OS installers tend to use BIOS disk access too.

[1] http://support.microsoft.com/kb/923332/EN-US/

Sebastian




More information about the SeaBIOS mailing list