[PATCH 2/2] drm/sched: Fix docu of drm_sched_entity_flush()
kernel test robot
lkp at intel.com
Thu Nov 21 21:01:50 UTC 2024
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on v6.12 next-20241121]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/drm-sched-Fix-docu-of-drm_sched_entity_flush/20241121-125617
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20241119134122.21950-3-pstanner%40redhat.com
patch subject: [PATCH 2/2] drm/sched: Fix docu of drm_sched_entity_flush()
config: arc-randconfig-001-20241122 (https://download.01.org/0day-ci/archive/20241122/202411220432.6kkVBxah-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411220432.6kkVBxah-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411220432.6kkVBxah-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/scheduler/sched_entity.c:277: warning: bad line:
vim +277 drivers/gpu/drm/scheduler/sched_entity.c
270
271 /**
272 * drm_sched_entity_flush - Flush a context entity
273 * @entity: scheduler entity
274 * @timeout: time to wait in jiffies
275 *
276 * Returns: 0 if the timeout ellapsed, the remaining time otherwise.
> 277
278 * Waits at most @timeout jiffies for the entity's job queue to become empty.
279 */
280 long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
281 {
282 struct drm_gpu_scheduler *sched;
283 struct task_struct *last_user;
284 long ret = timeout;
285
286 if (!entity->rq)
287 return 0;
288
289 sched = entity->rq->sched;
290 /*
291 * The client will not queue more IBs during this fini, consume existing
292 * queued IBs or discard them on SIGKILL
293 */
294 if (timeout != 0 && (current->flags & PF_EXITING)) {
295 ret = wait_event_timeout(sched->job_scheduled,
296 drm_sched_entity_is_idle(entity),
297 timeout);
298 /*
299 * wait_event_timeout() returns 1 if it timed out but the
300 * condition became true on timeout. We only care about whether
301 * it timed out or not.
302 */
303 if (ret == 1)
304 ret = 0;
305 } else {
306 wait_event_killable(sched->job_scheduled,
307 drm_sched_entity_is_idle(entity));
308
309 ret -= (long)get_jiffies_64();
310 if (ret < 0)
311 ret = 0;
312 }
313
314 /* For killed process disable any more IBs enqueue right now */
315 last_user = cmpxchg(&entity->last_user, current->group_leader, NULL);
316 if ((!last_user || last_user == current->group_leader) &&
317 (current->flags & PF_EXITING) && (current->exit_code == SIGKILL))
318 drm_sched_entity_kill(entity);
319
320 return ret;
321 }
322 EXPORT_SYMBOL(drm_sched_entity_flush);
323
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list