Re: [PATCH] mlx5: work around high stack usage with gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Sat,  4 Jan 2020 22:51:44 +0100

> In some configurations, gcc tries too hard to optimize this code:
> 
> drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function 'mlx5e_grp_sw_update_stats':
> drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:302:1: error: the frame size of 1336 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
> 
> As was stated in the bug report, the reason is that gcc runs into a corner
> case in the register allocator that is rather hard to fix in a good way.
> 
> As there is an easy way to work around it, just add a comment and the
> barrier that stops gcc from trying to overoptimize the function.
> 
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92657
> Cc: Adhemerval Zanella <adhemerval.zanella@xxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Saeed, please take this.

Thank you.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux