Re: [PATCH v5 2/7] x86/mce/threshold: Remove the redundant this_cpu_dec_return()
From: Yazen Ghannam
Date: Wed Dec 18 2024 - 10:38:16 EST
On Thu, Dec 12, 2024 at 10:00:58PM +0800, Qiuxu Zhuo wrote:
> The 'storm' variable points to this_cpu_ptr(&storm_desc). Access the
> 'stormy_bank_count' field through the 'storm' to avoid calling
> this_cpu_*() on the same per-CPU variable twice.
>
> This minor optimization reduces the text size by 16 bytes.
>
> $ size threshold.o.*
> text data bss dec hex filename
> 1395 1664 0 3059 bf3 threshold.o.old
> 1379 1664 0 3043 be3 threshold.o.new
>
> No functional changes intended.
>
> Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>
> Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
> Reviewed-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Thanks,
Yazen