Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Use kpause for schedule_...
details: https://anonhg.NetBSD.org/src/rev/ada5e23af80e
branches: trunk
changeset: 992629:ada5e23af80e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:18:37 2018 +0000
description:
Use kpause for schedule_timeout_killable/fatal_signal_pending.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 7f91123ec7ee -r ada5e23af80e sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c Mon Aug 27 07:18:28 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_shrinker.c Mon Aug 27 07:18:37 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_shrinker.c,v 1.3 2018/08/27 07:18:28 riastradh Exp $ */
+/* $NetBSD: i915_gem_shrinker.c,v 1.4 2018/08/27 07:18:37 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_shrinker.c,v 1.3 2018/08/27 07:18:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_shrinker.c,v 1.4 2018/08/27 07:18:37 riastradh Exp $");
#include <linux/oom.h>
#include <linux/shmem_fs.h>
@@ -289,9 +289,15 @@
bool unlock;
while (!i915_gem_shrinker_lock(dev, &unlock) && --timeout) {
+#ifdef __NetBSD__
+ int error = kpause("i915shnk", true, 1, NULL);
+ if (error == EINTR || error == ERESTART)
+ return NOTIFY_DONE;
+#else
schedule_timeout_killable(1);
if (fatal_signal_pending(current))
return NOTIFY_DONE;
+#endif
}
if (timeout == 0) {
pr_err("Unable to purge GPU memory due lock contention.\n");
Home |
Main Index |
Thread Index |
Old Index