lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202409241108.jaocHiDJ-lkp@intel.com>
Date: Tue, 24 Sep 2024 11:46:31 +0800
From: kernel test robot <lkp@...el.com>
To: Tejun Heo <tj@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: kernel/sched/ext.c:6053:25: error: implicit declaration of function
 'move_remote_task_to_local_dsq'; did you mean
 'move_local_task_to_local_dsq'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   abf2050f51fdca0fd146388f83cddd95a57a008d
commit: 4c30f5ce4f7af4f639af99e0bdeada8b268b7361 sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()
date:   2 weeks ago
config: sparc-randconfig-r133-20240923 (https://download.01.org/0day-ci/archive/20240924/202409241108.jaocHiDJ-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240924/202409241108.jaocHiDJ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409241108.jaocHiDJ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/sched/build_policy.c:63:
   kernel/sched/ext.c: In function 'scx_dispatch_from_dsq':
>> kernel/sched/ext.c:6053:25: error: implicit declaration of function 'move_remote_task_to_local_dsq'; did you mean 'move_local_task_to_local_dsq'? [-Wimplicit-function-declaration]
    6053 |                         move_remote_task_to_local_dsq(p, enq_flags,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         move_local_task_to_local_dsq


vim +6053 kernel/sched/ext.c

  5977	
  5978	static bool scx_dispatch_from_dsq(struct bpf_iter_scx_dsq_kern *kit,
  5979					  struct task_struct *p, u64 dsq_id,
  5980					  u64 enq_flags)
  5981	{
  5982		struct scx_dispatch_q *src_dsq = kit->dsq, *dst_dsq;
  5983		struct rq *this_rq, *src_rq, *dst_rq, *locked_rq;
  5984		bool dispatched = false;
  5985		bool in_balance;
  5986		unsigned long flags;
  5987	
  5988		if (!scx_kf_allowed_if_unlocked() && !scx_kf_allowed(SCX_KF_DISPATCH))
  5989			return false;
  5990	
  5991		/*
  5992		 * Can be called from either ops.dispatch() locking this_rq() or any
  5993		 * context where no rq lock is held. If latter, lock @p's task_rq which
  5994		 * we'll likely need anyway.
  5995		 */
  5996		src_rq = task_rq(p);
  5997	
  5998		local_irq_save(flags);
  5999		this_rq = this_rq();
  6000		in_balance = this_rq->scx.flags & SCX_RQ_IN_BALANCE;
  6001	
  6002		if (in_balance) {
  6003			if (this_rq != src_rq) {
  6004				raw_spin_rq_unlock(this_rq);
  6005				raw_spin_rq_lock(src_rq);
  6006			}
  6007		} else {
  6008			raw_spin_rq_lock(src_rq);
  6009		}
  6010	
  6011		locked_rq = src_rq;
  6012		raw_spin_lock(&src_dsq->lock);
  6013	
  6014		/*
  6015		 * Did someone else get to it? @p could have already left $src_dsq, got
  6016		 * re-enqueud, or be in the process of being consumed by someone else.
  6017		 */
  6018		if (unlikely(p->scx.dsq != src_dsq ||
  6019			     u32_before(kit->cursor.priv, p->scx.dsq_seq) ||
  6020			     p->scx.holding_cpu >= 0) ||
  6021		    WARN_ON_ONCE(src_rq != task_rq(p))) {
  6022			raw_spin_unlock(&src_dsq->lock);
  6023			goto out;
  6024		}
  6025	
  6026		/* @p is still on $src_dsq and stable, determine the destination */
  6027		dst_dsq = find_dsq_for_dispatch(this_rq, dsq_id, p);
  6028	
  6029		if (dst_dsq->id == SCX_DSQ_LOCAL) {
  6030			dst_rq = container_of(dst_dsq, struct rq, scx.local_dsq);
  6031			if (!task_can_run_on_remote_rq(p, dst_rq, true)) {
  6032				dst_dsq = &scx_dsq_global;
  6033				dst_rq = src_rq;
  6034			}
  6035		} else {
  6036			/* no need to migrate if destination is a non-local DSQ */
  6037			dst_rq = src_rq;
  6038		}
  6039	
  6040		/*
  6041		 * Move @p into $dst_dsq. If $dst_dsq is the local DSQ of a different
  6042		 * CPU, @p will be migrated.
  6043		 */
  6044		if (dst_dsq->id == SCX_DSQ_LOCAL) {
  6045			/* @p is going from a non-local DSQ to a local DSQ */
  6046			if (src_rq == dst_rq) {
  6047				task_unlink_from_dsq(p, src_dsq);
  6048				move_local_task_to_local_dsq(p, enq_flags,
  6049							     src_dsq, dst_rq);
  6050				raw_spin_unlock(&src_dsq->lock);
  6051			} else {
  6052				raw_spin_unlock(&src_dsq->lock);
> 6053				move_remote_task_to_local_dsq(p, enq_flags,
  6054							      src_rq, dst_rq);
  6055				locked_rq = dst_rq;
  6056			}
  6057		} else {
  6058			/*
  6059			 * @p is going from a non-local DSQ to a non-local DSQ. As
  6060			 * $src_dsq is already locked, do an abbreviated dequeue.
  6061			 */
  6062			task_unlink_from_dsq(p, src_dsq);
  6063			p->scx.dsq = NULL;
  6064			raw_spin_unlock(&src_dsq->lock);
  6065	
  6066			if (kit->cursor.flags & __SCX_DSQ_ITER_HAS_VTIME)
  6067				p->scx.dsq_vtime = kit->vtime;
  6068			dispatch_enqueue(dst_dsq, p, enq_flags);
  6069		}
  6070	
  6071		if (kit->cursor.flags & __SCX_DSQ_ITER_HAS_SLICE)
  6072			p->scx.slice = kit->slice;
  6073	
  6074		dispatched = true;
  6075	out:
  6076		if (in_balance) {
  6077			if (this_rq != locked_rq) {
  6078				raw_spin_rq_unlock(locked_rq);
  6079				raw_spin_rq_lock(this_rq);
  6080			}
  6081		} else {
  6082			raw_spin_rq_unlock_irqrestore(locked_rq, flags);
  6083		}
  6084	
  6085		kit->cursor.flags &= ~(__SCX_DSQ_ITER_HAS_SLICE |
  6086				       __SCX_DSQ_ITER_HAS_VTIME);
  6087		return dispatched;
  6088	}
  6089	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