From: kernel test robot <lkp@intel.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan'
Date: Fri, 26 Nov 2021 20:39:03 +0800 [thread overview]
Message-ID: <202111262010.UBcefCrE-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a4849f6000e29235a2707f22e39da6b897bb9543
commit: 2b5067a8143e34aa3fa57a20fb8a3c40d905f942 mm: mmap_lock: add tracepoints around lock acquisition
date: 12 months ago
config: mips-randconfig-r013-20211124 (https://download.01.org/0day-ci/archive/20211126/202111262010.UBcefCrE-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c45def8a75061203461ab0060c75c864df1c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b5067a8143e34aa3fa57a20fb8a3c40d905f942
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2b5067a8143e34aa3fa57a20fb8a3c40d905f942
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan' [-Wframe-larger-than]
static void khugepaged_do_scan(void)
^
1 warning generated.
Assembler messages:
Warning: a different -march was already specified, is now octeon
vim +/khugepaged_do_scan +2181 mm/khugepaged.c
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2180
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 @2181 static void khugepaged_do_scan(void)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2182 {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2183 struct page *hpage = NULL;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2184 unsigned int progress = 0, pass_through_head = 0;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2185 unsigned int pages = khugepaged_pages_to_scan;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2186 bool wait = true;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2187
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2188 barrier(); /* write khugepaged_pages_to_scan to local stack */
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2189
a980df33e9351e Kirill A. Shutemov 2020-06-03 2190 lru_add_drain_all();
a980df33e9351e Kirill A. Shutemov 2020-06-03 2191
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2192 while (progress < pages) {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2193 if (!khugepaged_prealloc_page(&hpage, &wait))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2194 break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2195
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2196 cond_resched();
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2197
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2198 if (unlikely(kthread_should_stop() || try_to_freeze()))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2199 break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2200
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2201 spin_lock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2202 if (!khugepaged_scan.mm_slot)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2203 pass_through_head++;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2204 if (khugepaged_has_work() &&
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2205 pass_through_head < 2)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2206 progress += khugepaged_scan_mm_slot(pages - progress,
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2207 &hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2208 else
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2209 progress = pages;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2210 spin_unlock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2211 }
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2212
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2213 if (!IS_ERR_OR_NULL(hpage))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2214 put_page(hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2215 }
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2216
:::::: The code at line 2181 was first introduced by commit
:::::: b46e756f5e47031c67658ff036e5ffe27062fa43 thp: extract khugepaged from mm/huge_memory.c
:::::: TO: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan'
Date: Fri, 26 Nov 2021 20:39:03 +0800 [thread overview]
Message-ID: <202111262010.UBcefCrE-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4937 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a4849f6000e29235a2707f22e39da6b897bb9543
commit: 2b5067a8143e34aa3fa57a20fb8a3c40d905f942 mm: mmap_lock: add tracepoints around lock acquisition
date: 12 months ago
config: mips-randconfig-r013-20211124 (https://download.01.org/0day-ci/archive/20211126/202111262010.UBcefCrE-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c45def8a75061203461ab0060c75c864df1c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b5067a8143e34aa3fa57a20fb8a3c40d905f942
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2b5067a8143e34aa3fa57a20fb8a3c40d905f942
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan' [-Wframe-larger-than]
static void khugepaged_do_scan(void)
^
1 warning generated.
Assembler messages:
Warning: a different -march was already specified, is now octeon
vim +/khugepaged_do_scan +2181 mm/khugepaged.c
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2180
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 @2181 static void khugepaged_do_scan(void)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2182 {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2183 struct page *hpage = NULL;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2184 unsigned int progress = 0, pass_through_head = 0;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2185 unsigned int pages = khugepaged_pages_to_scan;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2186 bool wait = true;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2187
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2188 barrier(); /* write khugepaged_pages_to_scan to local stack */
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2189
a980df33e9351e Kirill A. Shutemov 2020-06-03 2190 lru_add_drain_all();
a980df33e9351e Kirill A. Shutemov 2020-06-03 2191
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2192 while (progress < pages) {
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2193 if (!khugepaged_prealloc_page(&hpage, &wait))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2194 break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2195
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2196 cond_resched();
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2197
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2198 if (unlikely(kthread_should_stop() || try_to_freeze()))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2199 break;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2200
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2201 spin_lock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2202 if (!khugepaged_scan.mm_slot)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2203 pass_through_head++;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2204 if (khugepaged_has_work() &&
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2205 pass_through_head < 2)
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2206 progress += khugepaged_scan_mm_slot(pages - progress,
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2207 &hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2208 else
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2209 progress = pages;
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2210 spin_unlock(&khugepaged_mm_lock);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2211 }
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2212
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2213 if (!IS_ERR_OR_NULL(hpage))
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2214 put_page(hpage);
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2215 }
b46e756f5e4703 Kirill A. Shutemov 2016-07-26 2216
:::::: The code@line 2181 was first introduced by commit
:::::: b46e756f5e47031c67658ff036e5ffe27062fa43 thp: extract khugepaged from mm/huge_memory.c
:::::: TO: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-11-26 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 12:39 kernel test robot [this message]
2021-11-26 12:39 ` mm/khugepaged.c:2181:13: warning: stack frame size (3808) exceeds limit (2048) in 'khugepaged_do_scan' kernel test robot
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=202111262010.UBcefCrE-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.