[kbuild] [block:for-5.13/drivers 46/61] drivers/md/bcache/nvm-pages.c:156:34: warning: Unsigned variable 'i' can't be negative so it is unnecessary to test it. [unsignedPositive]
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.13/drivers
head: b09729cbbbf28ecdc61f00335684f7566eb740ec
commit: 97c62b647fcabd86fe703f9869be7dd91e685f50 [46/61] bcache: initialization of the buddy
compiler: microblaze-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/md/bcache/nvm-pages.c:156:34: warning: Unsigned variable 'i' can't be negative so it is unnecessary to test it. [unsignedPositive]
for (i = BCH_MAX_ORDER - 1; i >= 0 ; i--) {
^
vim +156 drivers/md/bcache/nvm-pages.c
97c62b647fcabd Jianpeng Ma 2021-04-14 144 static void init_nvm_free_space(struct bch_nvm_namespace *ns)
97c62b647fcabd Jianpeng Ma 2021-04-14 145 {
97c62b647fcabd Jianpeng Ma 2021-04-14 146 unsigned int start, end, i;
^^^^^^^^^^^^ ^
97c62b647fcabd Jianpeng Ma 2021-04-14 147 struct page *page;
97c62b647fcabd Jianpeng Ma 2021-04-14 148 long long pages;
97c62b647fcabd Jianpeng Ma 2021-04-14 149 pgoff_t pgoff_start;
97c62b647fcabd Jianpeng Ma 2021-04-14 150
97c62b647fcabd Jianpeng Ma 2021-04-14 151 bitmap_for_each_clear_region(ns->pages_bitmap, start, end, 0, ns->pages_total) {
97c62b647fcabd Jianpeng Ma 2021-04-14 152 pgoff_start = start;
97c62b647fcabd Jianpeng Ma 2021-04-14 153 pages = end - start;
97c62b647fcabd Jianpeng Ma 2021-04-14 154
97c62b647fcabd Jianpeng Ma 2021-04-14 155 while (pages) {
97c62b647fcabd Jianpeng Ma 2021-04-14 @156 for (i = BCH_MAX_ORDER - 1; i >= 0 ; i--) {
^^^^^^
This needs to be "int i;" for the loop to work correctly.
97c62b647fcabd Jianpeng Ma 2021-04-14 157 if ((pgoff_start % (1 << i) == 0) && (pages >= (1 << i)))
97c62b647fcabd Jianpeng Ma 2021-04-14 158 break;
97c62b647fcabd Jianpeng Ma 2021-04-14 159 }
97c62b647fcabd Jianpeng Ma 2021-04-14 160
97c62b647fcabd Jianpeng Ma 2021-04-14 161 page = nvm_vaddr_to_page(ns, nvm_pgoff_to_vaddr(ns, pgoff_start));
97c62b647fcabd Jianpeng Ma 2021-04-14 162 page->index = pgoff_start;
97c62b647fcabd Jianpeng Ma 2021-04-14 163 set_page_private(page, i);
97c62b647fcabd Jianpeng Ma 2021-04-14 164 __SetPageBuddy(page);
97c62b647fcabd Jianpeng Ma 2021-04-14 165 list_add((struct list_head *)&page->zone_device_data, &ns->free_area[i]);
97c62b647fcabd Jianpeng Ma 2021-04-14 166
97c62b647fcabd Jianpeng Ma 2021-04-14 167 pgoff_start += 1 << i;
97c62b647fcabd Jianpeng Ma 2021-04-14 168 pages -= 1 << i;
97c62b647fcabd Jianpeng Ma 2021-04-14 169 }
97c62b647fcabd Jianpeng Ma 2021-04-14 170 }
688330711e9ae3 Jianpeng Ma 2021-04-14 171 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months
[linux-next:master 14017/14048] kernel/gcov/clang.c:296:21: error: implicit declaration of function 'vmalloc'
by kernel test robot
CC: Linux Memory Management List <linux-mm(a)kvack.org>
TO: Stephen Rothwell <sfr(a)canb.auug.org.au>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: 4acb07e6909af9ab0900fc15e781569fec4a0718 [14017/14048] Merge branch 'akpm-current/current'
config: powerpc-randconfig-r036-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 4acb07e6909af9ab0900fc15e781569fec4a0718
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/gcov/clang.c:82:6: warning: no previous prototype for function 'llvm_gcov_init' [-Wmissing-prototypes]
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
kernel/gcov/clang.c:82:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
static
kernel/gcov/clang.c:105:6: warning: no previous prototype for function 'llvm_gcda_start_file' [-Wmissing-prototypes]
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
kernel/gcov/clang.c:105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
static
kernel/gcov/clang.c:113:6: warning: no previous prototype for function 'llvm_gcda_emit_function' [-Wmissing-prototypes]
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
kernel/gcov/clang.c:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
static
kernel/gcov/clang.c:128:6: warning: no previous prototype for function 'llvm_gcda_emit_arcs' [-Wmissing-prototypes]
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
kernel/gcov/clang.c:128:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
static
kernel/gcov/clang.c:138:6: warning: no previous prototype for function 'llvm_gcda_summary_info' [-Wmissing-prototypes]
void llvm_gcda_summary_info(void)
^
kernel/gcov/clang.c:138:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_summary_info(void)
^
static
kernel/gcov/clang.c:143:6: warning: no previous prototype for function 'llvm_gcda_end_file' [-Wmissing-prototypes]
void llvm_gcda_end_file(void)
^
kernel/gcov/clang.c:143:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_end_file(void)
^
static
>> kernel/gcov/clang.c:296:21: error: implicit declaration of function 'vmalloc' [-Werror,-Wimplicit-function-declaration]
fn_dup->counters = vmalloc(cv_size);
^
kernel/gcov/clang.c:296:19: warning: incompatible integer to pointer conversion assigning to 'u64 *' (aka 'unsigned long long *') from 'int' [-Wint-conversion]
fn_dup->counters = vmalloc(cv_size);
^ ~~~~~~~~~~~~~~~~
7 warnings and 1 error generated.
vim +/vmalloc +296 kernel/gcov/clang.c
e178a5beb36960 Greg Hackmann 2019-05-14 285
60bcf728ee7c60 Nick Desaulniers 2021-03-24 286 static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 287 {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 288 size_t cv_size; /* counter values size */
60bcf728ee7c60 Nick Desaulniers 2021-03-24 289 struct gcov_fn_info *fn_dup = kmemdup(fn, sizeof(*fn),
60bcf728ee7c60 Nick Desaulniers 2021-03-24 290 GFP_KERNEL);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 291 if (!fn_dup)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 292 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 293 INIT_LIST_HEAD(&fn_dup->head);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 294
60bcf728ee7c60 Nick Desaulniers 2021-03-24 295 cv_size = fn->num_counters * sizeof(fn->counters[0]);
7af08140979a6e Linus Torvalds 2021-04-19 @296 fn_dup->counters = vmalloc(cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 297 if (!fn_dup->counters) {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 298 kfree(fn_dup);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 299 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 300 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 301
60bcf728ee7c60 Nick Desaulniers 2021-03-24 302 memcpy(fn_dup->counters, fn->counters, cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 303
60bcf728ee7c60 Nick Desaulniers 2021-03-24 304 return fn_dup;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 305 }
e178a5beb36960 Greg Hackmann 2019-05-14 306
:::::: The code at line 296 was first introduced by commit
:::::: 7af08140979a6e7e12b78c93b8625c8d25b084e2 Revert "gcov: clang: fix clang-11+ build"
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v3 10/10] iommu/arm-smmu: Reserve any RMR regions associated with a dev
by kernel test robot
Hi Shameer,
I love your patch! Yet something to improve:
[auto build test ERROR on pm/linux-next]
[also build test ERROR on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Shameer-Kolothum/ACPI-IORT-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arm-randconfig-r023-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/ea2019c2969e4e8f6ec2b0dc2d492f0d0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout ea2019c2969e4e8f6ec2b0dc2d492f0d05f36cd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:24:
include/linux/dma-iommu.h:94:71: warning: declaration of 'struct iommu_rmr' will not be visible outside of this function [-Wvisibility]
static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr,
^
include/linux/dma-iommu.h:100:1: error: expected identifier or '('
{
^
>> drivers/iommu/arm/arm-smmu/arm-smmu.c:1622:39: error: incompatible pointer types passing 'struct iommu_rmr *' to parameter of type 'struct iommu_rmr *' [-Werror,-Wincompatible-pointer-types]
iommu_dma_get_rmr_resv_regions(dev, rmr, head);
^~~
include/linux/dma-iommu.h:94:82: note: passing argument to parameter 'rmr' here
static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr,
^
1 warning and 2 errors generated.
vim +1622 drivers/iommu/arm/arm-smmu/arm-smmu.c
1609
1610 static void arm_smmu_rmr_get_resv_regions(struct device *dev,
1611 struct list_head *head)
1612 {
1613 struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev);
1614 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
1615 struct arm_smmu_device *smmu = cfg->smmu;
1616 struct iommu_rmr *rmr;
1617
1618 list_for_each_entry(rmr, &smmu->rmr_list, list) {
1619 if (!arm_smmu_dev_has_rmr(cfg, fwspec, rmr))
1620 continue;
1621
> 1622 iommu_dma_get_rmr_resv_regions(dev, rmr, head);
1623 }
1624 }
1625
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 13487/14048] drivers/spi/spi-stm32-qspi.c:481:75: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: 18674dee3cd651279eb3d9ba789fe483ddfe1137 [13487/14048] spi: stm32-qspi: Add dirmap support
config: powerpc64-randconfig-r003-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 18674dee3cd651279eb3d9ba789fe483ddfe1137
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/spi/spi-stm32-qspi.c:481:75: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
dev_dbg(qspi->dev, "%s len = 0x%x offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf);
~~ ^~~
%lx
include/linux/dev_printk.h:123:39: note: expanded from macro 'dev_dbg'
dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:162:19: note: expanded from macro 'dynamic_dev_dbg'
dev, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:147:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:129:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
1 warning generated.
vim +481 drivers/spi/spi-stm32-qspi.c
460
461 static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc,
462 u64 offs, size_t len, void *buf)
463 {
464 struct stm32_qspi *qspi = spi_controller_get_devdata(desc->mem->spi->master);
465 struct spi_mem_op op;
466 u32 addr_max;
467 int ret;
468
469 ret = pm_runtime_get_sync(qspi->dev);
470 if (ret < 0) {
471 pm_runtime_put_noidle(qspi->dev);
472 return ret;
473 }
474
475 mutex_lock(&qspi->lock);
476 /* make a local copy of desc op_tmpl and complete dirmap rdesc
477 * spi_mem_op template with offs, len and *buf in order to get
478 * all needed transfer information into struct spi_mem_op
479 */
480 memcpy(&op, &desc->info.op_tmpl, sizeof(struct spi_mem_op));
> 481 dev_dbg(qspi->dev, "%s len = 0x%x offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf);
482
483 op.data.nbytes = len;
484 op.addr.val = desc->info.offset + offs;
485 op.data.buf.in = buf;
486
487 addr_max = op.addr.val + op.data.nbytes + 1;
488 if (addr_max < qspi->mm_size && op.addr.buswidth)
489 qspi->fmode = CCR_FMODE_MM;
490 else
491 qspi->fmode = CCR_FMODE_INDR;
492
493 ret = stm32_qspi_send(desc->mem, &op);
494 mutex_unlock(&qspi->lock);
495
496 pm_runtime_mark_last_busy(qspi->dev);
497 pm_runtime_put_autosuspend(qspi->dev);
498
499 return ret ?: len;
500 }
501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 11564/14048] ld.lld: error: failed to write to the output file: No such file or directory
by kernel test robot
CC: Linux Memory Management List <linux-mm(a)kvack.org>
TO: Florian Westphal <fw(a)strlen.de>
CC: Pablo Neira Ayuso <pablo(a)netfilter.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: f6f2e580d5f7152fb5ab11232edecb7fbeca3759 [11564/14048] netfilter: conntrack: move expect counter to net_generic data
config: arm64-randconfig-r036-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f6f2e580d5f7152fb5ab11232edecb7fbeca3759
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 593ef1658ecf61d3619885bdbbcfffa3d1417891 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
>> ld.lld: error: failed to write to the output file: No such file or directory
#0 0x000055f052fa21ec llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cross/clang-ca8eef7e3d/bin/lld+0x99c1ec)
#1 0x000055f052fa0024 llvm::sys::RunSignalHandlers() (/opt/cross/clang-ca8eef7e3d/bin/lld+0x99a024)
#2 0x000055f052fa0183 SignalHandler(int) Signals.cpp:0:0
#3 0x00007fd282176140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#4 0x00007fd281c9ace1 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3bce1)
#5 0x00007fd281c84537 abort (/lib/x86_64-linux-gnu/libc.so.6+0x25537)
#6 0x00007fd28201e7ec (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x9a7ec)
#7 0x00007fd282029966 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5966)
#8 0x00007fd2820299d1 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa59d1)
#9 0x00007fd282029c65 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5c65)
#10 0x00007fd282021458 std::__throw_system_error(int) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x9d458)
#11 0x00007fd282053159 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xcf159)
#12 0x000055f055e90d91 std::thread::_State_impl<std::thread::_Invoker<std::tuple<llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::ThreadPoolExecutor(llvm::ThreadPoolStrategy)::'lambda'()> > >::_M_run() Parallel.cpp:0:0
#13 0x00007fd282052ed0 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xceed0)
#14 0x00007fd28216aea7 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8ea7)
#15 0x00007fd281d5cdef __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfddef)
/bin/bash: line 1: 75972 Aborted ld.lld -EL -maarch64elf -z norelro -r -o drivers/gpu/ipu-v3/imx-ipu-v3.o drivers/gpu/ipu-v3/ipu-common.o drivers/gpu/ipu-v3/ipu-cpmem.o drivers/gpu/ipu-v3/ipu-csi.o drivers/gpu/ipu-v3/ipu-dc.o drivers/gpu/ipu-v3/ipu-di.o drivers/gpu/ipu-v3/ipu-dp.o drivers/gpu/ipu-v3/ipu-dmfc.o drivers/gpu/ipu-v3/ipu-ic.o drivers/gpu/ipu-v3/ipu-ic-csc.o drivers/gpu/ipu-v3/ipu-image-convert.o drivers/gpu/ipu-v3/ipu-smfc.o drivers/gpu/ipu-v3/ipu-vdi.o drivers/gpu/ipu-v3/ipu-pre.o drivers/gpu/ipu-v3/ipu-prg.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 10419/14048] fs/ext4/mballoc.c:2614:1: warning: stack frame size of 2416 bytes in function 'ext4_mb_regular_allocator'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: 196e402adf2e4cd66f101923409f1970ec5f1af3 [10419/14048] ext4: improve cr 0 / cr 1 group scanning
config: powerpc-randconfig-r036-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 196e402adf2e4cd66f101923409f1970ec5f1af3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:63:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:65:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:67:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:69:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/ext4/mballoc.c:12:
In file included from fs/ext4/ext4_jbd2.h:16:
In file included from include/linux/jbd2.h:23:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:71:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/ext4/mballoc.c:2614:1: warning: stack frame size of 2416 bytes in function 'ext4_mb_regular_allocator' [-Wframe-larger-than=]
ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
^
13 warnings generated.
vim +/ext4_mb_regular_allocator +2614 fs/ext4/mballoc.c
cfd73237722135 Alex Zhuravlev 2020-04-21 2612
4ddfef7b41aebb Eric Sandeen 2008-04-29 2613 static noinline_for_stack int
4ddfef7b41aebb Eric Sandeen 2008-04-29 @2614 ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
c9de560ded61fa Alex Tomas 2008-01-29 2615 {
cfd73237722135 Alex Zhuravlev 2020-04-21 2616 ext4_group_t prefetch_grp = 0, ngroups, group, i;
bbc4ec77e9f9c7 Ritesh Harjani 2020-05-10 2617 int cr = -1;
42ac1848eac588 Lukas Czerner 2015-06-08 2618 int err = 0, first_err = 0;
cfd73237722135 Alex Zhuravlev 2020-04-21 2619 unsigned int nr = 0, prefetch_ios = 0;
c9de560ded61fa Alex Tomas 2008-01-29 2620 struct ext4_sb_info *sbi;
c9de560ded61fa Alex Tomas 2008-01-29 2621 struct super_block *sb;
c9de560ded61fa Alex Tomas 2008-01-29 2622 struct ext4_buddy e4b;
66d5e0277e225c brookxu 2020-08-17 2623 int lost;
c9de560ded61fa Alex Tomas 2008-01-29 2624
c9de560ded61fa Alex Tomas 2008-01-29 2625 sb = ac->ac_sb;
c9de560ded61fa Alex Tomas 2008-01-29 2626 sbi = EXT4_SB(sb);
8df9675f8b498d Theodore Ts'o 2009-05-01 2627 ngroups = ext4_get_groups_count(sb);
fb0a387dcdcd21 Eric Sandeen 2009-09-16 2628 /* non-extent files are limited to low blocks/groups */
12e9b892002d9a Dmitry Monakhov 2010-05-16 2629 if (!(ext4_test_inode_flag(ac->ac_inode, EXT4_INODE_EXTENTS)))
fb0a387dcdcd21 Eric Sandeen 2009-09-16 2630 ngroups = sbi->s_blockfile_groups;
fb0a387dcdcd21 Eric Sandeen 2009-09-16 2631
c9de560ded61fa Alex Tomas 2008-01-29 2632 BUG_ON(ac->ac_status == AC_STATUS_FOUND);
c9de560ded61fa Alex Tomas 2008-01-29 2633
c9de560ded61fa Alex Tomas 2008-01-29 2634 /* first, try the goal */
c9de560ded61fa Alex Tomas 2008-01-29 2635 err = ext4_mb_find_by_goal(ac, &e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2636 if (err || ac->ac_status == AC_STATUS_FOUND)
c9de560ded61fa Alex Tomas 2008-01-29 2637 goto out;
c9de560ded61fa Alex Tomas 2008-01-29 2638
c9de560ded61fa Alex Tomas 2008-01-29 2639 if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
c9de560ded61fa Alex Tomas 2008-01-29 2640 goto out;
c9de560ded61fa Alex Tomas 2008-01-29 2641
c9de560ded61fa Alex Tomas 2008-01-29 2642 /*
e9a3cd48d65307 brookxu 2020-08-07 2643 * ac->ac_2order is set only if the fe_len is a power of 2
e9a3cd48d65307 brookxu 2020-08-07 2644 * if ac->ac_2order is set we also set criteria to 0 so that we
c9de560ded61fa Alex Tomas 2008-01-29 2645 * try exact allocation using buddy.
c9de560ded61fa Alex Tomas 2008-01-29 2646 */
c9de560ded61fa Alex Tomas 2008-01-29 2647 i = fls(ac->ac_g_ex.fe_len);
c9de560ded61fa Alex Tomas 2008-01-29 2648 ac->ac_2order = 0;
c9de560ded61fa Alex Tomas 2008-01-29 2649 /*
c9de560ded61fa Alex Tomas 2008-01-29 2650 * We search using buddy data only if the order of the request
c9de560ded61fa Alex Tomas 2008-01-29 2651 * is greater than equal to the sbi_s_mb_order2_reqs
b713a5ec55bf73 Theodore Ts'o 2009-03-31 2652 * You can tune it via /sys/fs/ext4/<partition>/mb_order2_req
d9b22cf9f5466a Jan Kara 2017-02-10 2653 * We also support searching for power-of-two requests only for
d9b22cf9f5466a Jan Kara 2017-02-10 2654 * requests upto maximum buddy size we have constructed.
c9de560ded61fa Alex Tomas 2008-01-29 2655 */
4b68f6df105966 Harshad Shirwadkar 2021-04-01 2656 if (i >= sbi->s_mb_order2_reqs && i <= MB_NUM_ORDERS(sb)) {
c9de560ded61fa Alex Tomas 2008-01-29 2657 /*
c9de560ded61fa Alex Tomas 2008-01-29 2658 * This should tell if fe_len is exactly power of 2
c9de560ded61fa Alex Tomas 2008-01-29 2659 */
c9de560ded61fa Alex Tomas 2008-01-29 2660 if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0)
1a5d5e5d51e75a Jeremy Cline 2018-08-02 2661 ac->ac_2order = array_index_nospec(i - 1,
4b68f6df105966 Harshad Shirwadkar 2021-04-01 2662 MB_NUM_ORDERS(sb));
c9de560ded61fa Alex Tomas 2008-01-29 2663 }
c9de560ded61fa Alex Tomas 2008-01-29 2664
4ba74d00a20256 Theodore Ts'o 2009-08-09 2665 /* if stream allocation is enabled, use global goal */
4ba74d00a20256 Theodore Ts'o 2009-08-09 2666 if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
c9de560ded61fa Alex Tomas 2008-01-29 2667 /* TBD: may be hot point */
c9de560ded61fa Alex Tomas 2008-01-29 2668 spin_lock(&sbi->s_md_lock);
c9de560ded61fa Alex Tomas 2008-01-29 2669 ac->ac_g_ex.fe_group = sbi->s_mb_last_group;
c9de560ded61fa Alex Tomas 2008-01-29 2670 ac->ac_g_ex.fe_start = sbi->s_mb_last_start;
c9de560ded61fa Alex Tomas 2008-01-29 2671 spin_unlock(&sbi->s_md_lock);
c9de560ded61fa Alex Tomas 2008-01-29 2672 }
4ba74d00a20256 Theodore Ts'o 2009-08-09 2673
c9de560ded61fa Alex Tomas 2008-01-29 2674 /* Let's just scan groups to find more-less suitable blocks */
c9de560ded61fa Alex Tomas 2008-01-29 2675 cr = ac->ac_2order ? 0 : 1;
c9de560ded61fa Alex Tomas 2008-01-29 2676 /*
c9de560ded61fa Alex Tomas 2008-01-29 2677 * cr == 0 try to get exact allocation,
c9de560ded61fa Alex Tomas 2008-01-29 2678 * cr == 3 try to get anything
c9de560ded61fa Alex Tomas 2008-01-29 2679 */
c9de560ded61fa Alex Tomas 2008-01-29 2680 repeat:
c9de560ded61fa Alex Tomas 2008-01-29 2681 for (; cr < 4 && ac->ac_status == AC_STATUS_CONTINUE; cr++) {
c9de560ded61fa Alex Tomas 2008-01-29 2682 ac->ac_criteria = cr;
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2683 /*
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2684 * searching for the right group start
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2685 * from the goal value specified
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2686 */
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2687 group = ac->ac_g_ex.fe_group;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2688 ac->ac_last_optimal_group = group;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2689 ac->ac_groups_linear_remaining = sbi->s_mb_max_linear_groups;
cfd73237722135 Alex Zhuravlev 2020-04-21 2690 prefetch_grp = group;
ed8f9c751feb3a Aneesh Kumar K.V 2008-07-11 2691
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2692 for (i = 0; i < ngroups; group = next_linear_group(ac, group, ngroups),
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2693 i++) {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2694 int ret = 0, new_cr;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2695
2ed5724d5a78a2 Theodore Ts'o 2013-06-12 2696 cond_resched();
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2697
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2698 ext4_mb_choose_next_group(ac, &new_cr, &group, ngroups);
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2699 if (new_cr != cr) {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2700 cr = new_cr;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2701 goto repeat;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 2702 }
c9de560ded61fa Alex Tomas 2008-01-29 2703
cfd73237722135 Alex Zhuravlev 2020-04-21 2704 /*
cfd73237722135 Alex Zhuravlev 2020-04-21 2705 * Batch reads of the block allocation bitmaps
cfd73237722135 Alex Zhuravlev 2020-04-21 2706 * to get multiple READs in flight; limit
cfd73237722135 Alex Zhuravlev 2020-04-21 2707 * prefetching at cr=0/1, otherwise mballoc can
cfd73237722135 Alex Zhuravlev 2020-04-21 2708 * spend a lot of time loading imperfect groups
cfd73237722135 Alex Zhuravlev 2020-04-21 2709 */
cfd73237722135 Alex Zhuravlev 2020-04-21 2710 if ((prefetch_grp == group) &&
cfd73237722135 Alex Zhuravlev 2020-04-21 2711 (cr > 1 ||
cfd73237722135 Alex Zhuravlev 2020-04-21 2712 prefetch_ios < sbi->s_mb_prefetch_limit)) {
cfd73237722135 Alex Zhuravlev 2020-04-21 2713 unsigned int curr_ios = prefetch_ios;
cfd73237722135 Alex Zhuravlev 2020-04-21 2714
cfd73237722135 Alex Zhuravlev 2020-04-21 2715 nr = sbi->s_mb_prefetch;
cfd73237722135 Alex Zhuravlev 2020-04-21 2716 if (ext4_has_feature_flex_bg(sb)) {
82ef1370b0c175 Chunguang Xu 2020-12-04 2717 nr = 1 << sbi->s_log_groups_per_flex;
82ef1370b0c175 Chunguang Xu 2020-12-04 2718 nr -= group & (nr - 1);
82ef1370b0c175 Chunguang Xu 2020-12-04 2719 nr = min(nr, sbi->s_mb_prefetch);
cfd73237722135 Alex Zhuravlev 2020-04-21 2720 }
cfd73237722135 Alex Zhuravlev 2020-04-21 2721 prefetch_grp = ext4_mb_prefetch(sb, group,
cfd73237722135 Alex Zhuravlev 2020-04-21 2722 nr, &prefetch_ios);
cfd73237722135 Alex Zhuravlev 2020-04-21 2723 if (prefetch_ios == curr_ios)
cfd73237722135 Alex Zhuravlev 2020-04-21 2724 nr = 0;
cfd73237722135 Alex Zhuravlev 2020-04-21 2725 }
cfd73237722135 Alex Zhuravlev 2020-04-21 2726
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2727 /* This now checks without needing the buddy page */
8ef123fe02ca09 Ritesh Harjani 2020-05-20 2728 ret = ext4_mb_good_group_nolock(ac, group, cr);
42ac1848eac588 Lukas Czerner 2015-06-08 2729 if (ret <= 0) {
42ac1848eac588 Lukas Czerner 2015-06-08 2730 if (!first_err)
42ac1848eac588 Lukas Czerner 2015-06-08 2731 first_err = ret;
c9de560ded61fa Alex Tomas 2008-01-29 2732 continue;
42ac1848eac588 Lukas Czerner 2015-06-08 2733 }
c9de560ded61fa Alex Tomas 2008-01-29 2734
c9de560ded61fa Alex Tomas 2008-01-29 2735 err = ext4_mb_load_buddy(sb, group, &e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2736 if (err)
c9de560ded61fa Alex Tomas 2008-01-29 2737 goto out;
c9de560ded61fa Alex Tomas 2008-01-29 2738
c9de560ded61fa Alex Tomas 2008-01-29 2739 ext4_lock_group(sb, group);
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2740
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2741 /*
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2742 * We need to check again after locking the
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2743 * block group
8a57d9d61a6e36 Curt Wohlgemuth 2010-05-16 2744 */
42ac1848eac588 Lukas Czerner 2015-06-08 2745 ret = ext4_mb_good_group(ac, group, cr);
8ef123fe02ca09 Ritesh Harjani 2020-05-20 2746 if (ret == 0) {
c9de560ded61fa Alex Tomas 2008-01-29 2747 ext4_unlock_group(sb, group);
e39e07fdfd98be Jing Zhang 2010-05-14 2748 ext4_mb_unload_buddy(&e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2749 continue;
c9de560ded61fa Alex Tomas 2008-01-29 2750 }
c9de560ded61fa Alex Tomas 2008-01-29 2751
c9de560ded61fa Alex Tomas 2008-01-29 2752 ac->ac_groups_scanned++;
d9b22cf9f5466a Jan Kara 2017-02-10 2753 if (cr == 0)
c9de560ded61fa Alex Tomas 2008-01-29 2754 ext4_mb_simple_scan_group(ac, &e4b);
506bf2d82165c0 Eric Sandeen 2010-07-27 2755 else if (cr == 1 && sbi->s_stripe &&
506bf2d82165c0 Eric Sandeen 2010-07-27 2756 !(ac->ac_g_ex.fe_len % sbi->s_stripe))
c9de560ded61fa Alex Tomas 2008-01-29 2757 ext4_mb_scan_aligned(ac, &e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2758 else
c9de560ded61fa Alex Tomas 2008-01-29 2759 ext4_mb_complex_scan_group(ac, &e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2760
c9de560ded61fa Alex Tomas 2008-01-29 2761 ext4_unlock_group(sb, group);
e39e07fdfd98be Jing Zhang 2010-05-14 2762 ext4_mb_unload_buddy(&e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2763
c9de560ded61fa Alex Tomas 2008-01-29 2764 if (ac->ac_status != AC_STATUS_CONTINUE)
c9de560ded61fa Alex Tomas 2008-01-29 2765 break;
c9de560ded61fa Alex Tomas 2008-01-29 2766 }
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2767 /* Processed all groups and haven't found blocks */
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2768 if (sbi->s_mb_stats && i == ngroups)
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2769 atomic64_inc(&sbi->s_bal_cX_failed[cr]);
c9de560ded61fa Alex Tomas 2008-01-29 2770 }
c9de560ded61fa Alex Tomas 2008-01-29 2771
c9de560ded61fa Alex Tomas 2008-01-29 2772 if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND &&
c9de560ded61fa Alex Tomas 2008-01-29 2773 !(ac->ac_flags & EXT4_MB_HINT_FIRST)) {
c9de560ded61fa Alex Tomas 2008-01-29 2774 /*
c9de560ded61fa Alex Tomas 2008-01-29 2775 * We've been searching too long. Let's try to allocate
c9de560ded61fa Alex Tomas 2008-01-29 2776 * the best chunk we've found so far
c9de560ded61fa Alex Tomas 2008-01-29 2777 */
c9de560ded61fa Alex Tomas 2008-01-29 2778 ext4_mb_try_best_found(ac, &e4b);
c9de560ded61fa Alex Tomas 2008-01-29 2779 if (ac->ac_status != AC_STATUS_FOUND) {
c9de560ded61fa Alex Tomas 2008-01-29 2780 /*
c9de560ded61fa Alex Tomas 2008-01-29 2781 * Someone more lucky has already allocated it.
c9de560ded61fa Alex Tomas 2008-01-29 2782 * The only thing we can do is just take first
c9de560ded61fa Alex Tomas 2008-01-29 2783 * found block(s)
c9de560ded61fa Alex Tomas 2008-01-29 2784 */
66d5e0277e225c brookxu 2020-08-17 2785 lost = atomic_inc_return(&sbi->s_mb_lost_chunks);
66d5e0277e225c brookxu 2020-08-17 2786 mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n",
c55ee7d202857b brookxu 2020-08-15 2787 ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start,
c55ee7d202857b brookxu 2020-08-15 2788 ac->ac_b_ex.fe_len, lost);
c55ee7d202857b brookxu 2020-08-15 2789
c9de560ded61fa Alex Tomas 2008-01-29 2790 ac->ac_b_ex.fe_group = 0;
c9de560ded61fa Alex Tomas 2008-01-29 2791 ac->ac_b_ex.fe_start = 0;
c9de560ded61fa Alex Tomas 2008-01-29 2792 ac->ac_b_ex.fe_len = 0;
c9de560ded61fa Alex Tomas 2008-01-29 2793 ac->ac_status = AC_STATUS_CONTINUE;
c9de560ded61fa Alex Tomas 2008-01-29 2794 ac->ac_flags |= EXT4_MB_HINT_FIRST;
c9de560ded61fa Alex Tomas 2008-01-29 2795 cr = 3;
c9de560ded61fa Alex Tomas 2008-01-29 2796 goto repeat;
c9de560ded61fa Alex Tomas 2008-01-29 2797 }
c9de560ded61fa Alex Tomas 2008-01-29 2798 }
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2799
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2800 if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND)
a6c75eaf11032f Harshad Shirwadkar 2021-04-01 2801 atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]);
c9de560ded61fa Alex Tomas 2008-01-29 2802 out:
42ac1848eac588 Lukas Czerner 2015-06-08 2803 if (!err && ac->ac_status != AC_STATUS_FOUND && first_err)
42ac1848eac588 Lukas Czerner 2015-06-08 2804 err = first_err;
bbc4ec77e9f9c7 Ritesh Harjani 2020-05-10 2805
d3df14535f4a5b Ritesh Harjani 2020-05-10 2806 mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n",
bbc4ec77e9f9c7 Ritesh Harjani 2020-05-10 2807 ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status,
bbc4ec77e9f9c7 Ritesh Harjani 2020-05-10 2808 ac->ac_flags, cr, err);
cfd73237722135 Alex Zhuravlev 2020-04-21 2809
cfd73237722135 Alex Zhuravlev 2020-04-21 2810 if (nr)
cfd73237722135 Alex Zhuravlev 2020-04-21 2811 ext4_mb_prefetch_fini(sb, prefetch_grp, nr);
cfd73237722135 Alex Zhuravlev 2020-04-21 2812
c9de560ded61fa Alex Tomas 2008-01-29 2813 return err;
c9de560ded61fa Alex Tomas 2008-01-29 2814 }
c9de560ded61fa Alex Tomas 2008-01-29 2815
:::::: The code at line 2614 was first introduced by commit
:::::: 4ddfef7b41aebbbede73f361cb938800ba3072dc ext4: reduce mballoc stack usage with noinline_for_stack
:::::: TO: Eric Sandeen <sandeen(a)redhat.com>
:::::: CC: Theodore Ts'o <tytso(a)mit.edu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months