[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103232105.XZOuwGcM-lkp@intel.com>
Date: Tue, 23 Mar 2021 21:15:09 +0800
From: kernel test robot <lkp@...el.com>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: fs/io_uring.c:6897:12: warning: stack frame size of 1072 bytes in
function 'io_submit_sqes'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84196390620ac0e5070ae36af84c137c6216a7dc
commit: a1ab7b35db8f262cd74edff62b47b4d90f84f997 io_uring: move req link into submit_state
date: 5 weeks ago
config: mips-randconfig-r023-20210322 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 14696baaf4c43fe53f738bc292bbe169eed93d5d)
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=a1ab7b35db8f262cd74edff62b47b4d90f84f997
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a1ab7b35db8f262cd74edff62b47b4d90f84f997
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> fs/io_uring.c:6897:12: warning: stack frame size of 1072 bytes in function 'io_submit_sqes' [-Wframe-larger-than=]
static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr)
^
1 warning generated.
vim +/io_submit_sqes +6897 fs/io_uring.c
709b302faddfac Pavel Begunkov 2020-04-08 6896
0f2122045b9462 Jens Axboe 2020-09-13 @6897 static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr)
6c271ce2f1d572 Jens Axboe 2019-01-10 6898 {
46c4e16a8625f7 Pavel Begunkov 2021-02-18 6899 int submitted = 0;
6c271ce2f1d572 Jens Axboe 2019-01-10 6900
c4a2ed72c9a615 Jens Axboe 2019-11-21 6901 /* if we have a backlog and couldn't flush it all, return BUSY */
ad3eb2c89fb24d Jens Axboe 2019-12-18 6902 if (test_bit(0, &ctx->sq_check_overflow)) {
6c503150ae33ee Pavel Begunkov 2021-01-04 6903 if (!__io_cqring_overflow_flush(ctx, false, NULL, NULL))
1d7bb1d50fb4dc Jens Axboe 2019-11-06 6904 return -EBUSY;
ad3eb2c89fb24d Jens Axboe 2019-12-18 6905 }
6c271ce2f1d572 Jens Axboe 2019-01-10 6906
ee7d46d9db19de Pavel Begunkov 2019-12-30 6907 /* make sure SQ entry isn't read before tail */
ee7d46d9db19de Pavel Begunkov 2019-12-30 6908 nr = min3(nr, ctx->sq_entries, io_sqring_entries(ctx));
9ef4f124894b7b Pavel Begunkov 2019-12-30 6909
2b85edfc0c90ef Pavel Begunkov 2019-12-28 6910 if (!percpu_ref_tryget_many(&ctx->refs, nr))
2b85edfc0c90ef Pavel Begunkov 2019-12-28 6911 return -EAGAIN;
6c271ce2f1d572 Jens Axboe 2019-01-10 6912
d8a6df10aac9f2 Jens Axboe 2020-10-15 6913 percpu_counter_add(¤t->io_uring->inflight, nr);
faf7b51c06973f Jens Axboe 2020-10-07 6914 refcount_add(nr, ¤t->usage);
ba88ff112bdfde Pavel Begunkov 2021-02-10 6915 io_submit_state_start(&ctx->submit_state, nr);
b14cca0c84c760 Pavel Begunkov 2020-01-17 6916
46c4e16a8625f7 Pavel Begunkov 2021-02-18 6917 while (submitted < nr) {
3529d8c2b353e6 Jens Axboe 2019-12-19 6918 const struct io_uring_sqe *sqe;
196be95cd55720 Pavel Begunkov 2019-11-07 6919 struct io_kiocb *req;
fb5ccc98782f65 Pavel Begunkov 2019-10-25 6920
258b29a93bfe74 Pavel Begunkov 2021-02-10 6921 req = io_alloc_req(ctx);
196be95cd55720 Pavel Begunkov 2019-11-07 6922 if (unlikely(!req)) {
196be95cd55720 Pavel Begunkov 2019-11-07 6923 if (!submitted)
196be95cd55720 Pavel Begunkov 2019-11-07 6924 submitted = -EAGAIN;
fb5ccc98782f65 Pavel Begunkov 2019-10-25 6925 break;
196be95cd55720 Pavel Begunkov 2019-11-07 6926 }
4fccfcbb733794 Pavel Begunkov 2021-02-12 6927 sqe = io_get_sqe(ctx);
4fccfcbb733794 Pavel Begunkov 2021-02-12 6928 if (unlikely(!sqe)) {
4fccfcbb733794 Pavel Begunkov 2021-02-12 6929 kmem_cache_free(req_cachep, req);
4fccfcbb733794 Pavel Begunkov 2021-02-12 6930 break;
4fccfcbb733794 Pavel Begunkov 2021-02-12 6931 }
d3656344fea033 Jens Axboe 2019-12-18 6932 /* will complete beyond this point, count as submitted */
d3656344fea033 Jens Axboe 2019-12-18 6933 submitted++;
a1ab7b35db8f26 Pavel Begunkov 2021-02-18 6934 if (io_submit_sqe(ctx, req, sqe))
fb5ccc98782f65 Pavel Begunkov 2019-10-25 6935 break;
196be95cd55720 Pavel Begunkov 2019-11-07 6936 }
fb5ccc98782f65 Pavel Begunkov 2019-10-25 6937
9466f43741bc08 Pavel Begunkov 2020-01-25 6938 if (unlikely(submitted != nr)) {
9466f43741bc08 Pavel Begunkov 2020-01-25 6939 int ref_used = (submitted == -EAGAIN) ? 0 : submitted;
d8a6df10aac9f2 Jens Axboe 2020-10-15 6940 struct io_uring_task *tctx = current->io_uring;
d8a6df10aac9f2 Jens Axboe 2020-10-15 6941 int unused = nr - ref_used;
9466f43741bc08 Pavel Begunkov 2020-01-25 6942
d8a6df10aac9f2 Jens Axboe 2020-10-15 6943 percpu_ref_put_many(&ctx->refs, unused);
d8a6df10aac9f2 Jens Axboe 2020-10-15 6944 percpu_counter_sub(&tctx->inflight, unused);
d8a6df10aac9f2 Jens Axboe 2020-10-15 6945 put_task_struct_many(current, unused);
9466f43741bc08 Pavel Begunkov 2020-01-25 6946 }
6c271ce2f1d572 Jens Axboe 2019-01-10 6947
a1ab7b35db8f26 Pavel Begunkov 2021-02-18 6948 io_submit_state_end(&ctx->submit_state, ctx);
ae9428ca61271b Pavel Begunkov 2019-11-06 6949 /* Commit SQ ring head once we've consumed and submitted all SQEs */
ae9428ca61271b Pavel Begunkov 2019-11-06 6950 io_commit_sqring(ctx);
ae9428ca61271b Pavel Begunkov 2019-11-06 6951
6c271ce2f1d572 Jens Axboe 2019-01-10 6952 return submitted;
6c271ce2f1d572 Jens Axboe 2019-01-10 6953 }
6c271ce2f1d572 Jens Axboe 2019-01-10 6954
:::::: The code at line 6897 was first introduced by commit
:::::: 0f2122045b946241a9e549c2a76cea54fa58a7ff io_uring: don't rely on weak ->files references
:::::: TO: Jens Axboe <axboe@...nel.dk>
:::::: CC: Jens Axboe <axboe@...nel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33429 bytes)
Powered by blists - more mailing lists