All of lore.kernel.org
 help / color / mirror / Atom feed
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To: snitzer@redhat.com
Cc: fujita.tomonori@lab.ntt.co.jp, hch@lst.de, axboe@kernel.dk,
	dm-devel@redhat.com, James.Bottomley@suse.de,
	linux-kernel@vger.kernel.org, martin.petersen@oracle.com,
	akpm@linux-foundation.org
Subject: Re: [PATCH 2/2] block: defer the use of inline biovecs for discard requests
Date: Tue, 29 Jun 2010 00:15:20 +0900	[thread overview]
Message-ID: <20100629001245C.fujita.tomonori@lab.ntt.co.jp> (raw)
In-Reply-To: <20100628122955.GA19497@redhat.com>

On Mon, 28 Jun 2010 08:29:55 -0400
Mike Snitzer <snitzer@redhat.com> wrote:

> On Mon, Jun 28 2010 at  6:33am -0400,
> FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> 
> > On Sat, 26 Jun 2010 15:56:51 -0400
> > Mike Snitzer <snitzer@redhat.com> wrote:
> > 
> > > Don't alloc discard bio with a biovec in blkdev_issue_discard.  Doing so
> > > means bio_has_data() will not be true until the SCSI layer adds the
> > > payload to the discard request via blk_add_request_payload.
> > > 
> > > bio_{enable,disable}_inline_vecs are not expected to be widely used so
> > > they were exported using EXPORT_SYMBOL_GPL.
> > > 
> > > This patch avoids the need for the following VM accounting fix for
> > > discards: http://lkml.org/lkml/2010/6/23/361
> > 
> > Why do we need to avoid the above fix?
> 
> We don't _need_ to.  We avoid the need for it as a side-effect of the
> cleanup that my patch provides.
> 
> > Surely, the above fix is hacky but much simpler than this patch.
> 
> My patch wasn't meant as an alternative to Tao Ma's patch.  Again, it
> just obviates the need for it.
> 
> Your tolerance for "hacky" is difficult to understand.  On the one-hand
> (PATCH 1/2) you have no tolerance for "hacky" fixes for leaks (that
> introduce a short-term SCSI layering violation).

Sorry, if not clear enough.

- SCSI layering violation is bad.

- A 'short term' solution always turns out to be a long solution. We
  should have a clean solution from the start.

- Complicating the SCSI I/O completion is bad (already complicated
 enough).

...

And the 'leaks' bug is still in -next. No need to fix it in a hacky
way. We can just drop it from -next.


> But in this case
> you're perfectly fine with BIO_RW_DISCARD special casing?

BIO_RW_DISCARD special is already everywhere in the block layer. I
prefer to have the less. However as long as it's in the block layer, I
can live with it. After all, that's the block layer thing.

At least, it looks much better this patch. This patch is really hacky
(as Jens said).

  reply	other threads:[~2010-06-28 15:16 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 14:59 [PATCH, RFC] block: don't allocate a payload for discard request Christoph Hellwig
2010-06-19  4:25 ` Mike Snitzer
2010-06-22 18:00   ` Mike Snitzer
2010-06-26 19:56     ` [PATCH 1/2] block: fix leaks associated with discard request payload Mike Snitzer
2010-06-27  8:49       ` FUJITA Tomonori
2010-06-27  9:26         ` Christoph Hellwig
2010-06-27 10:01           ` FUJITA Tomonori
2010-06-27 10:35             ` FUJITA Tomonori
2010-06-27 11:07               ` Christoph Hellwig
2010-06-27 12:32                 ` FUJITA Tomonori
2010-06-27 14:16                   ` Mike Snitzer
2010-06-27 15:35                     ` Christoph Hellwig
2010-06-27 16:23                       ` FUJITA Tomonori
2010-06-27 15:33                   ` Christoph Hellwig
2010-06-28  7:57                   ` Christoph Hellwig
2010-06-28  8:14                     ` FUJITA Tomonori
2010-06-28  8:18                       ` Jens Axboe
2010-06-28  8:45                         ` FUJITA Tomonori
2010-06-28  8:45                           ` FUJITA Tomonori
2010-06-28 15:25                       ` Christoph Hellwig
2010-06-30 11:55                         ` FUJITA Tomonori
2010-07-01  4:21                           ` FUJITA Tomonori
2010-06-27  9:38       ` Christoph Hellwig
2010-06-27 15:29       ` James Bottomley
2010-06-28 17:16         ` Martin K. Petersen
2010-06-29  8:00           ` Boaz Harrosh
2010-06-29 22:28         ` [dm-devel] " Mikulas Patocka
2010-06-29 23:03           ` James Bottomley
2010-06-29 23:51             ` Mike Snitzer
2010-06-29 23:51               ` Mike Snitzer
2010-06-30  0:11             ` [dm-devel] " Mikulas Patocka
2010-06-30 14:22               ` James Bottomley
2010-06-30 15:36                 ` Mike Snitzer
2010-06-30 16:26                   ` James Bottomley
2010-07-01 12:28                 ` [dm-devel] " Mikulas Patocka
2010-07-01 12:46                   ` Mike Snitzer
2010-07-01 14:03                     ` Mikulas Patocka
2010-07-01 14:03                       ` Mikulas Patocka
2010-07-01 12:49                   ` [dm-devel] " Alasdair G Kergon
2010-06-30  8:32         ` Boaz Harrosh
2010-06-30  8:42           ` Christoph Hellwig
2010-06-30 10:25             ` Boaz Harrosh
2010-06-30 10:41               ` Christoph Hellwig
2010-06-30 10:57                 ` Boaz Harrosh
2010-06-30 12:18                   ` Mike Snitzer
2010-06-26 19:56     ` [PATCH 2/2] block: defer the use of inline biovecs for discard requests Mike Snitzer
2010-06-27  9:39       ` Christoph Hellwig
2010-06-27 14:00         ` Mike Snitzer
2010-06-27 14:55       ` [PATCH 2/2 v2] " Mike Snitzer
2010-06-27 15:33         ` Christoph Hellwig
2010-06-28 10:33       ` [PATCH 2/2] " FUJITA Tomonori
2010-06-28 12:29         ` Mike Snitzer
2010-06-28 15:15           ` FUJITA Tomonori [this message]
2010-06-28 15:31             ` Mike Snitzer
2010-06-28 12:34       ` Jens Axboe
2010-06-28 12:37         ` Mike Snitzer
2010-06-28 12:41           ` Jens Axboe
2010-06-28 12:44             ` Christoph Hellwig
2010-06-28 12:49               ` Jens Axboe
2010-06-28 12:45             ` Mike Snitzer

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=20100629001245C.fujita.tomonori@lab.ntt.co.jp \
    --to=fujita.tomonori@lab.ntt.co.jp \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.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.