mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jiaying Zhang <jiayingz@google.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	hch@infradead.org, jens.axboe@oracle.com,
	linux-kernel@vger.kernel.org, mrubin@google.com
Subject: Re: [PATCH, RFC] addjust discard request to be aligned with hwsect  size to support SSDs with larger sector size
Date: Mon, 17 May 2010 16:00:49 -0400	[thread overview]
Message-ID: <yq1pr0uxpqm.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <AANLkTikjfv2DHshXhxwPpyvpCvvGLiK-IOcucXJX3jBQ@mail.gmail.com> (Jiaying Zhang's message of "Mon, 17 May 2010 12:44:24 -0700")

>>>>> "Jiaying" == Jiaying Zhang <jiayingz@google.com> writes:

Jiaying> It is true that all of the block layer works on 512-byte sector
Jiaying> size, but I think it is good to check for address alignment for
Jiaying> discard request so we don't insert unnecessary discard requests
Jiaying> into the request queue.

Well, then what happens when you stripe or use DM on devices with
different discard granularity?  Or what about a mirror?  Or multiple
levels of stacking of heterogeneous devices.

There are good reasons why we postpone the logical block scaling until
we're preparing the request for the actual physical device.


Jiaying> There are also certain disk drivers that assume a discard
Jiaying> request passed from the block layer is already properly
Jiaying> aligned. We could argue that those disk drivers need to fix
Jiaying> that

Which is what I'm arguing :)


Jiaying> 512 bytes and 4KB seem to be the most common sizes but I
Jiaying> wouldn't be surprised to see other logical block size.

That's the reason I'm asking.  If you have a different lbs then let's by
all means add support for it.  Or make the ULD scaling generic.

I'm open to aligning to the reported discard granularity in the ULD, for
instance.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2010-05-17 20:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13  5:19 Jiaying Zhang
2010-05-16 13:38 ` Christoph Hellwig
2010-05-17 19:27   ` Jiaying Zhang
2010-05-17 18:57 ` Martin K. Petersen
2010-05-17 19:44   ` Jiaying Zhang
2010-05-17 20:00     ` Martin K. Petersen [this message]
2010-05-18  0:57       ` Jiaying Zhang

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=yq1pr0uxpqm.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=hch@infradead.org \
    --cc=jens.axboe@oracle.com \
    --cc=jiayingz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.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

all inboxes | Powered by JetHome®