Port-i386 archive

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

Re: using GPT support in BIOS boot



On Sun, 9 Jan 2011 10:56:49 -0500 Steven Bellovin wrote:
> 
> On Jan 9, 2011, at 10:20 11AM, Joerg Sonnenberger wrote:
> 
> > On Sun, Jan 09, 2011 at 10:09:18AM -0500, Greg Troxel wrote:
> >> I understand why 4KB alignment makes sense (larger physical disk blocks
> >> on disks that present 512 byte sectors), and 128KB/256KB/1MB seem
> >> broadly sensible, but I would appreciate understanding what bad thing
> >> would happen with starting the first GPT partition at:
> >> 
> >>   34 sectors/17KB  (messes up 4KB alignment, splitting reads/writes)
> >>   36 sectors/18KB  (ditto)
> >>   40 sectors/20KB  ?
> >>   64 sectors/32KB  ?
> >>  128 sectors/64KB  ?
> > 
> > The central idea is that the underlaying device may have a write unit
> > that is larger than one sector or 4KB. Both for RAID 5 and SSD this is
> > often the case. It will work, but it can easily trash performance.
> > 
> Is there any way to query the device to learn what size the write unit is?

Yes, it should be possible with INT 13h AH=48h. It's pretty hard to
integrate it into 512 bytes of MBR though, but should be possible to
include into libsa and use on later stages. Also, for gpt.S it's
possible to use SECTOR_SIZE during compile stage to adjust addressing.

--
Mishka.


Home | Main Index | Thread Index | Old Index