linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/2] block: Discard merging fixes
@ 2018-02-01 20:31 Keith Busch
  2018-02-01 20:31 ` [PATCHv2 1/2] block: Merge discard requests as a special case Keith Busch
  2018-02-01 20:31 ` [PATCHv2 2/2] block: Handle merging discards in IO schedulers Keith Busch
  0 siblings, 2 replies; 6+ messages in thread
From: Keith Busch @ 2018-02-01 20:31 UTC (permalink / raw)
  To: Linux Block, Linux NVMe, Christoph Hellwig, Jens Axboe; +Cc: Keith Busch

This series fixes some incorrect accounting from merging discard requests.

The first patch fixes merging two discard requests by having a special
case for merging these using the unique constraints discards have.

The second fixes merging a new discard bio into an existing
request. Previously all the schedulers defaulted to a front merge,
so the  patch just checks merge type and adds a 'case' for handling
discard in each of the callers.

I've only been able to test with mq-deadline on NVMe as that is the only
driver currently supporting multiple discard ranges in a single command.

v1 -> v2: 

  Fixed patch 1 based on feedback from Jens, tested with recreate
  sequence.

  Added 2nd patch for merging discard bios into existing requests.

Keith Busch (2):
  block: Merge discard requests as a special case
  block: Handle merging discards in IO schedulers

 block/bfq-iosched.c      |  2 +-
 block/blk-core.c         |  4 ++++
 block/blk-merge.c        | 29 ++++++++++++++++++++++++++++-
 block/blk-mq-sched.c     |  2 ++
 block/cfq-iosched.c      |  2 +-
 block/deadline-iosched.c |  4 +++-
 block/elevator.c         |  2 +-
 block/mq-deadline.c      |  2 +-
 8 files changed, 41 insertions(+), 6 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-01 21:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 20:31 [PATCHv2 0/2] block: Discard merging fixes Keith Busch
2018-02-01 20:31 ` [PATCHv2 1/2] block: Merge discard requests as a special case Keith Busch
2018-02-01 21:00   ` Jens Axboe
2018-02-01 20:31 ` [PATCHv2 2/2] block: Handle merging discards in IO schedulers Keith Busch
2018-02-01 21:02   ` Jens Axboe
2018-02-01 21:28     ` Keith Busch

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).