xfs
[Top] [All Lists]

Re: [PATCH 2/4] xfs: Introduce writeback context for writepages

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/4] xfs: Introduce writeback context for writepages
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 1 Sep 2015 00:41:03 -0700
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150831221743.GI26895@dastard>
References: <1440479153-1584-1-git-send-email-david@xxxxxxxxxxxxx> <1440479153-1584-3-git-send-email-david@xxxxxxxxxxxxx> <20150831180221.GA16371@xxxxxxxxxxxxxxx> <20150831185612.GB349@xxxxxxxxxxxxx> <20150831221743.GI26895@dastard>
User-agent: Mutt/1.5.23 (2014-03-12)
On Tue, Sep 01, 2015 at 08:17:43AM +1000, Dave Chinner wrote:
> The patch changes the bio allocation patterns - it allocates them on
> the fly and holds them, so we could potentially exhaust the bio
> mempool with this submission technique.

I've spend time to look over the patch again, and still don't see
a change.  Both in the old and new code we walk over the ioends
and build bios on the fly in xfs_submit_ioend(), which is always
called near then end of the writeback code; at the end of
xfs_vm_writepage in the old version, and from the end of
xfs_vm_writepage/xfs_vm_writepages through xfs_writepage_submit in
the new code (not taking the error case into account, which probably
should moe there, too).

The only big difference is..

> The ioend allocation pattern
> is different, too, because we only used to have 1 per buffer on a
> writepage call and the last one was used for the write clustering.

.. that we now build up way bigger ioend chains.


So back to Brians concern:  we can now have fairly large piles of
ioends built up while potentially getting scheduled out, and this
does look like a potential real issue to me.  I wonder if we should
(ab-)use the blk_plug_cb infrastructure so that we can flush the
pending ioends out on a context switch?

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 2/4] xfs: Introduce writeback context for writepages, Christoph Hellwig <=