Re: [willy-pagecache:for-next 60/69] fs/ntfs/aops.c:378:12: warning: stack frame size (2216) exceeds limit (1024) in 'ntfs_read_folio'

From: Nathan Chancellor
Date: Mon May 02 2022 - 14:00:27 EST


On Sat, Apr 30, 2022 at 10:36:13PM +0100, Matthew Wilcox wrote:
> On Sat, Apr 30, 2022 at 01:11:43PM +0800, kernel test robot wrote:
> > >> fs/ntfs/aops.c:378:12: warning: stack frame size (2216) exceeds limit (1024) in 'ntfs_read_folio' [-Wframe-larger-than]
> > static int ntfs_read_folio(struct file *file, struct folio *folio)
> > ^
> > 1 warning generated.
>
> Am I getting this warning because I changed the name of the function?
> Or did I do something Bad?

I assume so. There have been other reports of high stack usage in this
function, which it seems Arnd narrowed down to 64K pages (or 256K pages
in this case):

https://lore.kernel.org/20210927141815.1711736-1-arnd@xxxxxxxxxx/

https://lore.kernel.org/202103280658.kByZmw5Q-lkp@xxxxxxxxx/

Cheers,
Nathan