ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 3/4] ocfs2: Add readhead during CoW.
Date: Tue, 29 Jun 2010 16:23:42 -0700	[thread overview]
Message-ID: <20100629232342.GI4150@mail.oracle.com> (raw)
In-Reply-To: <1277800541-6844-3-git-send-email-tao.ma@oracle.com>

On Tue, Jun 29, 2010 at 04:35:40PM +0800, Tao Ma wrote:
> @@ -2953,6 +2957,14 @@ static int ocfs2_duplicate_clusters_by_page(handle_t *handle,
>  		if (PAGE_CACHE_SIZE <= OCFS2_SB(sb)->s_clustersize)
>  			BUG_ON(PageDirty(page));
>  
> +		if (PageReadahead(page) && context->file) {
> +			page_cache_async_readahead(mapping,
> +						   &context->file->f_ra,
> +						   context->file,
> +						   page, page_index,
> +						   readahead_pages);
> +		}

	This is merely re-sending the same pages that were already sent,
right?  In the previous patch, you asked the readahead code to try all
pages in the hunk.  Now you've discovered a page that isn't yet up to
date, and you send it (and the 1M next to it) back to readahead.
	This is, I assume, because the readahead code doesn't actually
read your entire request from page_cache_sync_readahead().  It just
reads some, and this is you hinting that you need the next bit.  Am I
right?

Joel

-- 

Life's Little Instruction Book #464

	"Don't miss the magic of the moment by focusing on what's
	 to come."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2010-06-29 23:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29  8:27 [Ocfs2-devel] [PATCH 0/4] Add readahead support in CoW for reflinked files Tao Ma
2010-06-29  8:35 ` [Ocfs2-devel] [PATCH 1/4] ocfs2: Add struct file to ocfs2_refcount_cow Tao Ma
2010-06-29 23:14   ` Joel Becker
2010-06-30  1:34     ` Tao Ma
2010-06-30  3:11     ` Tao Ma
2010-06-30 12:00       ` Joel Becker
2010-07-01  0:17         ` Tao Ma
2010-07-01  9:12           ` Joel Becker
2010-07-01  9:20             ` Tao Ma
2010-06-29  8:35 ` [Ocfs2-devel] [PATCH 2/4] ocfs2: Add readahead support for CoW Tao Ma
2010-06-29  8:35 ` [Ocfs2-devel] [PATCH 3/4] ocfs2: Add readhead during CoW Tao Ma
2010-06-29 23:23   ` Joel Becker [this message]
2010-06-30  1:46     ` Tao Ma
2010-06-29  8:35 ` [Ocfs2-devel] [PATCH 4/4] ocfs2: make mmap CoW work with readahead Tao Ma
2010-06-29 23:24   ` Joel Becker

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=20100629232342.GI4150@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).