public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Kent Overstreet <kmo@daterainc.com>
Cc: "Dave Kleikamp" <shaggy@kernel.org>,
	"Jeremy Fitzhardinge" <jeremy@goop.org>,
	"Herton Ronaldo Krzesinski" <herton.krzesinski@canonical.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Ed L. Cashin" <ecashin@coraid.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Selvan Mani" <smani@micron.com>,
	"Namjae Jeon" <namjae.jeon@samsung.com>,
	"Heiko Carstens" <heiko.carstens@de.ibm.com>,
	"Chris Mason" <chris.mason@fusionio.com>,
	nab@linux-iscsi.org, dm-devel@redhat.com,
	"Paul Mackerras" <paulus@samba.org>,
	"Pavel Machek" <pavel@ucw.cz>,
	"KONISHI Ryusuke" <konishi.ryusuke@lab.ntt.co.jp>,
	"Ian Campbell" <Ian.Campbell@citrix.com>,
	"Joshua Morris" <josh.h.morris@us.ibm.com>,
	"Alasdair Kergon" <agk@redhat.com>,
	"Nick Piggin" <npiggin@kernel.dk>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Joe Perches" <joe@perches.com>,
	"Mike Snitzer" <snitzer@redhat.com>,
	"Len Brown" <len.brown@intel.com>,
	"Minchan Kim" <minchan@kernel.org>,
	"Jie Liu" <jeff.liu@oracle.com>,
	"Andreas Dilger" <adilger.kernel@dilger.ca>,
	"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
	"Sebastian Ott" <sebott@linux.vnet.ibm.com>,
	"Philip Kelleher" <pjk1939@linux.vnet.ibm.com>,
	"Steven Whitehouse" <swhiteho@redhat.com>,
	hch@infradead.org,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Mel Gorman" <mgorman@suse.de>,
	"Boaz Harrosh" <bharrosh@panasas.com>,
	"Matthew Wilcox" <willy@linux.intel.com>,
	"Lars Ellenberg" <drbd-dev@lists.linbit.com>,
	"Ben Hutchings" <ben@decadent.org.uk>,
	"Prasad Joshi" <prasadjoshi.linux@gmail.com>,
	"Nitin Gupta" <ngupta@vflare.org>,
	"Alex Elder" <elder@inktank.com>,
	"Dan Magenheimer" <dan.magenheimer@oracle.com>,
	"Peng Tao" <tao.peng@emc.com>, "Sage Weil" <sage@inktank.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Pankaj Kumar" <pankaj.km@samsung.com>,
	"Trond Myklebust" <Trond.Myklebust@netapp.com>,
	"Joern Engel" <joern@logfs.org>,
	"Rusty Russell" <rusty@rustcorp.com.au>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	xfs@oss.sgi.com, "Rafael J. Wysocki" <rjw@sisk.pl>,
	"Martin Schwidefsky" <schwidefsky@de.ibm.com>,
	"Ben Myers" <bpm@sgi.com>,
	"Jerome Marchand" <jmarchand@redhat.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Andy Adamson" <andros@netapp.com>,
	"Sam Bradshaw" <sbradshaw@micron.com>,
	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>,
	ceph-devel@vger.kernel.org, "Yehuda Sadeh" <yehuda@inktank.com>,
	axboe@kernel.dk, "Theodore Ts'o" <tytso@mit.edu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Sunil Mushran" <sunil.mushran@gmail.com>,
	"Geoff Levand" <geoff@infradead.org>,
	"Jiri Kosina" <jkosina@suse.cz>,
	"Asai Thambi S P" <asamymuthupa@micron.com>,
	linux-kernel@vger.kernel.org,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	fanchaoting <fanchaoting@cn.fujitsu.com>,
	"Benny Halevy" <bhalevy@tonian.com>,
	"Jiang Liu" <jiang.liu@huawei.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	tj@kernel.org, linux390@de.ibm.com,
	"Mark Fasheh" <mfasheh@suse.com>,
	"Wei Yongjun" <yongjun_wei@trendmicro.com.cn>,
	"Frederic Weisbecker" <fweisbec@gmail.com>,
	"Guo Chao" <yan@linux.vnet.ibm.com>,
	"Joel Becker" <jlbec@evilplan.org>
Subject: Re: [PATCH 04/23] block: Abstract out bvec iterator
Date: Thu, 31 Oct 2013 14:29:36 +1100	[thread overview]
Message-ID: <20131031142936.63727342@notabene.brown> (raw)
In-Reply-To: <1383077896-4132-5-git-send-email-kmo@daterainc.com>


