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>,
	linux-xfs@vger.kernel.org, zlang@redhat.com
Subject: Re: [PATCH] [RFC] xfs: fix inode fork extent count overflow
Date: Wed, 18 Sep 2019 09:46:47 -0700	[thread overview]
Message-ID: <20190918164647.GA20614@infradead.org> (raw)
In-Reply-To: <20190912010838.GO16973@dread.disaster.area>

On Thu, Sep 12, 2019 at 11:08:38AM +1000, Dave Chinner wrote:
> On Wed, Sep 11, 2019 at 03:55:51AM -0700, Christoph Hellwig wrote:
> > ... and there went my hopes to eventually squeeze xfs_ifork into
> > a single 64-byte cacheline.  But the analys looks sensible.
> 
> Not sure what the issue is here:
> 
> struct xfs_ifork {
>         int64_t                    if_bytes;             /*     0     8 */
>         struct xfs_btree_block *   if_broot;             /*     8     8 */
>         unsigned int               if_seq;               /*    16     4 */
>         int                        if_height;            /*    20     4 */
>         union {
>                 void *             if_root;              /*    24     8 */
>                 char *             if_data;              /*    24     8 */
>         } if_u1;                                         /*    24     8 */
>         short int                  if_broot_bytes;       /*    32     2 */
>         unsigned char              if_flags;             /*    34     1 */
> 
>         /* size: 40, cachelines: 1, members: 7 */
>         /* padding: 5 */
>         /* last cacheline: 40 bytes */
> };
> 
> it's already well inside a 64-byte single cacheline, even with a
> 64bit if_bytes. Yes, I've just pushed it from 32 to 40 bytes, but
> but if that is a problem we could pack some things more tightly...

Ok, I misremembered.  But before it fit into half a cacheline and nicely
aligned slab, and now it doesn't.  Not really as an argument against
the patch because it is clearly needed..

  reply	other threads:[~2019-09-18 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  1:21 [PATCH] [RFC] xfs: fix inode fork extent count overflow Dave Chinner
2019-09-11 10:55 ` Christoph Hellwig
2019-09-12  1:08   ` Dave Chinner
2019-09-18 16:46     ` Christoph Hellwig [this message]
2019-09-16 16:20 ` Darrick J. Wong
2019-09-16 17:22   ` Zorro Lang
2019-09-16 22:00   ` 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=20190918164647.GA20614@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@redhat.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