linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: stan@hardwarefreak.com, joystick <joystick@shiftmail.org>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: The chunk size paradox
Date: Thu, 02 Jan 2014 14:10:38 -0500	[thread overview]
Message-ID: <52C5B9AE.6050901@ubuntu.com> (raw)
In-Reply-To: <52C5A9AA.9090300@hardwarefreak.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/2/2014 1:02 PM, Stan Hoeppner wrote:
> There are no native 4K sector drives on the market.  Linux does
> not support a native 4K sector size, only 512 bytes, unless this
> has changed in recent kernels and I'm simply not aware of it yet.

Linux has supported 4k sectors for several years.  You can test it
with the scsi_debug module and it's sector_size argument.  The parted
test suite has been doing this for a few years to test that parted
correctly handles 1k, 2k, and 4k sector sizes.  You can also set up
qemu to emulate such a drive.

While most consumer level sata drives that use 4k hardware sectors
have 512 byte logical sector emulation, there are at least a few
drives out there that do not, and are pure 4k sector drives.

>> CD-ROM type drives have always used 2k sectors.  Also
> 
> This is not relevant to this discussion.

Sure it is; it's a non 512 byte sector that linux has handled for many
years and so disproves your assertion that a sector is always 512 bytes.

> Yes, they are necessarily 4K in Linux.  Linux only supports page
> sized BIO for consistency across the memory manager and IO
> subsystems.  Most architectures which Linux currently supports have
> hardware page sizes greater than 4K, for instance IA64 supports
> 4k/8k/16k, even a 4GB page size.  But it was decided long ago to
> stick with 4K for a number of reasons, one of these is stated
> above.  For background on this Google is your friend.

Wrong, wrong wrong.  Linux always has supported ext[234] filesystems
using 1k, 2k, or 4k filesystem block sizes.  Now basically nobody has
used the smaller sizes for quite a few years ( they were originally
useful on 1-100 MB disks ), but it is still supported.  It can use
larger sizes than that, if your platform has > 4k page size.  The page
cache limits the block size to the page size.  I believe it was the
drobo box that uses a larger block size and people often run into the
page cache problem when they try to pull the drive from the drobo and
mount it in their pc, which can't handle > 4k blocks, but the drobo's
cpu uses 32k pages so it could use 32k blocks just fine.  Several cpu
archs give you the option to choose between different page sizes when
building the kernel, so yes, you can choose to use the larger sizes
rather than the default 4k.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSxbmuAAoJEI5FoCIzSKrweyQIAIIJy4WfLpBkKzsallhvbgcn
i3nAkIpZSg1PYqLovYA+4bPjcjt1kDkikW3whl4PVBSE2rzGe9pS6fOtKbldQkZq
4vPVGRPIAP71iyJnA0TXM6NJpzoAVt+GBrY1N0aKFXFcPB5+wphDNWBNDWh8uYNG
mcH3HlQdbZB66yalsaik+w8pU/AItrLniTFvC3dybCVSqMdmghTKzqMjFU0sPmWK
zH9MtsLaTaRrQiYipYe+NbXsf5w8OgAaY1wxruMqW3BnI1cVFscSBXkS64hwYGBz
b5119Z3RgOWc+/BbdpLhNTP1y+qQmme/BVP84se8VRn25Zq/Qg0Jwau9xq4OlWg=
=yt5q
-----END PGP SIGNATURE-----

  reply	other threads:[~2014-01-02 19:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 18:48 The chunk size paradox Phillip Susi
2013-12-30 23:38 ` Peter Grandi
2013-12-31  0:01   ` Wolfgang Denk
2013-12-31 13:51     ` David Brown
2014-01-02 20:08   ` Phillip Susi
2014-01-02 14:49 ` joystick
2014-01-02 15:24   ` Phillip Susi
2014-01-02 15:41   ` Stan Hoeppner
2014-01-02 16:31     ` Phillip Susi
2014-01-02 18:02       ` Stan Hoeppner
2014-01-02 19:10         ` Phillip Susi [this message]
2014-01-02 22:49           ` Peter Grandi
2014-01-02 23:16           ` Stan Hoeppner
2014-01-03  1:02             ` Phillip Susi
2014-01-02 19:21         ` Joe Landman
2014-01-02 22:42           ` Stan Hoeppner
2014-01-02 22:56             ` Carsten Aulbert
2014-01-03  0:19               ` Phillip Susi
2014-01-03  1:24               ` Stan Hoeppner
2014-01-03  3:14               ` Joe Landman
2014-01-03  3:19                 ` Stan Hoeppner
2014-01-03  4:24                   ` Stan Hoeppner
2014-01-02 23:22           ` Peter Grandi
2014-01-03  3:09             ` Joe Landman
2014-01-03  4:58             ` Joe Landman
2014-01-02 22:32         ` Wolfgang Denk
2014-01-03 14:51           ` Benjamin ESTRABAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C5B9AE.6050901@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=joystick@shiftmail.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=stan@hardwarefreak.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).