* [kdave-btrfs-devel:dev/scrub-bw-sysfs 102/102] fs/btrfs/scrub.c:2001: undefined reference to `__udivdi3'
@ 2021-02-05 22:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-05 22:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3249 bytes --]
tree: https://github.com/kdave/btrfs-devel.git dev/scrub-bw-sysfs
head: 1139caf65b8afe72e9037879d61882e5b142b772
commit: 1139caf65b8afe72e9037879d61882e5b142b772 [102/102] btrfs: WIP scrub bandwidth control
config: i386-randconfig-a002-20210205 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/kdave/btrfs-devel/commit/1139caf65b8afe72e9037879d61882e5b142b772
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel dev/scrub-bw-sysfs
git checkout 1139caf65b8afe72e9037879d61882e5b142b772
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: fs/btrfs/scrub.o: in function `scrub_throttle':
>> fs/btrfs/scrub.c:2001: undefined reference to `__udivdi3'
>> ld: fs/btrfs/scrub.c:2017: undefined reference to `__divdi3'
vim +2001 fs/btrfs/scrub.c
1966
1967 /*
1968 * Throttling of IO submission, bandwidth-limit based, the timeslice is 1
1969 * second. Limit can be set via /sys/fs/UUID/devinfo/devid/scrub_speed_max.
1970 */
1971 static void scrub_throttle(struct scrub_ctx *sctx)
1972 {
1973 const int time_slice = 1000;
1974 struct scrub_bio *sbio;
1975 struct btrfs_device *device;
1976 s64 delta;
1977 ktime_t now;
1978 u32 div;
1979 u64 bwlimit;
1980
1981 sbio = sctx->bios[sctx->curr];
1982 device = sbio->dev;
1983 bwlimit = READ_ONCE(device->scrub_speed_max);
1984 if (bwlimit == 0)
1985 return;
1986
1987 div = max_t(u32, 1, (u32)(bwlimit / (16 * 1024 * 1024)));
1988 div = min_t(u32, 64, div);
1989
1990 /* Start new epoch */
1991 now = ktime_get();
1992 if (sctx->throttle_deadline == 0) {
1993 sctx->throttle_deadline = ktime_add_ms(now, time_slice / div);
1994 sctx->throttle_sent = 0;
1995 }
1996
1997 /* Still in the time to send? */
1998 if (ktime_before(now, sctx->throttle_deadline)) {
1999 /* If current bio is within the limit, send it */
2000 sctx->throttle_sent += sbio->bio->bi_iter.bi_size;
> 2001 if (sctx->throttle_sent <= bwlimit / div)
2002 return;
2003
2004 /* We're over the limit, sleep until the rest of the slice */
2005 delta = ktime_ms_delta(sctx->throttle_deadline, now);
2006 } else {
2007 /* New request after deadline, start new epoch */
2008 delta = 0;
2009 }
2010 #if 0
2011 printk_ratelimited(KERN_INFO "THROT: inflight %d delta %lld div %u time_slice %d sent %lluk bw %lluk\n",
2012 atomic_read(&sctx->bios_in_flight), delta, div, time_slice,
2013 sctx->throttle_sent / SZ_1K,
2014 bwlimit / SZ_1K);
2015 #endif
2016 if (delta)
> 2017 schedule_timeout_interruptible(delta * HZ / 1000);
2018 /* Next call will start the deadline period */
2019 sctx->throttle_deadline = 0;
2020 }
2021
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32839 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-05 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 22:07 [kdave-btrfs-devel:dev/scrub-bw-sysfs 102/102] fs/btrfs/scrub.c:2001: undefined reference to `__udivdi3' kernel test robot
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.