linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Vratislav Bendel <vbendel@redhat.com>
Cc: linux-xfs@vger.kernel.org, Brian Foster <bfoster@redhat.com>,
	linux-kernel@vger.kernel.org, djwong@kernel.org
Subject: Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic
Date: Mon, 5 Mar 2018 10:52:59 -0800	[thread overview]
Message-ID: <20180305185259.GC18989@magnolia> (raw)
In-Reply-To: <CAHrQN1w2DxYD_ZscBhsuGq2b6CKn41AnVCaH6_hSQ2tN8DkA1Q@mail.gmail.com>

On Mon, Mar 05, 2018 at 11:19:46AM +0100, Vratislav Bendel wrote:
> (In response to Luis' comment:)
> > Can you add a respective Fixes: tag?
> 
> It was apparently present since LRU was added to xfs buffer cache via:
> commit 430cbeb86fdcbbdabea7d4aa65307de8de425350
> [xfs: add a lru to the XFS buffer cache]
> 
> But I wouldn't say this patch "fixes" that commit.
> What do you think? Should a fixes tag be added in this case?
> 
> 
> > Also what effects are observed by
> > the user when this happens on the kernel log?
> 
> I haven't spotted any differences visible to user, nor in the kernel log.
> 
> (In response to Brian's comment:)
> >> However, as per documentation, atomic_add_unless() returns _zero_
> >> if the atomic value was originally equal to the specified *unsless* value.
> >>
> > Nit:                                                         unless
> 
> Thanks very much for feedback. Since it's my very first upstream
> commit-proposal,
> I expected that some polish would be needed.
> 
> 
> > It might be worth pointing out in the commit log that currently isolated
> > buffers end up right back on the LRU once they are released, because
> > ->b_lru_ref remains elevated. Therefore, this patch essentially fixes
> > that circuitous route by leaving them on the LRU as originally intended.
> > Otherwise this looks Ok to me:
> 
> So the final commit message could be:
> ~~~
> Currently the xfs_buftarg_isolate() is causing an xfs_buffer

"Due to an inverted logic mistake in xfs_buftarg_isolate()..."?

> with zero b_lru_ref, to take another trip around LRU, while

                   ^^^^ no need for this comma

> isolating buffers with non-zero b_lru_ref.
> 
> Additionally those isolated buffers end up right back on the LRU
> once they are released, because ->b_lru_ref remains elevated.
> 
> Fix that circuitous route by leaving them on the LRU
> as originally intended.

Otherwise this seems fine to me; can you please resend the patch w/
updated change log and reviewed-by tags?

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> 
> >> Signed-off-by: Vratislav Bendel <vbendel@redhat.com>
> > Reviewed-by: Brian Foster <bfoster@redhat.com>
> > ---
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-03-05 18:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 15:49 [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic Vratislav Bendel
2018-02-28 19:08 ` Luis R. Rodriguez
2018-03-01 17:39 ` Brian Foster
2018-03-01 22:48 ` Darrick J. Wong
2018-03-02 16:36   ` Darrick J. Wong
2018-03-05 10:19     ` Vratislav Bendel
2018-03-05 18:52       ` Darrick J. Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-06 10:26 Vratislav Bendel
2018-03-07  0:34 ` Darrick J. Wong
2018-03-08  8:08 ` 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=20180305185259.GC18989@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=vbendel@redhat.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).