mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Frank Mayhar <fmayhar@google.com>, Jens Axboe <axboe@kernel.dk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH] block:  Force sector and nr_sects to device alignment and granularity.
Date: Wed, 12 Mar 2014 21:47:59 -0400	[thread overview]
Message-ID: <yq1d2hq27jk.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <x491ty71dox.fsf@segfault.boston.devel.redhat.com> (Jeff Moyer's message of "Wed, 12 Mar 2014 14:20:30 -0400")

>>>>> "Jeff" == Jeff Moyer <jmoyer@redhat.com> writes:

>> The case that we were seeing was with an SSD that required TRIM on 8k
>> boundaries and with an 8k granularity.  Since the file system was
>> trying to do discards based on 4k alignment the driver complained
>> mightily.

Jeff> but you managed to read my mind well enough.  The question is how
Jeff> high up the stack do you put the logic for this?  Is it worth it
Jeff> to duplicate the checks in the OS that are already done on the
Jeff> device?  I don't know.  Martin, do you have an opinion on this?

I'm no big fan of dropping information.

My original intent with the discard granularity and alignment was to
allow filesystems to use them to influence block allocation and layout.
Not to affect how we issue commands at runtime.

Since a storage device is free to ignore all or parts of any discard
request I'd consider it somewhat broken if it actually complained.
Especially so since the relevant knobs in the standard that we key off
of are performance recommendations and not requirements that commands
must adhere to.

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2014-03-13  1:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 18:01 Frank Mayhar
2014-03-11 15:15 ` Jeff Moyer
2014-03-11 16:02   ` Frank Mayhar
2014-03-12 18:20     ` Jeff Moyer
2014-03-12 18:39       ` Frank Mayhar
2014-03-12 19:33         ` Jeff Moyer
2014-03-12 19:51           ` Frank Mayhar
2014-03-13  1:47       ` Martin K. Petersen [this message]
2014-03-14 17:17         ` Frank Mayhar
2014-03-14 20:26           ` Martin K. Petersen
2014-03-12 18:06 ` Frank Mayhar

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=yq1d2hq27jk.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=fmayhar@google.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@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 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®