[cgroup:review-iow 17/17] block/blk-ioweight.c:1698:19: error: 'inuse_reset' undeclared; did you mean 'ipvs_reset'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-iow
head:   e2209ac1daf46cd980f6b912c30a910a78f7da24
commit: e2209ac1daf46cd980f6b912c30a910a78f7da24 [17/17] [RFC] blkcg: implement BPF_PROG_TYPE_IO_COST
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e2209ac1daf46cd980f6b912c30a910a78f7da24
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   block/blk-ioweight.c:289:24: warning: integer overflow in expression [-Woverflow]
     AUTOP_CYCLE_NSEC = 10 * NSEC_PER_SEC,
                           ^
   block/blk-ioweight.c:587:4: warning: this decimal constant is unsigned only in ISO C90
       [I_LCOEF_RBPS]  =    2338259289,
       ^
   block/blk-ioweight.c: In function 'iowg_activate':
   block/blk-ioweight.c:1081:2: error: implicit declaration of function 'TRACE_IOWG_PATH' [-Werror=implicit-function-declaration]
     TRACE_IOWG_PATH(iowg_activate, iowg, now,
     ^~~~~~~~~~~~~~~
   block/blk-ioweight.c: In function 'iow_timer_fn':
   block/blk-ioweight.c:1438:21: error: 'inuse_takeback' undeclared (first use in this function); did you mean 'inode_trylock'?
        TRACE_IOWG_PATH(inuse_takeback, iowg, &now,
                        ^~~~~~~~~~~~~~
                        inode_trylock
   block/blk-ioweight.c:1438:21: note: each undeclared identifier is reported only once for each function it appears in
   block/blk-ioweight.c:1479:20: error: 'inuse_giveaway' undeclared (first use in this function); did you mean 'inuse_takeback'?
       TRACE_IOWG_PATH(inuse_giveaway, iowg, &now,
                       ^~~~~~~~~~~~~~
                       inuse_takeback
   block/blk-ioweight.c: In function 'iow_rqos_throttle':
>> block/blk-ioweight.c:1698:19: error: 'inuse_reset' undeclared (first use in this function); did you mean 'ipvs_reset'?
      TRACE_IOWG_PATH(inuse_reset, iowg, &now,
                      ^~~~~~~~~~~
                      ipvs_reset
   At top level:
   block/blk-ioweight.c:629:20: warning: 'iow_name' defined but not used [-Wunused-function]
    static const char *iow_name(struct iow *iow)
                       ^~~~~~~~
   cc1: some warnings being treated as errors

vim +1698 block/blk-ioweight.c

3ddd9fc7 Tejun Heo 2019-06-13  1667  
3ddd9fc7 Tejun Heo 2019-06-13  1668  static void iow_rqos_throttle(struct rq_qos *rqos, struct bio *bio)
3ddd9fc7 Tejun Heo 2019-06-13  1669  {
3ddd9fc7 Tejun Heo 2019-06-13  1670  	struct blkcg_gq *blkg = bio->bi_blkg;
3ddd9fc7 Tejun Heo 2019-06-13  1671  	struct iow *iow = rqos_to_iow(rqos);
3ddd9fc7 Tejun Heo 2019-06-13  1672  	struct iow_gq *iowg = blkg_to_iowg(blkg);
3ddd9fc7 Tejun Heo 2019-06-13  1673  	struct iow_now now;
3ddd9fc7 Tejun Heo 2019-06-13  1674  	struct iowg_wait wait;
3ddd9fc7 Tejun Heo 2019-06-13  1675  	u32 hw_active, hw_inuse;
3ddd9fc7 Tejun Heo 2019-06-13  1676  	u64 abs_cost, cost, vtime;
3ddd9fc7 Tejun Heo 2019-06-13  1677  
3ddd9fc7 Tejun Heo 2019-06-13  1678  	/* bypass IOs if disabled or for root cgroup */
3ddd9fc7 Tejun Heo 2019-06-13  1679  	if (!iow->enabled || !iowg->level)
3ddd9fc7 Tejun Heo 2019-06-13  1680  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1681  
3ddd9fc7 Tejun Heo 2019-06-13  1682  	/* always activate so that even 0 cost IOs get protected to some level */
3ddd9fc7 Tejun Heo 2019-06-13  1683  	if (!iowg_activate(iowg, &now))
3ddd9fc7 Tejun Heo 2019-06-13  1684  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1685  
3ddd9fc7 Tejun Heo 2019-06-13  1686  	/* calculate the absolute vtime cost */
3ddd9fc7 Tejun Heo 2019-06-13  1687  	abs_cost = calc_vtime_cost(bio, iowg, false);
3ddd9fc7 Tejun Heo 2019-06-13  1688  	if (!abs_cost)
3ddd9fc7 Tejun Heo 2019-06-13  1689  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1690  
3ddd9fc7 Tejun Heo 2019-06-13  1691  	iowg->cursor = bio_end_sector(bio);
3ddd9fc7 Tejun Heo 2019-06-13  1692  
3ddd9fc7 Tejun Heo 2019-06-13  1693  	vtime = atomic64_read(&iowg->vtime);
3ddd9fc7 Tejun Heo 2019-06-13  1694  	current_hweight(iowg, &hw_active, &hw_inuse);
3ddd9fc7 Tejun Heo 2019-06-13  1695  
3ddd9fc7 Tejun Heo 2019-06-13  1696  	if (hw_inuse < hw_active &&
3ddd9fc7 Tejun Heo 2019-06-13  1697  	    time_after_eq64(vtime + iow->inuse_margin_vtime, now.vnow)) {
3ddd9fc7 Tejun Heo 2019-06-13 @1698  		TRACE_IOWG_PATH(inuse_reset, iowg, &now,
3ddd9fc7 Tejun Heo 2019-06-13  1699  				iowg->inuse, iowg->weight, hw_inuse, hw_active);
3ddd9fc7 Tejun Heo 2019-06-13  1700  		spin_lock_irq(&iow->lock);
3ddd9fc7 Tejun Heo 2019-06-13  1701  		propagate_active_weight(iowg, iowg->weight, iowg->weight);
3ddd9fc7 Tejun Heo 2019-06-13  1702  		spin_unlock_irq(&iow->lock);
3ddd9fc7 Tejun Heo 2019-06-13  1703  		current_hweight(iowg, &hw_active, &hw_inuse);
3ddd9fc7 Tejun Heo 2019-06-13  1704  	}
3ddd9fc7 Tejun Heo 2019-06-13  1705  
3ddd9fc7 Tejun Heo 2019-06-13  1706  	cost = abs_cost_to_cost(abs_cost, hw_inuse);
3ddd9fc7 Tejun Heo 2019-06-13  1707  
3ddd9fc7 Tejun Heo 2019-06-13  1708  	/*
3ddd9fc7 Tejun Heo 2019-06-13  1709  	 * If no one's waiting and within budget, issue right away.  The
3ddd9fc7 Tejun Heo 2019-06-13  1710  	 * tests are racy but the races aren't systemic - we only miss once
3ddd9fc7 Tejun Heo 2019-06-13  1711  	 * in a while which is fine.
3ddd9fc7 Tejun Heo 2019-06-13  1712  	 */
3ddd9fc7 Tejun Heo 2019-06-13  1713  	if (!waitqueue_active(&iowg->waitq) &&
3ddd9fc7 Tejun Heo 2019-06-13  1714  	    time_before_eq64(vtime + cost, now.vnow)) {
3ddd9fc7 Tejun Heo 2019-06-13  1715  		iowg_commit_bio(iowg, bio, cost);
3ddd9fc7 Tejun Heo 2019-06-13  1716  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1717  	}
3ddd9fc7 Tejun Heo 2019-06-13  1718  
3ddd9fc7 Tejun Heo 2019-06-13  1719  	if (bio_issue_as_root_blkg(bio) || fatal_signal_pending(current)) {
3ddd9fc7 Tejun Heo 2019-06-13  1720  		iowg_commit_bio(iowg, bio, cost);
3ddd9fc7 Tejun Heo 2019-06-13  1721  		iowg_kick_delay(iowg, &now, cost);
3ddd9fc7 Tejun Heo 2019-06-13  1722  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1723  	}
3ddd9fc7 Tejun Heo 2019-06-13  1724  
3ddd9fc7 Tejun Heo 2019-06-13  1725  	/*
3ddd9fc7 Tejun Heo 2019-06-13  1726  	 * Append self to the waitq and schedule the wakeup timer if we're
3ddd9fc7 Tejun Heo 2019-06-13  1727  	 * the first waiter.  The timer duration is calculated based on the
3ddd9fc7 Tejun Heo 2019-06-13  1728  	 * current vrate.  vtime and hweight changes can make it too short
3ddd9fc7 Tejun Heo 2019-06-13  1729  	 * or too long.  Each wait entry records the absolute cost it's
3ddd9fc7 Tejun Heo 2019-06-13  1730  	 * waiting for to allow re-evaluation using a custom wait entry.
3ddd9fc7 Tejun Heo 2019-06-13  1731  	 *
3ddd9fc7 Tejun Heo 2019-06-13  1732  	 * If too short, the timer simply reschedules itself.  If too long,
3ddd9fc7 Tejun Heo 2019-06-13  1733  	 * the period timer will notice and trigger wakeups.
3ddd9fc7 Tejun Heo 2019-06-13  1734  	 *
3ddd9fc7 Tejun Heo 2019-06-13  1735  	 * All waiters are on iowg->waitq and the wait states are
3ddd9fc7 Tejun Heo 2019-06-13  1736  	 * synchronized using waitq.lock.
3ddd9fc7 Tejun Heo 2019-06-13  1737  	 */
3ddd9fc7 Tejun Heo 2019-06-13  1738  	spin_lock_irq(&iowg->waitq.lock);
3ddd9fc7 Tejun Heo 2019-06-13  1739  
3ddd9fc7 Tejun Heo 2019-06-13  1740  	/*
3ddd9fc7 Tejun Heo 2019-06-13  1741  	 * We activated above but w/o any synchronization.  Deactivation is
3ddd9fc7 Tejun Heo 2019-06-13  1742  	 * synchronized with waitq.lock and we won't get deactivated as
3ddd9fc7 Tejun Heo 2019-06-13  1743  	 * long as we're waiting, so we're good if we're activated here.
3ddd9fc7 Tejun Heo 2019-06-13  1744  	 * In the unlikely case that we are deactivated, just issue the IO.
3ddd9fc7 Tejun Heo 2019-06-13  1745  	 */
3ddd9fc7 Tejun Heo 2019-06-13  1746  	if (unlikely(list_empty(&iowg->active_list))) {
3ddd9fc7 Tejun Heo 2019-06-13  1747  		spin_unlock_irq(&iowg->waitq.lock);
3ddd9fc7 Tejun Heo 2019-06-13  1748  		iowg_commit_bio(iowg, bio, cost);
3ddd9fc7 Tejun Heo 2019-06-13  1749  		return;
3ddd9fc7 Tejun Heo 2019-06-13  1750  	}
3ddd9fc7 Tejun Heo 2019-06-13  1751  
3ddd9fc7 Tejun Heo 2019-06-13  1752  	init_waitqueue_func_entry(&wait.wait, iowg_wake_fn);
3ddd9fc7 Tejun Heo 2019-06-13  1753  	wait.wait.private = current;
3ddd9fc7 Tejun Heo 2019-06-13  1754  	wait.bio = bio;
3ddd9fc7 Tejun Heo 2019-06-13  1755  	wait.abs_cost = abs_cost;
3ddd9fc7 Tejun Heo 2019-06-13  1756  	wait.committed = false;	/* will be set true by waker */
3ddd9fc7 Tejun Heo 2019-06-13  1757  
3ddd9fc7 Tejun Heo 2019-06-13  1758  	__add_wait_queue_entry_tail(&iowg->waitq, &wait.wait);
3ddd9fc7 Tejun Heo 2019-06-13  1759  	iowg_kick_waitq(iowg, &now);
3ddd9fc7 Tejun Heo 2019-06-13  1760  
3ddd9fc7 Tejun Heo 2019-06-13  1761  	spin_unlock_irq(&iowg->waitq.lock);
3ddd9fc7 Tejun Heo 2019-06-13  1762  
3ddd9fc7 Tejun Heo 2019-06-13  1763  	while (true) {
3ddd9fc7 Tejun Heo 2019-06-13  1764  		set_current_state(TASK_UNINTERRUPTIBLE);
3ddd9fc7 Tejun Heo 2019-06-13  1765  		if (wait.committed)
3ddd9fc7 Tejun Heo 2019-06-13  1766  			break;
3ddd9fc7 Tejun Heo 2019-06-13  1767  		io_schedule();
3ddd9fc7 Tejun Heo 2019-06-13  1768  	}
3ddd9fc7 Tejun Heo 2019-06-13  1769  
3ddd9fc7 Tejun Heo 2019-06-13  1770  	/* waker already committed us, proceed */
3ddd9fc7 Tejun Heo 2019-06-13  1771  	finish_wait(&iowg->waitq, &wait.wait);
3ddd9fc7 Tejun Heo 2019-06-13  1772  }
3ddd9fc7 Tejun Heo 2019-06-13  1773  

:::::: The code at line 1698 was first introduced by commit
:::::: 3ddd9fc7fba6e817f95c3baa7731826a3e6cbd2c blkcg: implement blk-ioweight

:::::: TO: Tejun Heo <tj@xxxxxxxxxx>
:::::: CC: Tejun Heo <tj@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux