public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 1/4] xfs: Don't allocate new buffers on every call to _xfs_buf_find
Date: Wed, 21 Sep 2011 07:28:56 -0400	[thread overview]
Message-ID: <20110921112856.GB30934@infradead.org> (raw)
In-Reply-To: <20110921064443.GO15688@dastard>

On Wed, Sep 21, 2011 at 04:44:43PM +1000, Dave Chinner wrote:
> 
> > And once you touch _xfs_buf_initialize
> > after the core of this patch, please merge it with xfs_buf_allocate into
> > a new xfs_buf_alloc that does the full allocation + initialization and
> > can also replace xfs_buf_get_empty.
> 
> Not right now. That restructing can be done separately, probably in
> the same patch set that fixes the API types problems...

That's what I meant - the conversion changes should be part of a larger
patch (-series) to also fix up the API, and this bit.

> > >  	if (bp == new_bp) {
> > >  		error = xfs_buf_allocate_memory(bp, flags);
> > >  		if (error)
> > >  			goto no_buffer;
> > > +	} else
> > >  		xfs_buf_deallocate(new_bp);
> > 
> > I'd recommend moving the call to xfs_buf_allocate_memory into
> > _xfs_buf_find so that it returns a fully allocated buffer.  In fact I'd
> > also move the xfs_buf_deallocate(new_bp) into the found side of
> > _xfs_buf_find, avoiding any conditionals in xfs_buf_get.
> 
> <sigh>
> 
> This code s pretty much as you requested it after the first time I
> posted it.
> 
> http://oss.sgi.com/archives/xfs/2011-08/msg00146.html
> 
> I'll go rewrite this again, but IMO all you are asking for is for me
> to put a different colour on the bike shed....

We can leave it as-is for now. My suggestion in the previous mail just
went half-way to where it makes most sense after looking at it for a
while.

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

  reply	other threads:[~2011-09-21 11:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  6:51 [PATCH 0/4] xfs: patch queue for 3.2 v2 Dave Chinner
2011-08-26  6:51 ` [PATCH 1/4] xfs: Don't allocate new buffers on every call to _xfs_buf_find Dave Chinner
2011-08-26  8:11   ` Christoph Hellwig
2011-08-26 14:19     ` Alex Elder
2011-09-21  6:44     ` Dave Chinner
2011-09-21 11:28       ` Christoph Hellwig [this message]
2011-08-26  6:51 ` [PATCH 2/4] xfs: reduce the number of log forces from tail pushing Dave Chinner
2011-08-26  8:14   ` Christoph Hellwig
2011-08-26  6:51 ` [PATCH 3/4] xfs: re-arrange all the xfsbufd delwri queue code Dave Chinner
2011-08-26  8:14   ` Christoph Hellwig
2011-08-26  6:51 ` [PATCH 4/4] xfs: convert xfsbufd to use a workqueue Dave Chinner
2011-08-26  8:25   ` Christoph Hellwig
2011-09-21  6:25     ` Dave Chinner
2011-09-21 11:26       ` 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=20110921112856.GB30934@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.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