On 10/04/2016 15:35, Tomoaki AOKI wrote: > On Sun, 10 Apr 2016 06:59:04 -0600 > Alan Somers <asomers_at_freebsd.org> wrote: > >> On Sun, Apr 10, 2016 at 12:56 AM, Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp> >> wrote: >> >>> Hi. Maybe freebsd-hardware list would be the right place, but it's not >>> so active. :-( >>> >>> Is 4K quirks needed for every HDDs/SSDs having physical sector size >>> 4096? >>> >>> If so, I would be able to provide patch for Crucial M550 and MX200. >>> (Possibly covers other models [BX200 etc.] by abstraction.) >>> >>> M550(1TB): device model Crucial CT1024M550SSD1 >>> firmware revision MU01 >>> MX200(1TB): device model Crucial CT1024MX200SSD1 >>> firmware revision MU03 >>> -> Abstracted with "Crucial CT*SSD*" or "Crucial CT*", as the part >>> "1024" should vary with its capacity and can be 3 to 4 digits >>> for now. I tried the former and confirmed "quirks=0x1<4K>" >>> appears, which doesn't appear without adding the entry. >>> >>> >>> If not, is it sufficient if `camcontrol identify <device>` states >>> "physical 4096" on "sector size" line for everything in kernel and >>> related components (i.e., zfs-related ones)? >>> >>> >>> Regards. >> >> You only need quirk entries if the device fails to identify its physical >> size correctly. If "camcontrol identify" states "physical 4096", then >> you're probably ok, but it's not the best place to ask. "camcontrol >> identify" asks the device directly, whereas "diskinfo -v" asks the kernel. >> If "diskinfo -v" says "4096 stripesize" then you're definitely ok. >> >> -Alan > Thanks for clarification. > > Tried "diskinfo -v" as you noted (of course running the kernel without > adding quirks entry) and confirmed it saying "4096 # stripesize". > So it's already OK with current ata_da.c and scsi_da.c (no quirks is > needed). > > OTOH, trying with Samsung 850 evo (the last one I have for now, > having quirks entry in current source), "diskinfo -v" says "4096 > # stripesize" while "camcontrol identify" says "physical 512". > This should be why quirks entries are needed (and implemented) for it. Correct, manufactures took the cop out route and return 512 for both logical and physical sizes to avoid issues with bad OS support. SSD's a particularly lazy in this regard. > I think stripesize should be primarily for RAID configuration, but > after 4k physical sectored drives (so called AFT drives) appears, > applied to even for single drive configuration, too. Right? stripesize simply gives a hit as to performance when accessing the device. > If so, as writing blocks smaller than stripesize (except for the last > block of a file) is nonsense for RAID configuration, all write access > to HDDs/SSDs are constrained to use stripesize for minimum block size, > right? Nope, sectorsize constrains that. stripesize is only used as a way to help tune filesystem access patterns e.g. in ZFS it is used to help determine the ashift value which in turn determines the minimum allocatable block size. This helps optimise performance while sacrificing storage space i.e. causing wastage. Regards SteveReceived on Sun Apr 10 2016 - 13:15:57 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:04 UTC