public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jan Kara <jack@suse.cz>
Cc: Ben Myers <bpm@sgi.com>, Alex Elder <elder@kernel.org>,
	David Chinner <dchinner@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfs: Fix overallocation in xfs_buf_allocate_memory()
Date: Wed, 20 Jun 2012 16:41:33 +1000	[thread overview]
Message-ID: <20120620064133.GF30705@dastard> (raw)
In-Reply-To: <1338935546-3914-1-git-send-email-jack@suse.cz>

On Wed, Jun 06, 2012 at 12:32:26AM +0200, Jan Kara wrote:
> Commit de1cbee which removed b_file_offset in favor of b_bn introduced a bug
> causing xfs_buf_allocate_memory() to overestimate the number of necessary
> pages. The problem is that xfs_buf_alloc() sets b_bn to -1 and thus effectively
> every buffer is straddling a page boundary which causes
> xfs_buf_allocate_memory() to allocate two pages and use vmalloc() for access
> which is unnecessary.
> 
> Dave says xfs_buf_alloc() doesn't need to set b_bn to -1 anymore since the
> buffer is inserted into the cache only after being fully initialized now.
> So just make xfs_buf_alloc() fill in proper block number from the beginning.
> 
> CC: David Chinner <dchinner@redhat.com>
> Signed-off-by: Jan Kara <jack@suse.cz>

Hmmm, the

Reviewed-by: Dave Chinner <dchinner@redhat.com>

I sent yesterday doesn't appear to have made it to the list. Oh
well, try again...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

      parent reply	other threads:[~2012-06-20  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05 22:32 [PATCH v2] xfs: Fix overallocation in xfs_buf_allocate_memory() Jan Kara
2012-06-20  6:39 ` Christoph Hellwig
2012-06-20  6:41 ` 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=20120620064133.GF30705@dastard \
    --to=david@fromorbit.com \
    --cc=bpm@sgi.com \
    --cc=dchinner@redhat.com \
    --cc=elder@kernel.org \
    --cc=jack@suse.cz \
    --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