public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/5] xfs: defer AIO/DIO completions
Date: Mon, 22 Aug 2011 16:40:28 +1000	[thread overview]
Message-ID: <20110822064028.GL3162@dastard> (raw)
In-Reply-To: <20110814222517.807217901@bombadil.infradead.org>

On Sun, Aug 14, 2011 at 06:24:14PM -0400, Christoph Hellwig wrote:
> We really shouldn't complete AIO or DIO requests until we have finished
> the unwritten extent conversion and size update.  This means fsync never
> has to pick up any ioends as all work has been completed when signalling
> I/O completion.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I don't really like the field abuse. pahole tells me:

struct xfs_ioend {
        struct xfs_ioend *         io_list;              /*     0     8 */
        unsigned int               io_type;              /*     8     4 */
        int                        io_error;             /*    12     4 */
        atomic_t                   io_remaining;         /*    16     4 */

        /* XXX 4 bytes hole, try to pack */

        struct inode *             io_inode;             /*    24     8 */
        struct buffer_head *       io_buffer_head;       /*    32     8 */
        struct buffer_head *       io_buffer_tail;       /*    40     8 */
        size_t                     io_size;              /*    48     8 */
        xfs_off_t                  io_offset;            /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        struct work_struct         io_work;              /*    64    32 */
        struct kiocb *             io_iocb;              /*    96     8 */
        int                        io_result;            /*   104     4 */

There's a 4 byte hole in the xfs_ioend structure where you could put
a flags field to communicate this and not grow the structure....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2011-08-22  6:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14 22:24 [PATCH 0/5] simply and speedup I/O completion handling Christoph Hellwig
2011-08-14 22:24 ` [PATCH 1/5] xfs: remove dead ENODEV handling in xfs_destroy_ioend Christoph Hellwig
2011-08-22  6:32   ` Dave Chinner
2011-08-22 14:27     ` Christoph Hellwig
2011-08-14 22:24 ` [PATCH 2/5] xfs: defer AIO/DIO completions Christoph Hellwig
2011-08-22  6:40   ` Dave Chinner [this message]
2011-08-22 14:28     ` Christoph Hellwig
2011-08-14 22:24 ` [PATCH 3/5] xfs: reduce ioend latency Christoph Hellwig
2011-08-22  6:43   ` Dave Chinner
2011-08-22 14:29     ` Christoph Hellwig
2011-08-14 22:24 ` [PATCH 4/5] xfs: wait for I/O completion when writing out pages in xfs_setattr_size Christoph Hellwig
2011-08-22  6:44   ` Dave Chinner
2011-08-14 22:24 ` [PATCH 5/5] xfs: remove i_iocount Christoph Hellwig
2011-08-22  6:46   ` 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=20110822064028.GL3162@dastard \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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