Re: What's the state of AF-4Kn support?

2013-10-11 Thread Ravi Pokala

Yes, the BIOS calls have always only used 512 byte sectors. There would
have to be an updated spec for those, and it would be a bit of a PITA to
use. I suspect the "right" answer for this on x86 is UEFI.

Yeah, that's the conclusion I reached as well. Though it occurs to me, aren't 
we already part-way there w/ our IA64 support? EFI originated w/ Itanium and 
was required to boot those systems, so shouldn't we be able to leverage much of 
that work for (U)EFI on amd64?

In any case, the primary motivator (at least, for me) is being able to boot 
from AF-4Kn drives; based on the most recent roadmaps I've seen, the enterprise 
HDD vendors are committing to support AF-512e for a good while longer, so it's 
not as urgent as I thought it was when I opened this thread a few weeks ago.

Thanks,

--rp

On Oct 10, 2013, at 01:57 PM, John Baldwin  wrote:

On Monday, September 23, 2013 10:58:19 am Ravi Pokala wrote:
-Original Message-
From: Jia-Shiun Li 
Date: Sunday, September 22, 2013 11:22 PM
To: Ravi Pokala 
Cc: "freebsd-hardw...@freebsd.org" ,

Subject: Re: What's the state of AF-4Kn support?

On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala  wrote:


...


CC -hackers.

Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
not aware of any.

Good question. I had the impression that some currently shipping drives
were AF-4Kn, but spot-checking some of the drives listed in
src/cam/ata/ata_da.c::ada_quirk_table[]
against their datasheets, suggests that they're AF-512e. So, their being
flagged w/ ADA_Q_4K is "just" a performance optimization.

BTW I believe UFS and ZFS have proper design for 4K-sectors, but FreeBSD
needs some ecosystem connections to get samples early to test,
incorporate supports and validate for it. Or we will need to wait until
it appears on market and someone got caught into some kind of bugs.

