public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
	Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: simplify read_extent_buffer_pages a bit
Date: Tue, 16 Apr 2019 11:16:33 +0200	[thread overview]
Message-ID: <20190416091632.GA4226@linux-x5ow.site> (raw)
In-Reply-To: <20190411165935.GA3476@twin.jikos.cz>


On Thu, Apr 11, 2019 at 06:59:35PM +0200, David Sterba wrote:
> On Thu, Apr 11, 2019 at 06:40:59PM +0200, Johannes Thumshirn wrote:
> > Currently read_extent_buffer_pages() uses a 4 pass algorithm to read an
> > extent buffer's pages from disk, all 4 stages looping over all pages of
> > the extent buffer.
> > 
> > 1) Loop over all pages and lock them.
> > 2) Loop over all pages and see if one is not marked as PageUptodate, so we
> >    can break out of the function early.
> > 3) Loop over all pages and if the page is !PageUptodate read the page,
> >    otherwise unlock the page.
> > 4) Loop over all pages and wait for stable pages.
> > 
> > Unify the 1st two for loops, we can count the number of uptodate pages
> > after we have locked them without the need for re-starting the loop.
> 
> Effectively reverting 2571e739677f1e4c0c63f5ed49adcc0857923625 that
> fixed a bug. Please have a look if something has really changed so that
> the split loops are no longer necessary.

After starring at the .s and .lst files GCC produces I cannot say whether this
holds true or not.

But as it was fixing a bug back then, I'll take back this patch.

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2019-04-16  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 16:40 [PATCH] btrfs: simplify read_extent_buffer_pages a bit Johannes Thumshirn
2019-04-11 16:59 ` David Sterba
2019-04-16  9:16   ` Johannes Thumshirn [this message]
2019-04-17 12:20     ` David Sterba

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=20190416091632.GA4226@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /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