From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 07/10] repair: prefetch runs too far ahead
Date: Tue, 25 Feb 2014 17:52:50 -0800 [thread overview]
Message-ID: <20140226015250.GB3616@infradead.org> (raw)
In-Reply-To: <1393223369-4696-8-git-send-email-david@fromorbit.com>
On Mon, Feb 24, 2014 at 05:29:26PM +1100, Dave Chinner wrote:
> @@ -842,7 +842,7 @@ start_inode_prefetch(
> * and not any other associated metadata like directories
> */
>
> - max_queue = libxfs_bcache->c_maxcount / thread_count / 8;
> + max_queue = libxfs_bcache->c_maxcount / thread_count / 32;
I can't correlate this to anything mentioned in the changelog.
Also if you're touching it anyway it might be a good idea to document
the magic number here.
> +void
> +prefetch_ag_range(
> + struct work_queue *work,
> + xfs_agnumber_t start_ag,
> + xfs_agnumber_t end_ag,
> + bool dirs_only,
> + void (*func)(struct work_queue *,
> + xfs_agnumber_t, void *))
> +{
> + int i;
> + struct prefetch_args *pf_args[2];
> +
> + pf_args[start_ag & 1] = start_inode_prefetch(start_ag, dirs_only, NULL);
> + for (i = start_ag; i < end_ag; i++) {
> + /* Don't prefetch end_ag */
> + if (i + 1 < end_ag)
> + pf_args[(~i) & 1] = start_inode_prefetch(i + 1,
> + dirs_only, pf_args[i & 1]);
> + func(work, i, pf_args[i & 1]);
> + }
> +}
This seems to largely duplicate the common code added in patch 5.
Having _range variants of those that the non-range ones wrap with 0 and
mp->m_sb.sb_agcount as default parameters would avoid that duplication.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-26 1:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 6:29 [PATCH 00/10, v2] repair: scalability and prefetch fixes Dave Chinner
2014-02-24 6:29 ` [PATCH 01/10] repair: translation lookups limit scalability Dave Chinner
2014-02-24 20:42 ` Brian Foster
2014-02-25 20:01 ` Christoph Hellwig
2014-02-24 6:29 ` [PATCH 02/10] repair: per AG locks contend for cachelines Dave Chinner
2014-02-24 6:29 ` [PATCH 03/10] libxfs: buffer cache hashing is suboptimal Dave Chinner
2014-02-24 6:29 ` [PATCH 04/10] repair: limit auto-striding concurrency apprpriately Dave Chinner
2014-02-24 6:29 ` [PATCH 05/10] repair: factor out threading setup code Dave Chinner
2014-02-24 20:43 ` Brian Foster
2014-02-24 23:16 ` Dave Chinner
2014-02-24 23:30 ` Brian Foster
2014-02-24 6:29 ` [PATCH 06/10] repair: use a listhead for the dotdot list Dave Chinner
2014-02-25 20:03 ` Christoph Hellwig
2014-02-27 2:06 ` Dave Chinner
2014-02-24 6:29 ` [PATCH 07/10] repair: prefetch runs too far ahead Dave Chinner
2014-02-26 1:52 ` Christoph Hellwig [this message]
2014-02-26 5:51 ` Dave Chinner
2014-02-24 6:29 ` [PATCH 08/10] libxfs: remove a couple of locks Dave Chinner
2014-02-25 20:05 ` Christoph Hellwig
2014-02-25 23:43 ` Dave Chinner
2014-02-26 1:54 ` Christoph Hellwig
2014-02-26 5:53 ` Dave Chinner
2014-02-24 6:29 ` [PATCH 09/10] repair: fix prefetch queue limiting Dave Chinner
2014-02-25 20:08 ` Christoph Hellwig
2014-02-24 6:29 ` [PATCH 10/10] repair: BMBT prefetch needs to be CRC aware Dave Chinner
2014-02-25 17:25 ` Christoph Hellwig
2014-02-25 23:51 ` Dave Chinner
2014-02-26 1:40 ` Christoph Hellwig
2014-02-26 1:44 ` Christoph Hellwig
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=20140226015250.GB3616@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.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