public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: simplify WQ_HIGHPRI handling in struct btrfs_workqueue
Date: Fri, 22 Apr 2022 23:05:25 +0200	[thread overview]
Message-ID: <20220422210525.GL18596@twin.jikos.cz> (raw)
In-Reply-To: <03ea07cb-d724-26f6-bfce-99befb3ab15e@suse.com>

On Mon, Apr 18, 2022 at 04:03:43PM +0800, Qu Wenruo wrote:
> > -struct __btrfs_workqueue {
> > +struct btrfs_workqueue {
> >   	struct workqueue_struct *normal_wq;
> 
> I guess we can also rename @normal_wq here, as there is only one wq in 
> each btrfs_workqueue, no need to distinguish them in btrfs_workqueue.

Yeah now the 'normal_' prefix does not make sense.

> And since we're here, doing a pahole optimization would also be a good 
> idea (can be done in a sepearate patchset).
> 
> Especially there is a huge 16 bytes hole between @ordered_list and 
> @list_lock.

On a release build the packing is good, I don't see any holes there:

struct btrfs_work {
        btrfs_func_t               func;                 /*     0     8 */
        btrfs_func_t               ordered_func;         /*     8     8 */
        btrfs_func_t               ordered_free;         /*    16     8 */
        struct work_struct         normal_work;          /*    24    32 */
        struct list_head           ordered_list;         /*    56    16 */
        /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
        struct btrfs_workqueue *   wq;                   /*    72     8 */
        long unsigned int          flags;                /*    80     8 */

        /* size: 88, cachelines: 2, members: 7 */
        /* last cacheline: 24 bytes */
};

The fs_info structure grew a bit but it's a large one and there's still
enough space before it hits 4K.

  reply	other threads:[~2022-04-22 22:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  4:43 btrfs_workqueue cleanups Christoph Hellwig
2022-04-18  4:43 ` [PATCH 1/3] btrfs: simplify WQ_HIGHPRI handling in struct btrfs_workqueue Christoph Hellwig
2022-04-18  8:03   ` Qu Wenruo
2022-04-22 21:05     ` David Sterba [this message]
2022-04-22 22:58       ` Qu Wenruo
2022-04-23  5:45       ` Christoph Hellwig
2022-04-18  4:43 ` [PATCH 2/3] btrfs: use normal workqueues for scrub Christoph Hellwig
2022-04-18  8:04   ` Qu Wenruo
2022-04-18  4:43 ` [PATCH 3/3] btrfs: use a normal workqueue for rmw_workers Christoph Hellwig
2022-04-18  8:05   ` Qu Wenruo
2022-04-22 21:22 ` btrfs_workqueue cleanups David Sterba

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=20220422210525.GL18596@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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