All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: rwheeler@redhat.com, snitzer@redhat.com, jeff@garzik.org,
	neilb@suse.de, James.Bottomley@hansenpartnership.com,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 05/13] block: Export I/O topology for block devices and partitions
Date: Mon, 18 May 2009 19:57:41 +0200	[thread overview]
Message-ID: <20090518175741.GM4140@kernel.dk> (raw)
In-Reply-To: <1242362435-11953-6-git-send-email-martin.petersen@oracle.com>

On Fri, May 15 2009, Martin K. Petersen wrote:
> From: Martin K. Petersen <martin.petersen@oracle.com>
> 
> To support devices with physical block sizes bigger than 512 bytes we
> need to ensure proper alignment.  This patch adds support for exposing
> I/O topology characteristics as devices are stacked.
> 
>   logical_block_size is the smallest unit the device can address.
> 
>   physical_block_size indicates the smallest I/O the device can write
>   without incurring a read-modify-write penalty.
> 
>   The io_min parameter is the smallest preferred I/O size reported by
>   the device.  In many cases this is the same as the physical block
>   size.  However, the io_min parameter can be scaled up when stacking
>   (RAID5 chunk size > physical block size).
> 
>   The io_opt characteristic indicates the optimal I/O size reported by
>   the device.  This is usually the stripe width for arrays.
> 
>   The io_alignment parameter indicates the number of bytes the start of
>   the device/partition is offset from the device's natural alignment.
>   Partition tools and MD/DM utilities can use this to pad their offsets
>   so filesystem start on proper boundaries.
> 
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> ---
>  Documentation/ABI/testing/sysfs-block |   59 +++++++++++
>  block/blk-settings.c                  |  184 +++++++++++++++++++++++++++++++++
>  block/blk-sysfs.c                     |   33 ++++++
>  block/genhd.c                         |   10 ++
>  fs/partitions/check.c                 |   10 ++
>  include/linux/blkdev.h                |   47 +++++++++
>  include/linux/genhd.h                 |    1 +
>  7 files changed, 344 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
> index 44f52a4..93075cf 100644
> --- a/Documentation/ABI/testing/sysfs-block
> +++ b/Documentation/ABI/testing/sysfs-block
> @@ -60,3 +60,62 @@ Description:
>  		Indicates whether the block layer should automatically
>  		generate checksums for write requests bound for
>  		devices that support receiving integrity metadata.
> +
> +What:		/sys/block/<disk>/alignment
> +Date:		April 2009
> +Contact:	Martin K. Petersen <martin.petersen@oracle.com>
> +Description:
> +		Storage devices may report a physical block size that is
> +		bigger than the logical block size (for instance a drive
> +		with 4KB physical sectors exposing 512-byte logical
> +		blocks to the operating system).  This parameter
> +		indicates how many bytes the beginning of the device is
> +		offset from the disk's natural alignment.
> +
> +What:		/sys/block/<disk>/<partition>/alignment
> +Date:		April 2009
> +Contact:	Martin K. Petersen <martin.petersen@oracle.com>
> +Description:
> +		Storage devices may report a physical block size that is
> +		bigger than the logical block size (for instance a drive
> +		with 4KB physical sectors exposing 512-byte logical
> +		blocks to the operating system).  This parameter
> +		indicates how many bytes the beginning of the partition
> +		is offset from the disk's natural alignment.

I really hate the 'alignment' name, nobody will know wtf that is without
looking it up. The rest of the names are fairly self explanatory.
offset? offset_size? misalignment? Not very good with names, but perhaps
we can find something more appropriate :-)

The rest of the patch set looks ok to me, if we can just agree on a
silly name, then lets merge it for 2.6.31.

-- 
Jens Axboe


  reply	other threads:[~2009-05-18 17:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15  4:40 I/O Topology v3 Martin K. Petersen
2009-05-15  4:40 ` [PATCH 01/13] block: Do away with the notion of hardsect_size Martin K. Petersen
2009-05-15  4:40 ` [PATCH 02/13] block: Use accessor functions for queue limits Martin K. Petersen
2009-05-31 15:51   ` Bartlomiej Zolnierkiewicz
2009-06-01  5:08     ` Martin K. Petersen
2009-06-01  5:15       ` Jens Axboe
2009-06-01  5:28         ` Martin K. Petersen
2009-05-15  4:40 ` [PATCH 03/13] block: Move queue limits to an embedded struct Martin K. Petersen
2009-05-18 18:50   ` Mike Snitzer
2009-05-18 18:52     ` Mike Snitzer
2009-05-19 16:46     ` Martin K. Petersen
2009-05-15  4:40 ` [PATCH 04/13] block: Expose stacked device queues in sysfs Martin K. Petersen
2009-05-15  4:40 ` [PATCH 05/13] block: Export I/O topology for block devices and partitions Martin K. Petersen
2009-05-18 17:57   ` Jens Axboe [this message]
2009-05-18 18:12     ` Mike Snitzer
2009-05-19 16:41       ` Martin K. Petersen
2009-05-19 18:15         ` Jens Axboe
2009-05-20 21:19           ` Martin K. Petersen
2009-05-22  7:30             ` Jens Axboe
2009-05-22 13:34               ` Martin K. Petersen
2009-05-22 18:16                 ` Jens Axboe
2009-05-15  4:40 ` [PATCH 06/13] MD: Use new topology calls to indicate alignment and I/O sizes Martin K. Petersen
2009-05-15  4:40 ` [PATCH 07/13] block: Deprecate blk_queue_stack_limits Martin K. Petersen
2009-05-15  4:40 ` [PATCH 08/13] sd: Physical block size and alignment support Martin K. Petersen
2009-05-15  4:40 ` [PATCH 09/13] sd: Detect non-rotational devices Martin K. Petersen
2009-05-15  4:40 ` [PATCH 10/13] sd: Block limits VPD support Martin K. Petersen
2009-05-15  4:40 ` [PATCH 11/13] scsi_debug: Add support for physical block exponent and alignment Martin K. Petersen
2009-05-19 15:11   ` Douglas Gilbert
2009-05-15  4:40 ` [PATCH 12/13] libata: Report disk alignment and physical block size Martin K. Petersen
2009-05-15 18:17   ` Jeff Garzik
2009-05-15  4:40 ` [PATCH 13/13] libata: Media rotation rate and form factor heuristics Martin K. Petersen
2009-05-15 18:17   ` Jeff Garzik

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=20090518175741.GM4140@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neilb@suse.de \
    --cc=rwheeler@redhat.com \
    --cc=snitzer@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.