linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: [PATCH 4/4] xfs: rewrite and optimize the delalloc write path
Date: Fri, 26 Aug 2016 16:33:44 +0200	[thread overview]
Message-ID: <20160826143344.GB21535@lst.de> (raw)
In-Reply-To: <20160825143708.GD25041@bfoster.bfoster>

On Thu, Aug 25, 2016 at 10:37:09AM -0400, Brian Foster wrote:
> On just skimming over this so far, I feel like this should be at least
> two patches, possibly 3:
> 
> - Kill xfs_bmapi_delay() and pull up associated bits to iomap().

As in just a move of code to xfs_iomap.c or also merged it with a
partіal copy of xfs_file_iomap_begin?  The first is trivial, but also
rather pointless.  The second is a bit more work, still very doable
but probably also not that useful as we're going to totally rewrite it
again in the next step.

> - Possibly separate out the part that moves iteration from the (former)
>   xfs_bmapi_delay() code up to the iomap code, if we can do so cleanly.

Well, the major point is that we get rid of the iteration as there isn't
any actual need for it.

> - Refactor/rework the preallocate logic.

But I guess I could do a pass that creates xfs_file_iomap_begin_delay
as in the new version except without the prealloc changes, and then
separate them out.  I don't quite see the point, though..
> I'm not necessarily against cleaning up/reworking the prealloc bits, but
> I'm not a huge fan of open coding all of this here in the iomap
> function. If nothing else, the indentation starts to make my eyes
> cross... could we retain one level of abstraction here for this hunk of
> logic that updates end_fsb?

We're only having three tabs of indentation.  I actually looked into
a helper for that whole block, but we'd need to pass:

ip, idx, prev, offset_fsb, offset, count, maxbytes_fsb

(we could potentially re-derive offset_fsb from offset if we don't
mind the inefficieny and recalculate maxbytes_fsb.  This already
assumes mp is trivially derived from ip)

and return

alloc_blocks, end_fsb

so the function would be quite a monster in terms of its calling
convention.  Additionally we'd have the related by not qute the
same if blocks around XFS_MOUNT_DFLT_IOSIZE and the isize split
over two functions, which doesn't exactly help understanding
the flow.

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

  reply	other threads:[~2016-08-26 14:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21 21:51 iomap write fixes Christoph Hellwig
2016-08-21 21:51 ` [PATCH 1/4] xfs: move xfs_bmbt_to_iomap up Christoph Hellwig
2016-08-25 12:38   ` Brian Foster
2016-08-21 21:51 ` [PATCH 2/4] xfs: factor our a helper to calculate the EOF alignment Christoph Hellwig
2016-08-25 12:38   ` Brian Foster
2016-08-21 21:51 ` [PATCH 3/4] xfs: make xfs_inode_set_eofblocks_tag cheaper for the common case Christoph Hellwig
2016-08-25 12:38   ` Brian Foster
2016-08-26 14:26     ` Christoph Hellwig
2016-08-26 16:02       ` Brian Foster
2016-08-30 14:40         ` Christoph Hellwig
2016-08-30 23:03           ` Dave Chinner
2016-08-21 21:51 ` [PATCH 4/4] xfs: rewrite and optimize the delalloc write path Christoph Hellwig
2016-08-25 14:37   ` Brian Foster
2016-08-26 14:33     ` Christoph Hellwig [this message]
2016-08-26 16:03       ` Brian Foster
2016-08-26 16:07         ` Brian Foster
2016-08-30 14:44           ` Christoph Hellwig
2016-08-30 20:28           ` Brian Foster

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=20160826143344.GB21535@lst.de \
    --to=hch@lst.de \
    --cc=bfoster@redhat.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;
as well as URLs for NNTP newsgroup(s).