Yeah, based on my reading of the code, it looks like the ATACAM layer and
higher (GEOM, filesystems) take the physical block size into account. That
just leaves the bootstrap code. Now that I've taken a second look, it
seems as though at least 'pmbr' only works in terms of 512 bytes. :-(

Yes, the BIOS calls have always only used 512 byte sectors. There would
have to be an updated spec for those, and it would be a bit of a PITA to
use. I suspect the "right" answer for this on x86 is UEFI.

--
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What's the state of AF-4Kn support?

2013-10-10 Thread John Baldwin
On Monday, September 23, 2013 10:58:19 am Ravi Pokala wrote:
> -Original Message-
> From: Jia-Shiun Li 
> Date: Sunday, September 22, 2013 11:22 PM
> To: Ravi Pokala 
> Cc: "freebsd-hardw...@freebsd.org" ,
> 
> Subject: Re: What's the state of AF-4Kn support?
> 
> >On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala  wrote:
> >>
> >>...
> >
> >CC -hackers.
> >
> >Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
> >not aware of any.
> 
> Good question. I had the impression that some currently shipping drives
> were AF-4Kn, but spot-checking some of the drives listed in
> 
> src/cam/ata/ata_da.c::ada_quirk_table[]
> 
> against their datasheets, suggests that they're AF-512e. So, their being
> flagged w/ ADA_Q_4K is "just" a performance optimization.
> 
> >BTW I believe UFS and ZFS have proper design for 4K-sectors, but FreeBSD
> >needs some ecosystem connections to get samples early to test,
> >incorporate supports and validate for it. Or we will need to wait until
> >it appears on market and someone got caught into some kind of bugs.
> 
> Yeah, based on my reading of the code, it looks like the ATACAM layer and
> higher (GEOM, filesystems) take the physical block size into account. That
> just leaves the bootstrap code. Now that I've taken a second look, it
> seems as though at least 'pmbr' only works in terms of 512 bytes. :-(

Yes, the BIOS calls have always only used 512 byte sectors.  There would
have to be an updated spec for those, and it would be a bit of a PITA to
use.  I suspect the "right" answer for this on x86 is UEFI.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What's the state of AF-4Kn support?

2013-09-23 Thread Dan Nelson
In the last episode (Sep 23), Jia-Shiun Li said:
> On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala  wrote:
> > What I'm asking about is AF-4kn - 4KB *logical* as well as physical
> > sectors. All the enterprise HDD vendors have told us is that AF-4Kn drives
> > expect data IO to be 4KB, and will reject smaller transfers. (*metadata*
> > IO - SMART, IDENTIFY_DEVICE, READ_LOG/WRITE_LOG, etc - will remain 512B.)
> >
> > Doing some more digging, I found this post from ivoras which I missed the
> > first time around [
> > http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-drives.html ];
> > that tends to support my initial assessment - filesystem stuff should Just
> > Work[tm] - plus adds the detail that direct drive I/O (the example he
> > gives is trying to `dd' 10 bytes) will be rejected because it is smaller
> > than the raw-device access granularity. I've also looked at 'ata_da.c' and
> > see that adaregister() looks at both quirks and IDENTIFY_DEVICE data to
> > determine the logical block size.
> >
> > So, that leaves the bootstrap code as the remaining question-mark. Does
> > anyone what AF-4Kn support looks like there?
> >
> 
> CC -hackers.
> 
> Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
> not aware of any.

I don't think there are any yet, but some SATA->USB drive enclosures will
present a 4Kn drive to the host if the physical drive is 512e.  The Seagate
Backup Plus does this at least.  It lets you continue to use MBR-based
partitioning and still access all of a 4TB disk.  Unfortunately, since both
GPT and MBR work off of block offsets, partitions created in one mode won't
work in the other, so you can't just swap a disk in and out of the enclosure
without (carefully) repartitioning.
 
-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What's the state of AF-4Kn support?

2013-09-23 Thread Ravi Pokala
-Original Message-
From: 
Reply-To: 
Date: Monday, September 23, 2013 1:13 AM
To: 'Jia-Shiun Li' , Ravi Pokala 
Cc: , 
Subject: RE: What's the state of AF-4Kn support?

># install
>gpart create -s GPT ada1
>gpart show
>gpart add -i 1 -t freebsd-boot -b 40 -s 512 ada1
>gpart add -i 2 -t freebsd-ufs -b 552 -s . ada1
>gpart bootcode -b /boot/pmbr ada1
>gpart bootcode -p /boot/gptboot -i 1 ada1
>
># for data
>gpart create -s GPT ada1
>gpart show
>gpart add -i 1 -t freebsd-ufs -b 40 -s . ada1

Thanks Rozhuk,

As it happens, I know how to create a GPT table and make sure the
partitions are aligned. That's certainly a necessary step for getting good
performance on AF-512e drives, but it doesn't have much to do with booting
from an AF-4Kn drive. (Actually, since GPT is defined in terms of physical
sectors, we can actually *stop* playing silly alignment games with AF-4Kn,
since it is inherently aligned.)

--rp

>> -Original Message-
>> From: owner-freebsd-hack...@freebsd.org [mailto:owner-freebsd-
>> hack...@freebsd.org] On Behalf Of Jia-Shiun Li
>> Sent: Monday, September 23, 2013 10:23 AM
>> To: Ravi Pokala
>> Cc: freebsd-hackers@freebsd.org; freebsd-hardw...@freebsd.org
>> Subject: Re: What's the state of AF-4Kn support?
>> 
>> On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala 
>> wrote:
>> >
>> > What you describe is the 'AF-512e' format - 4KB physical sectors
>> > *emulating* 512B logical sectors. See [
>> > https://en.wikipedia.org/wiki/Advanced_Format#Advanced_Format_512e ;
>> > http://www.idema.org/?page_id=2153 ]. With AF-512e, yes, the HDD
>> > firmware does the read/modify/write for I/Os smaller than the
>> physical sector size.
>> > It is intended to be a low-cost/transitional format, allowing the HDD
>> > vendors to get the advantages of 4KB physical sectors (better error
>> > detection/correction algorithms, better areal density => lower cost)
>> > w/o breaking compatibility with decades of firmware and software that
>> > expect 512B logical sectors.
>> >
>> > What I'm asking about is AF-4kn - 4KB *logical* as well as physical
>> > sectors. All the enterprise HDD vendors have told us is that AF-4Kn
>> > drives expect data IO to be 4KB, and will reject smaller transfers.
>> > (*metadata* IO - SMART, IDENTIFY_DEVICE, READ_LOG/WRITE_LOG, etc -
>> > will remain 512B.)
>> >
>> > Doing some more digging, I found this post from ivoras which I missed
>> > the first time around [
>> > http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-
>> drives.htm
>> > l ]; that tends to support my initial assessment - filesystem stuff
>> > should Just Work[tm] - plus adds the detail that direct drive I/O
>> (the
>> > example he gives is trying to `dd' 10 bytes) will be rejected because
>> > it is smaller than the raw-device access granularity. I've also
>> looked
>> > at 'ata_da.c' and see that adaregister() looks at both quirks and
>> > IDENTIFY_DEVICE data to determine the logical block size.
>> >
>> > So, that leaves the bootstrap code as the remaining question-mark.
>> > Does anyone what AF-4Kn support looks like there?
>> >
>> 
>> CC -hackers.
>> 
>> Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
>> not aware of any.
>> 
>> BTW I believe UFS and ZFS have proper design for 4K-sectors, but
>> FreeBSD needs some ecosystem connections to get samples early to test,
>> incorporate supports and validate for it. Or we will need to wait until
>> it appears on market and someone got caught into some kind of bugs.
>> 
>> Regards,
>> Jia-Shiun.
>> ___
>> freebsd-hackers@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to "freebsd-hackers-
>> unsubscr...@freebsd.org"
>


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What's the state of AF-4Kn support?

2013-09-23 Thread Ravi Pokala
-Original Message-
From: Jia-Shiun Li 
Date: Sunday, September 22, 2013 11:22 PM
To: Ravi Pokala 
Cc: "freebsd-hardw...@freebsd.org" ,

Subject: Re: What's the state of AF-4Kn support?

>On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala  wrote:
>>
>>...
>
>CC -hackers.
>
>Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
>not aware of any.

Good question. I had the impression that some currently shipping drives
were AF-4Kn, but spot-checking some of the drives listed in

src/cam/ata/ata_da.c::ada_quirk_table[]

against their datasheets, suggests that they're AF-512e. So, their being
flagged w/ ADA_Q_4K is "just" a performance optimization.

>BTW I believe UFS and ZFS have proper design for 4K-sectors, but FreeBSD
>needs some ecosystem connections to get samples early to test,
>incorporate supports and validate for it. Or we will need to wait until
>it appears on market and someone got caught into some kind of bugs.

Yeah, based on my reading of the code, it looks like the ATACAM layer and
higher (GEOM, filesystems) take the physical block size into account. That
just leaves the bootstrap code. Now that I've taken a second look, it
seems as though at least 'pmbr' only works in terms of 512 bytes. :-(

WRT to getting samples, it may be possible to share some w/ appropriate
members of the community; who would those people be?

>Regards,
>Jia-Shiun.

Thanks,

rp


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


RE: What's the state of AF-4Kn support?

2013-09-23 Thread rozhuk . im
# install
gpart create -s GPT ada1
gpart show
gpart add -i 1 -t freebsd-boot -b 40 -s 512 ada1
gpart add -i 2 -t freebsd-ufs -b 552 -s . ada1
gpart bootcode -b /boot/pmbr ada1
gpart bootcode -p /boot/gptboot -i 1 ada1


# for data
gpart create -s GPT ada1
gpart show
gpart add -i 1 -t freebsd-ufs -b 40 -s . ada1


> -Original Message-
> From: owner-freebsd-hack...@freebsd.org [mailto:owner-freebsd-
> hack...@freebsd.org] On Behalf Of Jia-Shiun Li
> Sent: Monday, September 23, 2013 10:23 AM
> To: Ravi Pokala
> Cc: freebsd-hackers@freebsd.org; freebsd-hardw...@freebsd.org
> Subject: Re: What's the state of AF-4Kn support?
> 
> On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala 
> wrote:
> >
> > What you describe is the 'AF-512e' format - 4KB physical sectors
> > *emulating* 512B logical sectors. See [
> > https://en.wikipedia.org/wiki/Advanced_Format#Advanced_Format_512e ;
> > http://www.idema.org/?page_id=2153 ]. With AF-512e, yes, the HDD
> > firmware does the read/modify/write for I/Os smaller than the
> physical sector size.
> > It is intended to be a low-cost/transitional format, allowing the HDD
> > vendors to get the advantages of 4KB physical sectors (better error
> > detection/correction algorithms, better areal density => lower cost)
> > w/o breaking compatibility with decades of firmware and software that
> > expect 512B logical sectors.
> >
> > What I'm asking about is AF-4kn - 4KB *logical* as well as physical
> > sectors. All the enterprise HDD vendors have told us is that AF-4Kn
> > drives expect data IO to be 4KB, and will reject smaller transfers.
> > (*metadata* IO - SMART, IDENTIFY_DEVICE, READ_LOG/WRITE_LOG, etc -
> > will remain 512B.)
> >
> > Doing some more digging, I found this post from ivoras which I missed
> > the first time around [
> > http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-
> drives.htm
> > l ]; that tends to support my initial assessment - filesystem stuff
> > should Just Work[tm] - plus adds the detail that direct drive I/O
> (the
> > example he gives is trying to `dd' 10 bytes) will be rejected because
> > it is smaller than the raw-device access granularity. I've also
> looked
> > at 'ata_da.c' and see that adaregister() looks at both quirks and
> > IDENTIFY_DEVICE data to determine the logical block size.
> >
> > So, that leaves the bootstrap code as the remaining question-mark.
> > Does anyone what AF-4Kn support looks like there?
> >
> 
> CC -hackers.
> 
> Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
> not aware of any.
> 
> BTW I believe UFS and ZFS have proper design for 4K-sectors, but
> FreeBSD needs some ecosystem connections to get samples early to test,
> incorporate supports and validate for it. Or we will need to wait until
> it appears on market and someone got caught into some kind of bugs.
> 
> Regards,
> Jia-Shiun.
> ___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-
> unsubscr...@freebsd.org"

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What's the state of AF-4Kn support?

2013-09-22 Thread Jia-Shiun Li
On Wed, Sep 18, 2013 at 10:49 PM, Ravi Pokala  wrote:
>
> What you describe is the 'AF-512e' format - 4KB physical sectors
> *emulating* 512B logical sectors. See [
> https://en.wikipedia.org/wiki/Advanced_Format#Advanced_Format_512e ;
> http://www.idema.org/?page_id=2153 ]. With AF-512e, yes, the HDD firmware
> does the read/modify/write for I/Os smaller than the physical sector size.
> It is intended to be a low-cost/transitional format, allowing the HDD
> vendors to get the advantages of 4KB physical sectors (better error
> detection/correction algorithms, better areal density => lower cost) w/o
> breaking compatibility with decades of firmware and software that expect
> 512B logical sectors.
>
> What I'm asking about is AF-4kn - 4KB *logical* as well as physical
> sectors. All the enterprise HDD vendors have told us is that AF-4Kn drives
> expect data IO to be 4KB, and will reject smaller transfers. (*metadata*
> IO - SMART, IDENTIFY_DEVICE, READ_LOG/WRITE_LOG, etc - will remain 512B.)
>
> Doing some more digging, I found this post from ivoras which I missed the
> first time around [
> http://ivoras.net/blog/tree/2011-01-01.freebsd-on-4k-sector-drives.html ];
> that tends to support my initial assessment - filesystem stuff should Just
> Work[tm] - plus adds the detail that direct drive I/O (the example he
> gives is trying to `dd' 10 bytes) will be rejected because it is smaller
> than the raw-device access granularity. I've also looked at 'ata_da.c' and
> see that adaregister() looks at both quirks and IDENTIFY_DEVICE data to
> determine the logical block size.
>
> So, that leaves the bootstrap code as the remaining question-mark. Does
> anyone what AF-4Kn support looks like there?
>

CC -hackers.

Thanks for the clarification. Is there any 4Kn HDDs shopping now? I am
not aware of any.

BTW I believe UFS and ZFS have proper design for 4K-sectors, but
FreeBSD needs some ecosystem connections to get samples early to test,
incorporate supports and validate for it. Or we will need to wait
until it appears on market and someone got caught into some kind of
bugs.

Regards,
Jia-Shiun.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"