mbox series

[RFC,0/6] reduce the size of rnbd_clt_dev

Message ID 20220620034923.35633-1-guoqing.jiang@linux.dev (mailing list archive)
Headers show
Series reduce the size of rnbd_clt_dev | expand

Message

Guoqing Jiang June 20, 2022, 3:49 a.m. UTC
Hi,

The struct rnbd_clt_dev added some members (wc, fua and max_hw_sectors
etc) which are used to set up gendisk and request_queue, but seems only
map scenario need to setup them since rnbd_client_setup_device is not
called from remap path.

Previously, pahole reports.

	/* size: 272, cachelines: 5, members: 29 */
	/* sum members: 259, holes: 4, sum holes: 13 */
	/* last cacheline: 16 bytes */

After the series, it changes to

	/* size: 224, cachelines: 4, members: 17 */
	/* last cacheline: 32 bytes */

Please review.

Thanks,
Guoqing   

Guoqing Jiang (6):
  rnbd-clt: open code send_msg_open in rnbd_clt_map_device
  rnbd-clt: don't free rsp in msg_open_conf for map scenario
  rnbd-clt: kill read_only from struct rnbd_clt_dev
  rnbd-clt: reduce the size of struct rnbd_clt_dev
  rnbd-clt: adjust the layout of struct rnbd_clt_dev
  rnbd-clt: refactor rnbd_clt_change_capacity

 drivers/block/rnbd/rnbd-clt-sysfs.c |   2 +-
 drivers/block/rnbd/rnbd-clt.c       | 202 +++++++++++++++++-----------
 drivers/block/rnbd/rnbd-clt.h       |  18 +--
 3 files changed, 124 insertions(+), 98 deletions(-)

Comments

Jinpu Wang June 21, 2022, 12:16 p.m. UTC | #1
On Mon, Jun 20, 2022 at 5:49 AM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> Hi,
>
> The struct rnbd_clt_dev added some members (wc, fua and max_hw_sectors
> etc) which are used to set up gendisk and request_queue, but seems only
> map scenario need to setup them since rnbd_client_setup_device is not
> called from remap path.
>
> Previously, pahole reports.
>
>         /* size: 272, cachelines: 5, members: 29 */
>         /* sum members: 259, holes: 4, sum holes: 13 */
>         /* last cacheline: 16 bytes */
>
> After the series, it changes to
>
>         /* size: 224, cachelines: 4, members: 17 */
>         /* last cacheline: 32 bytes */
>
> Please review.
>
> Thanks,
> Guoqing
Hi Guoqing,

Thanks for the patchset, I had a brief look, in general I like the
idea, will run a regression test. and sort out the details.

Thanks!
Jinpu
Guoqing Jiang June 22, 2022, 11:15 a.m. UTC | #2
Hi Jinpu,

On 6/21/22 8:16 PM, Jinpu Wang wrote:
> On Mon, Jun 20, 2022 at 5:49 AM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>> Hi,
>>
>> The struct rnbd_clt_dev added some members (wc, fua and max_hw_sectors
>> etc) which are used to set up gendisk and request_queue, but seems only
>> map scenario need to setup them since rnbd_client_setup_device is not
>> called from remap path.
>>
>> Previously, pahole reports.
>>
>>          /* size: 272, cachelines: 5, members: 29 */
>>          /* sum members: 259, holes: 4, sum holes: 13 */
>>          /* last cacheline: 16 bytes */
>>
>> After the series, it changes to
>> t
>>          /* last cacheline: 32 bytes */
>>
>> Please review.
>>
>> Thanks,
>> Guoqing
> Hi Guoqing,
>
> Thanks for the patchset, I had a brief look, in general I like the
> idea, will run a regression test. and sort out the details.
>

Thanks for the review!

Thanks,
Guoqing