From: Jinpu Wang <jinpu.wang@ionos.com>
To: Guoqing Jiang <guoqing.jiang@linux.dev>
Cc: haris.iqbal@ionos.com, axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [RFC PATCH 5/6] rnbd-clt: adjust the layout of struct rnbd_clt_dev
Date: Wed, 22 Jun 2022 12:58:07 +0200 [thread overview]
Message-ID: <CAMGffEk-M1FOLpez4qkiHLb1ms9rhye2XRXGaqzrSohL0Aoi4w@mail.gmail.com> (raw)
In-Reply-To: <20220620034923.35633-6-guoqing.jiang@linux.dev>
On Mon, Jun 20, 2022 at 5:50 AM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> While at it, let re-arrange the struct to remove holes.
>
> Before, pahole reports
>
> /* size: 232, cachelines: 4, members: 17 */
> /* sum members: 224, holes: 2, sum holes: 8 */
> /* last cacheline: 40 bytes */
>
> After the change, the report changes to
>
> /* size: 224, cachelines: 4, members: 17 */
> /* last cacheline: 32 bytes */
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
lgtm
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/block/rnbd/rnbd-clt.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/rnbd/rnbd-clt.h b/drivers/block/rnbd/rnbd-clt.h
> index 7520272541b1..df237d2ea0d9 100644
> --- a/drivers/block/rnbd/rnbd-clt.h
> +++ b/drivers/block/rnbd/rnbd-clt.h
> @@ -106,6 +106,7 @@ struct rnbd_queue {
> };
>
> struct rnbd_clt_dev {
> + struct kobject kobj;
> struct rnbd_clt_session *sess;
> struct request_queue *queue;
> struct rnbd_queue *hw_queues;
> @@ -114,15 +115,14 @@ struct rnbd_clt_dev {
> u32 clt_device_id;
> struct mutex lock;
> enum rnbd_clt_dev_state dev_state;
> + refcount_t refcount;
> char *pathname;
> enum rnbd_access_mode access_mode;
> u32 nr_poll_queues;
> u64 size; /* device size in bytes */
> struct list_head list;
> struct gendisk *gd;
> - struct kobject kobj;
> char *blk_symlink_name;
> - refcount_t refcount;
> struct work_struct unmap_on_rmmod_work;
> };
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-06-22 10:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 3:49 [RFC PATCH 0/6] reduce the size of rnbd_clt_dev Guoqing Jiang
2022-06-20 3:49 ` [RFC PATCH 1/6] rnbd-clt: open code send_msg_open in rnbd_clt_map_device Guoqing Jiang
2022-06-21 15:11 ` Jinpu Wang
2022-06-22 11:14 ` Guoqing Jiang
2022-06-20 3:49 ` [RFC PATCH 2/6] rnbd-clt: don't free rsp in msg_open_conf for map scenario Guoqing Jiang
2022-06-22 10:57 ` Jinpu Wang
2022-06-20 3:49 ` [RFC PATCH 3/6] rnbd-clt: kill read_only from struct rnbd_clt_dev Guoqing Jiang
2022-06-22 10:57 ` Jinpu Wang
2022-06-20 3:49 ` [RFC PATCH 4/6] rnbd-clt: reduce the size of " Guoqing Jiang
2022-06-22 10:58 ` Jinpu Wang
2022-06-20 3:49 ` [RFC PATCH 5/6] rnbd-clt: adjust the layout " Guoqing Jiang
2022-06-22 10:58 ` Jinpu Wang [this message]
2022-06-20 3:49 ` [RFC PATCH 6/6] rnbd-clt: refactor rnbd_clt_change_capacity Guoqing Jiang
2022-06-22 10:57 ` Jinpu Wang
2022-06-22 11:12 ` Guoqing Jiang
2022-06-21 12:16 ` [RFC PATCH 0/6] reduce the size of rnbd_clt_dev Jinpu Wang
2022-06-22 11:15 ` Guoqing Jiang
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=CAMGffEk-M1FOLpez4qkiHLb1ms9rhye2XRXGaqzrSohL0Aoi4w@mail.gmail.com \
--to=jinpu.wang@ionos.com \
--cc=axboe@kernel.dk \
--cc=guoqing.jiang@linux.dev \
--cc=haris.iqbal@ionos.com \
--cc=linux-block@vger.kernel.org \
/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).