From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/8] xfs_scrub: use data/rtdev parallelization estimates for the read-verify pool
Date: Mon, 4 Feb 2019 18:23:15 -0800 [thread overview]
Message-ID: <20190205022315.GH7991@magnolia> (raw)
In-Reply-To: <20190204183855.GA7991@magnolia>
On Mon, Feb 04, 2019 at 10:38:55AM -0800, Darrick J. Wong wrote:
> On Mon, Feb 04, 2019 at 12:35:00PM -0600, Eric Sandeen wrote:
> > On 12/19/18 1:30 PM, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > >
> > > Since we use the same read-verify pool object to dispatch file data read
> > > requests for both the data device and the realtime device, we should
> > > create enough IO threads to handle the estimated parallelization of both
> > > devices, not just the data device.
> > >
> > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > So if rtdev is on SSD and datadev is on a rotational device, won't we
> > possibly still Launch All Threads at the rotational device for this
> > case, and won't that still hurt? I'm not sure it works to lump these
> > together, does it? (I also don't know if it can be done another way...)
>
> Hmm. I think we /could/ have separate readverify pools for data and rt
> devices. Let me look into that...
...yes, the readverify pool code needs some refactoring and thinko
removal; however, that cleanup should wait for xfsprogs 5.0.
--D
> --D
>
> > -Eric
> >
> >
> > > ---
> > > scrub/phase6.c | 20 ++++++++++++++++++--
> > > 1 file changed, 18 insertions(+), 2 deletions(-)
> > >
> > >
> > > diff --git a/scrub/phase6.c b/scrub/phase6.c
> > > index ead48d77..cbda9b53 100644
> > > --- a/scrub/phase6.c
> > > +++ b/scrub/phase6.c
> > > @@ -435,6 +435,22 @@ xfs_check_rmap(
> > > return true;
> > > }
> > >
> > > +/*
> > > + * Estimate the amount of parallelization possible for scanning file data on
> > > + * the data and realtime devices.
> > > + */
> > > +static unsigned int
> > > +phase6_threads(
> > > + struct scrub_ctx *ctx)
> > > +{
> > > + unsigned int nr = disk_heads(ctx->datadev);
> > > +
> > > + if (ctx->rtdev)
> > > + nr += disk_heads(ctx->rtdev);
> > > +
> > > + return nr > nproc ? nproc : nr;
> > > +}
> > > +
> > > /*
> > > * Read verify all the file data blocks in a filesystem. Since XFS doesn't
> > > * do data checksums, we trust that the underlying storage will pass back
> > > @@ -469,7 +485,7 @@ xfs_scan_blocks(
> > > }
> > >
> > > ve.readverify = read_verify_pool_init(ctx, ctx->geo.blocksize,
> > > - xfs_check_rmap_ioerr, disk_heads(ctx->datadev));
> > > + xfs_check_rmap_ioerr, phase6_threads(ctx));
> > > if (!ve.readverify) {
> > > moveon = false;
> > > str_info(ctx, ctx->mntpoint,
> > > @@ -525,7 +541,7 @@ xfs_estimate_verify_work(
> > > return moveon;
> > >
> > > *items = ((d_blocks - d_bfree) + (r_blocks - r_bfree)) << ctx->blocklog;
> > > - *nr_threads = disk_heads(ctx->datadev);
> > > + *nr_threads = phase6_threads(ctx);
> > > *rshift = 20;
> > > return moveon;
> > > }
> > >
next prev parent reply other threads:[~2019-02-05 2:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 19:29 [PATCH 0/8] xfsprogs: various fixes Darrick J. Wong
2018-12-19 19:29 ` [PATCH 1/8] xfs_scrub_all: walk the lsblk device/fs hierarchy correctly Darrick J. Wong
2019-02-04 18:08 ` Eric Sandeen
2019-02-04 18:16 ` Darrick J. Wong
2019-02-04 18:27 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 2/8] xfs_scrub_all.timer: activate after most of the system is up Darrick J. Wong
2019-02-04 18:12 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 3/8] xfs_scrub: rename the global nr_threads Darrick J. Wong
2019-02-04 18:20 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 4/8] xfs_scrub: use datadev parallelization estimates for thread count Darrick J. Wong
2019-02-04 18:31 ` Eric Sandeen
2019-02-04 18:34 ` Darrick J. Wong
2018-12-19 19:30 ` [PATCH 5/8] xfs_scrub: use data/rtdev parallelization estimates for the read-verify pool Darrick J. Wong
2019-02-04 18:35 ` Eric Sandeen
2019-02-04 18:38 ` Darrick J. Wong
2019-02-05 2:23 ` Darrick J. Wong [this message]
2018-12-19 19:30 ` [PATCH 6/8] xfs_repair: reinitialize the root directory nlink correctly Darrick J. Wong
2018-12-19 20:24 ` Bill O'Donnell
2019-02-04 19:19 ` Eric Sandeen
2018-12-19 19:30 ` [PATCH 7/8] xfs_repair: bump the irec on-disk nlink when adding lost+found Darrick J. Wong
2018-12-19 20:30 ` Bill O'Donnell
2018-12-19 19:30 ` [PATCH 8/8] xfs_repair: fix uninitialized variable warnings Darrick J. Wong
2018-12-19 20:25 ` Bill O'Donnell
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=20190205022315.GH7991@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/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).