Hi Chris, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on v4.18-rc3 next-20180706] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-selftests-Prevent-background-reaping-of-active-objects/20180708-204032 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-a1-201827 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/i915/i915_gem.c:6153:0: drivers/gpu/drm/i915/selftests/i915_gem_object.c: In function 'igt_mmap_offset_exhaustion': >> drivers/gpu/drm/i915/selftests/i915_gem_object.c:555:2: error: incompatible type for argument 1 of 'cancel_delayed_work_sync' cancel_delayed_work_sync(i915->gt.retire_work); ^ In file included from include/linux/srcu.h:34:0, from include/linux/notifier.h:16, from include/linux/memory_hotplug.h:7, from include/linux/mmzone.h:777, from include/linux/gfp.h:6, from include/linux/idr.h:16, from include/linux/kernfs.h:14, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/cdev.h:5, from include/drm/drmP.h:36, from drivers/gpu/drm/i915/i915_gem.c:28: include/linux/workqueue.h:484:13: note: expected 'struct delayed_work *' but argument is of type 'struct delayed_work' extern bool cancel_delayed_work_sync(struct delayed_work *dwork); ^ In file included from drivers/gpu/drm/i915/i915_gem.c:6153:0: drivers/gpu/drm/i915/selftests/i915_gem_object.c:556:2: error: incompatible type for argument 1 of 'cancel_delayed_work_sync' cancel_delayed_work_sync(i915->gt.idle_work); ^ In file included from include/linux/srcu.h:34:0, from include/linux/notifier.h:16, from include/linux/memory_hotplug.h:7, from include/linux/mmzone.h:777, from include/linux/gfp.h:6, from include/linux/idr.h:16, from include/linux/kernfs.h:14, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/cdev.h:5, from include/drm/drmP.h:36, from drivers/gpu/drm/i915/i915_gem.c:28: include/linux/workqueue.h:484:13: note: expected 'struct delayed_work *' but argument is of type 'struct delayed_work' extern bool cancel_delayed_work_sync(struct delayed_work *dwork); ^ vim +/cancel_delayed_work_sync +555 drivers/gpu/drm/i915/selftests/i915_gem_object.c 493 494 static int igt_mmap_offset_exhaustion(void *arg) 495 { 496 struct drm_i915_private *i915 = arg; 497 struct drm_mm *mm = &i915->drm.vma_offset_manager->vm_addr_space_mm; 498 struct drm_i915_gem_object *obj; 499 struct drm_mm_node resv, *hole; 500 u64 hole_start, hole_end; 501 int loop, err; 502 503 /* Trim the device mmap space to only a page */ 504 memset(&resv, 0, sizeof(resv)); 505 drm_mm_for_each_hole(hole, mm, hole_start, hole_end) { 506 resv.start = hole_start; 507 resv.size = hole_end - hole_start - 1; /* PAGE_SIZE units */ 508 err = drm_mm_reserve_node(mm, &resv); 509 if (err) { 510 pr_err("Failed to trim VMA manager, err=%d\n", err); 511 return err; 512 } 513 break; 514 } 515 516 /* Just fits! */ 517 if (!assert_mmap_offset(i915, PAGE_SIZE, 0)) { 518 pr_err("Unable to insert object into single page hole\n"); 519 err = -EINVAL; 520 goto out; 521 } 522 523 /* Too large */ 524 if (!assert_mmap_offset(i915, 2*PAGE_SIZE, -ENOSPC)) { 525 pr_err("Unexpectedly succeeded in inserting too large object into single page hole\n"); 526 err = -EINVAL; 527 goto out; 528 } 529 530 /* Fill the hole, further allocation attempts should then fail */ 531 obj = i915_gem_object_create_internal(i915, PAGE_SIZE); 532 if (IS_ERR(obj)) { 533 err = PTR_ERR(obj); 534 goto out; 535 } 536 537 err = i915_gem_object_create_mmap_offset(obj); 538 if (err) { 539 pr_err("Unable to insert object into reclaimed hole\n"); 540 goto err_obj; 541 } 542 543 if (!assert_mmap_offset(i915, PAGE_SIZE, -ENOSPC)) { 544 pr_err("Unexpectedly succeeded in inserting object into no holes!\n"); 545 err = -EINVAL; 546 goto err_obj; 547 } 548 549 i915_gem_object_put(obj); 550 551 /* Disable background reaper */ 552 mutex_lock(&i915->drm.struct_mutex); 553 i915_gem_unpark(i915); 554 mutex_unlock(&i915->drm.struct_mutex); > 555 cancel_delayed_work_sync(i915->gt.retire_work); 556 cancel_delayed_work_sync(i915->gt.idle_work); 557 GEM_BUG_ON(!i915->gt.awake); 558 559 /* Now fill with busy dead objects that we expect to reap */ 560 for (loop = 0; loop < 3; loop++) { 561 if (i915_terminally_wedged(&i915->gpu_error)) 562 break; 563 564 obj = i915_gem_object_create_internal(i915, PAGE_SIZE); 565 if (IS_ERR(obj)) { 566 err = PTR_ERR(obj); 567 goto out; 568 } 569 570 mutex_lock(&i915->drm.struct_mutex); 571 intel_runtime_pm_get(i915); 572 err = make_obj_busy(obj); 573 intel_runtime_pm_put(i915); 574 mutex_unlock(&i915->drm.struct_mutex); 575 if (err) { 576 pr_err("[loop %d] Failed to busy the object\n", loop); 577 goto err_obj; 578 } 579 580 GEM_BUG_ON(!i915_gem_object_is_active(obj)); 581 err = i915_gem_object_create_mmap_offset(obj); 582 if (err) { 583 pr_err("[loop %d] i915_gem_object_create_mmap_offset failed with err=%d\n", 584 loop, err); 585 goto out; 586 } 587 } 588 589 out: 590 drm_mm_remove_node(&resv); 591 queue_delayed_work(i915->wq, &i915->gt.retire_work, 0); 592 return err; 593 err_obj: 594 i915_gem_object_put(obj); 595 goto out; 596 } 597 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx