From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
Kees Cook <keescook@chromium.org>
Subject: Re: [Intel-wired-lan] [RFC net-next 2/2] ice: make use of DECLARE_FLEX() in ice_switch.c
Date: Tue, 1 Aug 2023 19:22:01 +0200 [thread overview]
Message-ID: <f18b3591-68b9-e375-1b25-810346d2304f@intel.com> (raw)
In-Reply-To: <0ac9d86b-c659-d4da-0838-7e0e447d2e49@intel.com>
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Date: Tue, 1 Aug 2023 16:36:57 +0200
> On 8/1/23 15:48, Alexander Lobakin wrote:
>> From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>> Date: Tue, 1 Aug 2023 13:19:23 +0200
[...]
>>> - status = -EINVAL;
>>> - goto ice_aq_alloc_free_vsi_list_exit;
>>> + return -EINVAL;
>>> }
>>> if (opc == ice_aqc_opc_free_res)
>>
>> bloat-o-meter results would be nice to have in the commitmsg.
>
> I will do next time, perhaps you could tell me if I get the results
> right here:
>
> ./scripts/bloat-o-meter ice_switch.o{ld,}
> add/remove: 2/2 grow/shrink: 3/5 up/down: 560/-483 (77)
> Function old new delta
> ice_create_vsi_list_rule - 241 +241
> ice_remove_vsi_list_rule 139 270 +131
> ice_add_adv_rule 6047 6139 +92
> ice_add_sw_recipe 2892 2972 +80
> __pfx_ice_create_vsi_list_rule - 16 +16
> ice_alloc_recipe 124 113 -11
> __pfx_ice_aq_alloc_free_vsi_list 16 - -16
> ice_free_res_cntr 185 155 -30
> ice_alloc_res_cntr 154 124 -30
> ice_add_update_vsi_list 1037 994 -43
> ice_add_vlan_internal 1027 953 -74
> ice_aq_alloc_free_vsi_list 279 - -279
> Total: Before=42183, After=42260, chg +0.18%
>
> My guess here is that compiler did different decisions about what to
> inline where, what is biggest difference.
77 bytes is very good result, because see below.
> And biggest gain here is avoidance of heap allocs, perhaps that enables
> gcc to shuffle things a bit too.
Exactly, having the stack grown only by 77 bytes after avoiding -- how
many? -- a lot of heap allocations sounds great.
> Another guess is that b-o-m ignores heap bloat, so slight growth is
> expected.
BOM can't calculate any heap usage, it simply compares symbol sizes in
object files.
(BTW, passing /dev/null as the first "object file" is legit, in case you
just want to see sorted symbol sizes in your module or vmlinux)
>
> Values reported for ice.ko are the same, with bigger base to compute the
> percent off.
>
>> [...]
>>
>> Thanks,
>> Olek
>
> Thank you too, also for our initial talk about on the topic.
No problem, I really feel like this macro would be very useful.
Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-08-01 17:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 11:19 [Intel-wired-lan] [RFC net-next 0/2] introduce DECLARE_FLEX() macro Przemek Kitszel
2023-08-01 11:19 ` [Intel-wired-lan] [RFC net-next 1/2] overflow: add DECLARE_FLEX() for on-stack allocs Przemek Kitszel
2023-08-01 13:54 ` Alexander Lobakin
2023-08-01 14:18 ` Przemek Kitszel
2023-08-01 17:15 ` Alexander Lobakin
2023-08-01 22:31 ` Kees Cook
2023-08-04 10:59 ` Przemek Kitszel
2023-08-04 15:49 ` Alexander Lobakin
2023-08-04 13:47 ` Przemek Kitszel
2023-08-04 15:44 ` Alexander Lobakin
2023-08-07 12:42 ` Przemek Kitszel
2023-08-07 14:47 ` Kees Cook
2023-08-04 22:39 ` Kees Cook
2023-08-01 11:19 ` [Intel-wired-lan] [RFC net-next 2/2] ice: make use of DECLARE_FLEX() in ice_switch.c Przemek Kitszel
2023-08-01 13:48 ` Alexander Lobakin
2023-08-01 14:36 ` Przemek Kitszel
2023-08-01 17:22 ` Alexander Lobakin [this message]
2023-08-01 22:35 ` Kees Cook
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=f18b3591-68b9-e375-1b25-810346d2304f@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=keescook@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.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