All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: test sfdisk, optimal_iosize
Date: Fri, 29 Jan 2016 14:02:14 +0100	[thread overview]
Message-ID: <201601291402.14306.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20160129113110.o76pvon3wormblgd@ws.net.home>

On Friday 29 January 2016, Karel Zak wrote:
> On Fri, Jan 29, 2016 at 11:31:28AM +0100, Ruediger Meier wrote:
> > Hi,
> >
> > I've got some test failures like
> >
> > ---
> > /home/abuild/rpmbuild/BUILD/util-linux-2.27.git247.4c01c/tests/expe
> >cted/sfdisk/dos-activate +++
> > /home/abuild/rpmbuild/BUILD/util-linux-2.27.git247.4c01c/tests/outp
> >ut/sfdisk/dos-activate @@ -6,7 +6,7 @@
> >  Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
> >  Units: sectors of 1 * 512 = 512 bytes
> >  Sector size (logical/physical): 512 bytes / 4096 bytes
> > -I/O size (minimum/optimal): 4096 bytes / 32768 bytes
> > +I/O size (minimum/optimal): 4096 bytes / 64 bytes
>
> Very very strange. It seems like the number is in sectors (64 * 512 =
> 32768) rather than in bytes.
>
> >  Disklabel type: dos
> >  Disk identifier: <removed>
> >
> >
> > optimal < minimum ... is this a bug?
> >
> > Where does this optimal iosize come from, scsi_debug module?
> > Is there a commandline tool to get this iosize, maybe blkid?
>
>  cat /sys/block/sda/queue/{optimal,minimum}_io_size
>  cat /sys/block/sda/queue/{physical,logical}_block_size
>
> The optimal IO size is often 0 (in /sys) in this case libfdisk
> fallback to minimal IO size.
>
> Try
>     LIBFDISK_DEBUG=all fdisk -l /dev/sda

Thx.

I get this on the "broken systems":

## sector_size=512
$ modprobe -r scsi_debug
$ modprobe scsi_debug dev_size_mb=100 sector_size=512
$ devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}')
$ cat /sys/block/$devname/queue/{logical_block_size,physical_block_size,minimum_io_size,optimal_io_size}
512
512
512
64

## sector_size=4096
$ modprobe -r scsi_debug
$ modprobe scsi_debug dev_size_mb=100 sector_size=4096
$ devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') 
$ cat /sys/block/$devname/queue/{logical_block_size,physical_block_size,minimum_io_size,optimal_io_size}
4096
4096
4096
512

These odd optimal iosizes only happen for "scsi_debug" devices (not the loop
nor md devices used in our test suite).

Reproduced on kernel 4.1.15 and 4.4.0.
Was correct on kernel 3.16.7 (and maybe even 4.1.13).

Maybe it's not only about the kernel version but also something about
other host specific settings.

Could somebody please reproduce this on kernel 4.4.0?

cu,
Rudi

  parent reply	other threads:[~2016-01-29 13:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 10:31 test sfdisk, optimal_iosize Ruediger Meier
2016-01-29 11:31 ` Karel Zak
2016-01-29 11:52   ` Karel Zak
2016-01-29 13:02   ` Ruediger Meier [this message]
2016-01-29 16:18     ` scsi_debug, iosize optimal < minimum (was: test sfdisk, optimal_iosize) Ruediger Meier
2016-01-29 16:18       ` Ruediger Meier
2016-02-01 12:13       ` scsi_debug, iosize optimal < minimum Martin K. Petersen
2016-02-03 21:55         ` Ruediger Meier
2016-02-03 21:55           ` Ruediger Meier
2016-02-03 22:02           ` Martin K. Petersen
2016-02-03 22:02             ` Martin K. Petersen
2016-02-04 10:47             ` Ruediger Meier

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=201601291402.14306.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /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.