public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: chris.mason@oracle.com, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: stop using the page cache to back the buffer cache
Date: Sat, 12 Mar 2011 10:02:15 +1100	[thread overview]
Message-ID: <20110311230215.GD15097@dastard> (raw)
In-Reply-To: <20110311101642.GA15786@infradead.org>

On Fri, Mar 11, 2011 at 05:16:42AM -0500, Christoph Hellwig wrote:
> > +		if (((unsigned long)(bp->b_addr + bp->b_buffer_length - 1) &
> > +								PAGE_MASK) !=
> > +		    ((unsigned long)bp->b_addr & PAGE_MASK)) {
> > +			/* b_addr spans two pages - use alloc_page instead */
> > +			kmem_free(bp->b_addr);
> > +			bp->b_addr = NULL;
> > +			goto use_alloc_page;
> > +		}
> 
> Did you manage to hit this case?  If it happens with any frequency under
> real workloads we really need to find a wayto avoid the allocation to
> start with.

It's the replacement for the assert that you managed to trigger in
the previous version. The assert fired if the returned memory
spanned two pages, so this is catching and handling that case if it
ever occurs. No, I haven't sen it trip, but then again I only ever
saw the previous assert fire once and was never able to reproduce
it.

I'd prefer to leave it there as a definsive mechanism, especially if
the kernel grows a new SLxB allocator with different behaviour...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-03-11 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  1:05 [PATCH] xfs: stop using the page cache to back the buffer cache Dave Chinner
2011-03-11 10:16 ` Christoph Hellwig
2011-03-11 23:02   ` Dave Chinner [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=20110311230215.GD15097@dastard \
    --to=david@fromorbit.com \
    --cc=chris.mason@oracle.com \
    --cc=hch@infradead.org \
    --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