public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: Christoph Hellwig <hch@lst.de>,
	xfs@oss.sgi.com, xfs-dev <xfs-dev@sgi.com>
Subject: Re: [PATCH] kill superflous buffer locking
Date: Wed, 28 Nov 2007 10:48:02 +0100	[thread overview]
Message-ID: <20071128094802.GB7760@lst.de> (raw)
In-Reply-To: <474CD2BA.8070204@sgi.com>

On Wed, Nov 28, 2007 at 01:30:18PM +1100, Lachlan McIlroy wrote:
> Christoph,
> 
> We've fixed the source of the assertion (that was the bugs in
> xfs_buf_associate_memory()) so I'm pushing your buffer lock
> removal patch back in again.
> 
> While looking through it I found a couple of issues:
> 
> - It called unlock_page() before calls to PagePrivate() and
>   PageUptodate().  I think the page needs to be locked during
>   these calls so I moved the unlock_page() further down.

This doesn't really matter at all.  XFS is the only user of the
address_space the pages reside in and we never have overlapping
buffers.  That's the reason why we can remove the buffer locking.
Now if there was a variant of find_or_create_page that didn't set
pages locked at all we could happily use it and get rid of the last
place we deal with locked pages.

> - Unlocking the pages as we go can cause a double unlock in the
>   error handling for a NULL page in the XBF_READ_AHEAD case so I
>   removed the unlocking code for that case.

Indeed.  Thanks for spotting this.

      reply	other threads:[~2007-11-28  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 18:49 [PATCH] kill superflous buffer locking Christoph Hellwig
2007-10-18  4:13 ` Lachlan McIlroy
2007-11-28  2:30   ` Lachlan McIlroy
2007-11-28  9:48     ` Christoph Hellwig [this message]

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=20071128094802.GB7760@lst.de \
    --to=hch@lst.de \
    --cc=lachlan@sgi.com \
    --cc=xfs-dev@sgi.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