linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Ming Lin <mlin@kernel.org>, Christoph Hellwig <hch@lst.de>,
	linux-xfs@vger.kernel.org,
	Ceph Development <ceph-devel@vger.kernel.org>,
	"LIU, Fei" <james.liu@alibaba-inc.com>,
	xiongwei.jiang@alibaba-inc.com, boqian.zy@alibaba-inc.com,
	sheng.qiu@alibaba-inc.com, Sage Weil <sweil@redhat.com>
Subject: Re: xlog_write: reservation ran out
Date: Thu, 4 May 2017 10:37:56 +1000	[thread overview]
Message-ID: <20170504003755.GD17542@dastard> (raw)
In-Reply-To: <20170503161508.GA12343@bfoster.bfoster>

On Wed, May 03, 2017 at 12:15:10PM -0400, Brian Foster wrote:
> On Wed, May 03, 2017 at 08:53:35AM -0700, Darrick J. Wong wrote:
> > On Wed, May 03, 2017 at 10:10:32AM -0400, Brian Foster wrote:
> > > the caller. Hmm, thinking more about it, I suppose we could just add
> > > another similar helper since we'd presumably want to process the list of
> > > items again if the reservation is overrun. Thoughts?
> > 
> > Process them again how?  I think I'm missing something here; are you
> > saying that we could (try to) get more reservation if allocating the
> > shadow buffer shows that we've run over?
> > 
> 
> No, poor choice of words.. s/process/iterate/.
> 
> I just mean that we may want another helper since we'd have to iterate
> the list of tp items potentially twice: first to calculate the total
> size, again to dump whatever info we want if the total overruns the
> reservation.

xlog_cil_insert_format_items() already calculates the total size
when doing the formatting of the log items into log vectors (i.e.
the returned len value) - we use it later in xlog_cil_insert_items()
to do the ticket reservation accounting.

So there's no additional overhead for detecting an overrun earlier
than we already do, and we don't care about the overhead of dumping
the transaction info if an overrun is detected...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2017-05-04  0:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAF1ivSZeYhnzh6CPZViYUNFXdm33hhTA_CzP7V745QociEEnKg@mail.gmail.com>
2017-04-28 20:24 ` xlog_write: reservation ran out Ming Lin
2017-04-28 20:56   ` Ming Lin
2017-05-01  6:10     ` Ming Lin
2017-05-01 13:12       ` Brian Foster
2017-05-01 17:41         ` Ming Lin
2017-05-01 18:48           ` Brian Foster
2017-05-01 20:18             ` Ming Lin
2017-05-02 23:51           ` Dave Chinner
2017-05-03 14:10             ` Brian Foster
2017-05-03 15:53               ` Darrick J. Wong
2017-05-03 16:15                 ` Brian Foster
2017-05-04  0:37                   ` Dave Chinner [this message]
2017-05-04  0:34               ` Dave Chinner
2017-05-04 11:51                 ` Brian Foster
2017-05-05  3:16                   ` Dave Chinner

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=20170504003755.GD17542@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=boqian.zy@alibaba-inc.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=james.liu@alibaba-inc.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mlin@kernel.org \
    --cc=sheng.qiu@alibaba-inc.com \
    --cc=sweil@redhat.com \
    --cc=xiongwei.jiang@alibaba-inc.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).