[-- Attachment #1.1: Type: text/plain, Size: 2718 bytes --]

On Tue, 29 Oct 2013 13:17:57 -0700 Kent Overstreet <kmo@daterainc.com> wrote:

> Immutable biovecs are going to require an explicit iterator. To
> implement immutable bvecs, a later patch is going to add a bi_bvec_done
> member to this struct; for now, this patch effectively just renames
> things.
> 
> Signed-off-by: Kent Overstreet <kmo@daterainc.com>


> diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
> index 8df5e8e..2101e71 100644
> --- a/Documentation/block/biodoc.txt
> +++ b/Documentation/block/biodoc.txt
> @@ -447,14 +447,13 @@ struct bio_vec {
>   * main unit of I/O for the block layer and lower layers (ie drivers)
>   */
>  struct bio {
> -       sector_t            bi_sector;
>         struct bio          *bi_next;    /* request queue link */
>         struct block_device *bi_bdev;	/* target device */
>         unsigned long       bi_flags;    /* status, command, etc */
>         unsigned long       bi_rw;       /* low bits: r/w, high: priority */
>  
>         unsigned int	bi_vcnt;     /* how may bio_vec's */
> -       unsigned int	bi_idx;		/* current index into bio_vec array */
> +       struct bvec_iter	bi_iter;	/* current index into bio_vec array */
>  
>         unsigned int	bi_size;     /* total size in bytes */
>         unsigned short 	bi_phys_segments; /* segments after physaddr coalesce*/
> @@ -480,7 +479,7 @@ With this multipage bio design:
>  - Code that traverses the req list can find all the segments of a bio
>    by using rq_for_each_segment.  This handles the fact that a request
>    has multiple bios, each of which can have multiple segments.
> -- Drivers which can't process a large bio in one shot can use the bi_idx
> +- Drivers which can't process a large bio in one shot can use the bi_iter
>    field to keep track of the next bio_vec entry to process.
>    (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE)
>    [TBD: Should preferably also have a bi_voffset and bi_vlen to avoid modifying
> @@ -589,7 +588,7 @@ driver should not modify these values. The block layer sets up the
>  nr_sectors and current_nr_sectors fields (based on the corresponding
>  hard_xxx values and the number of bytes transferred) and updates it on
>  every transfer that invokes end_that_request_first. It does the same for the
> -buffer, bio, bio->bi_idx fields too.
> +buffer, bio, bio->bi_iter fields too.
>  
>  The buffer field is just a virtual address mapping of the current segment
>  of the i/o buffer in cases where the buffer resides in low-memory. For high

Would it make sense to add some details of "bvec_iter" to this document?

Or will that come later?

NeilBrown

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-10-31  3:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1383077896-4132-1-git-send-email-kmo@daterainc.com>
2013-10-29 20:17 ` [PATCH 04/23] block: Abstract out bvec iterator Kent Overstreet
2013-10-31  3:29   ` NeilBrown [this message]
2013-10-31 17:14   ` Ed Cashin

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=20131031142936.63727342@notabene.brown \
    --to=neilb@suse.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBottomley@parallels.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andros@netapp.com \
    --cc=asamymuthupa@micron.com \
    --cc=axboe@kernel.dk \
    --cc=ben@decadent.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=bhalevy@tonian.com \
    --cc=bharrosh@panasas.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bpm@sgi.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=chris.mason@fusionio.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=dm-devel@redhat.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=ecashin@coraid.com \
    --cc=elder@inktank.com \
    --cc=fanchaoting@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=geoff@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=herton.krzesinski@canonical.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=jbeulich@suse.com \
    --cc=jeff.liu@oracle.com \
    --cc=jeremy@goop.org \
    --cc=jiang.liu@huawei.com \
    --cc=jkosina@suse.cz \
    --cc=jlbec@evilplan.org \
    --cc=jmarchand@redhat.com \
    --cc=joe@perches.com \
    --cc=joern@logfs.org \
    --cc=josh.h.morris@us.ibm.com \
    --cc=kmo@daterainc.com \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=konrad.wilk@oracle.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=mfasheh@suse.com \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=namjae.jeon@samsung.com \
    --cc=ngupta@vflare.org \
    --cc=npiggin@kernel.dk \
    --cc=pankaj.km@samsung.com \
    --cc=paulus@samba.org \
    --cc=pavel@ucw.cz \
    --cc=pjk1939@linux.vnet.ibm.com \
    --cc=prasadjoshi.linux@gmail.com \
    --cc=rjw@sisk.pl \
    --cc=roger.pau@citrix.com \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sage@inktank.com \
    --cc=sbradshaw@micron.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=sebott@linux.vnet.ibm.com \
    --cc=shaggy@kernel.org \
    --cc=smani@micron.com \
    --cc=snitzer@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=sunil.mushran@gmail.com \
    --cc=swhiteho@redhat.com \
    --cc=tao.peng@emc.com \
    --cc=tj@kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@linux.intel.com \
    --cc=xfs@oss.sgi.com \
    --cc=yan@linux.vnet.ibm.com \
    --cc=yehuda@inktank.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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