The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@fusionio.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Kent Overstreet <kmo@daterainc.com>, <axboe@kernel.dk>,
	<linux-kernel@vger.kernel.org>, NeilBrown <neilb@suse.de>,
	Olof Johansson <olof@lixom.net>
Subject: Re: block: Revert bio_clone() default behaviour
Date: Wed, 6 Nov 2013 15:49:52 -0500	[thread overview]
Message-ID: <20131106204952.3802.28112@localhost.localdomain> (raw)
In-Reply-To: <20131106203639.GB2049@redhat.com>

Quoting Mike Snitzer (2013-11-06 15:36:40)
> On Wed, Nov 06 2013 at  3:22pm -0500,
> Chris Mason <chris.mason@fusionio.com> wrote:
> 
> > Quoting Kent Overstreet (2013-11-06 15:02:22)
> > > On Wed, Nov 06, 2013 at 11:11:30AM -0500, Chris Mason wrote:
> > > > 
> > > > I think the concept of bio ownership is still much too weak, at least
> > > > for established users like MD and DM.  I don't know how to verify the
> > > > sharing of bi_io_vec without some kind of reference counting on the
> > > > iovec.
> > > 
> > > What's unclear about it? The rule is just - if you didn't allocate the biovec,
> > > don't modify it or use bio_for_each_segment_all() (probably I didn't quite state
> > > it clearly enough before though)
> > 
> > That part makes sense.  The new rule that scares me is that we can't
> > free the src of the clone until all the clones are freed.  If it works
> > with today's existing users it feels like it is more by accident than
> > design.  I'm not saying we can't do it, we just need some bigger
> > flashing warning lights.
> 
> But we probably don't want those warning lights to come with the cost of
> managing extra refcounts in the fast path -- so maybe a debug-only
> refcount?

I'd be happy with some code comments and a few extra SOBs.  In general
I'm happy with the new patches that add _fast and make us explicitly
choose the sharing.  Lots of little chances for bugs, but opt-in is a
much better starting point.

-chris

  reply	other threads:[~2013-11-06 20:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06  3:48 [PATCH] block: Revert bio_clone() default behaviour Kent Overstreet
2013-11-06  5:02 ` Olof Johansson
2013-11-06  5:07   ` Kent Overstreet
2013-11-06 15:25     ` Olof Johansson
2013-11-06 16:11 ` Chris Mason
2013-11-06 20:02   ` Kent Overstreet
2013-11-06 20:22     ` Chris Mason
2013-11-06 20:36       ` Mike Snitzer
2013-11-06 20:49         ` Chris Mason [this message]
2013-11-06 20:57       ` [PATCH] " Kent Overstreet
2013-11-06 21:25         ` Chris Mason
2013-11-06 21:51           ` Kent Overstreet
2013-11-07  4:59       ` NeilBrown
2013-11-06 20:31 ` Mike Snitzer
2013-11-06 20:40   ` Kent Overstreet

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=20131106204952.3802.28112@localhost.localdomain \
    --to=chris.mason@fusionio.com \
    --cc=axboe@kernel.dk \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=olof@lixom.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox