From: Dave Chinner <david@fromorbit.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH v2 1/3] xfs: use b_maps[] for discontiguous buffers
Date: Sat, 1 Dec 2012 09:21:10 +1100 [thread overview]
Message-ID: <20121130222110.GB12955@dastard> (raw)
In-Reply-To: <50B8F2FC.6060501@sgi.com>
On Fri, Nov 30, 2012 at 11:55:08AM -0600, Mark Tinguely wrote:
> On 11/30/12 10:09, Christoph Hellwig wrote:
> >> use_alloc_page:
> >>- start = BBTOB(bp->b_map.bm_bn)>> PAGE_SHIFT;
> >>- end = (BBTOB(bp->b_map.bm_bn + bp->b_length) + PAGE_SIZE - 1)
> >>+ start = BBTOB(bp->b_maps[0].bm_bn)>> PAGE_SHIFT;
> >>+ end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1)
> >
> >Btw, how is this logic supposed to work for discontiguous buffers?
> >
> >Each of them might straddle boundaries individually, so doing the
> >start/end calculation for the number of pages isn't going to be correct.
> >
>
> eeek. yep, I will loop through and count the pages needed in each
> segment.
That's wrong - the pages must be mappable as a contiguous memory
range. That's how this code avoids copying the data from
discontiguous page ranges into a contiguous mapped memory range.
If you separate each IO into to it's own set of pages, then you have
to completely rewrite _xfs_buf_ioapply(), which AFAICT works just
fine with the page allocation that is done right now....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-11-30 22:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 22:23 [PATCH v2 0/3] discontiguous buffer patches Mark Tinguely
2012-11-28 22:23 ` [PATCH v2 1/3] xfs: use b_maps[] for discontiguous buffers Mark Tinguely
2012-11-30 16:09 ` Christoph Hellwig
2012-11-30 17:55 ` Mark Tinguely
2012-11-30 22:21 ` Dave Chinner [this message]
2012-11-30 23:09 ` Christoph Hellwig
2012-11-30 22:18 ` Dave Chinner
2012-12-02 23:31 ` Dave Chinner
2012-11-28 22:23 ` [PATCH v2 2/3] xfs: fix the buffer log format for contiguous buffers Mark Tinguely
2012-12-02 23:46 ` Dave Chinner
2012-11-28 22:23 ` [PATCH v2 3/3] xfs: fix the multi-segment log buffer format Mark Tinguely
2012-11-30 23:14 ` Christoph Hellwig
2012-12-02 23:52 ` Dave Chinner
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=20121130222110.GB12955@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=tinguely@sgi.com \
--cc=xfs@oss.sgi.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