summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2023-01-07 11:35:59 -0500
committergraysky2023-01-07 11:35:59 -0500
commitbae037f80b34e8237cebc96376fb381ec9ee2504 (patch)
treea0a18510b328a14e9485187b03560e73976b2e0a
parent832a4acbfe3f9e0ad20c2b7681d0e689b2374308 (diff)
downloadaur-bae037f80b34e8237cebc96376fb381ec9ee2504.tar.gz
Update to 6.1.4-1
-rw-r--r--.SRCINFO10
-rw-r--r--0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch253
-rw-r--r--PKGBUILD8
3 files changed, 7 insertions, 264 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 681f96e30273..76d98bccad45 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-ck
- pkgver = 6.1.3
+ pkgver = 6.1.4
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
@@ -12,22 +12,20 @@ pkgbase = linux-ck
makedepends = tar
makedepends = xz
options = !strip
- source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.3.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.3.tar.sign
+ source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
+ source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.sign
source = config
source = more-uarches-20221217.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20221217.tar.gz
source = ck-hrtimer-fdbdf7e0ec56cd59e11d024c473e766429271a5c.tar.gz::https://github.com/graysky2/linux-patches/archive/fdbdf7e0ec56cd59e11d024c473e766429271a5c.tar.gz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- source = 0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- sha256sums = 6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317
+ sha256sums = 8aa8f64fa60bb13381a9608d1fefbdd0555e2a70c40b2c7d0671b0d64aa4559e
sha256sums = SKIP
sha256sums = 0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a
sha256sums = f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0
sha256sums = 6d3b9cb4639c1c5eb4e2697aed0dbffa5b4a37d63a0861dec8315dd052723e0e
sha256sums = 00c7b866ba5393639d5ca2349883909ad6b1bedf6091e857c83f208e0838479c
- sha256sums = 0cde718acd7e96ce5f221db696459b145162196f6fb6b729e3f9231672c40df1
pkgname = linux-ck
pkgdesc = The Linux kernel and modules with ck's hrtimer patches
diff --git a/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch b/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
deleted file mode 100644
index f66fee63d0bd..000000000000
--- a/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-From e3bf21dfa982692c41ec68c656f024863b0313d2 Mon Sep 17 00:00:00 2001
-From: Matthew Auld <matthew.auld@intel.com>
-Date: Tue, 6 Dec 2022 16:11:41 +0000
-Subject: [PATCH 2/4] drm/i915: improve the catch-all evict to handle lock
- contention
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The catch-all evict can fail due to object lock contention, since it
-only goes as far as trylocking the object, due to us already holding the
-vm->mutex. Doing a full object lock here can deadlock, since the
-vm->mutex is always our inner lock. Add another execbuf pass which drops
-the vm->mutex and then tries to grab the object will the full lock,
-before then retrying the eviction. This should be good enough for now to
-fix the immediate regression with userspace seeing -ENOSPC from execbuf
-due to contended object locks during GTT eviction.
-
-Testcase: igt@gem_ppgtt@shrink-vs-evict-*
-Fixes: 7e00897be8bf ("drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2.")
-References: https://gitlab.freedesktop.org/drm/intel/-/issues/7627
-References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570
-References: https://bugzilla.mozilla.org/show_bug.cgi?id=1779558
-Signed-off-by: Matthew Auld <matthew.auld@intel.com>
-Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
-Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
-Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
-Cc: Andrzej Hajda <andrzej.hajda@intel.com>
-Cc: Mani Milani <mani@chromium.org>
-Cc: <stable@vger.kernel.org> # v5.18+
-
-Revision 1 of https://patchwork.freedesktop.org/series/111686/
----
- .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 25 +++++++++++--
- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +-
- drivers/gpu/drm/i915/i915_gem_evict.c | 37 ++++++++++++++-----
- drivers/gpu/drm/i915/i915_gem_evict.h | 4 +-
- drivers/gpu/drm/i915/i915_vma.c | 2 +-
- .../gpu/drm/i915/selftests/i915_gem_evict.c | 4 +-
- 6 files changed, 56 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
-index 845023c14eb3..094e92ed28db 100644
---- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
-+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
-@@ -741,25 +741,44 @@ static int eb_reserve(struct i915_execbuffer *eb)
- *
- * Defragmenting is skipped if all objects are pinned at a fixed location.
- */
-- for (pass = 0; pass <= 2; pass++) {
-+ for (pass = 0; pass <= 3; pass++) {
- int pin_flags = PIN_USER | PIN_VALIDATE;
-
- if (pass == 0)
- pin_flags |= PIN_NONBLOCK;
-
- if (pass >= 1)
-- unpinned = eb_unbind(eb, pass == 2);
-+ unpinned = eb_unbind(eb, pass >= 2);
-
- if (pass == 2) {
- err = mutex_lock_interruptible(&eb->context->vm->mutex);
- if (!err) {
-- err = i915_gem_evict_vm(eb->context->vm, &eb->ww);
-+ err = i915_gem_evict_vm(eb->context->vm, &eb->ww, NULL);
- mutex_unlock(&eb->context->vm->mutex);
- }
- if (err)
- return err;
- }
-
-+ if (pass == 3) {
-+retry:
-+ err = mutex_lock_interruptible(&eb->context->vm->mutex);
-+ if (!err) {
-+ struct drm_i915_gem_object *busy_bo = NULL;
-+
-+ err = i915_gem_evict_vm(eb->context->vm, &eb->ww, &busy_bo);
-+ mutex_unlock(&eb->context->vm->mutex);
-+ if (err && busy_bo) {
-+ err = i915_gem_object_lock(busy_bo, &eb->ww);
-+ i915_gem_object_put(busy_bo);
-+ if (!err)
-+ goto retry;
-+ }
-+ }
-+ if (err)
-+ return err;
-+ }
-+
- list_for_each_entry(ev, &eb->unbound, bind_link) {
- err = eb_reserve_vma(eb, ev, pin_flags);
- if (err)
-diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
-index e63329bc8065..354c1d6dab84 100644
---- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
-+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
-@@ -369,7 +369,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
- if (vma == ERR_PTR(-ENOSPC)) {
- ret = mutex_lock_interruptible(&ggtt->vm.mutex);
- if (!ret) {
-- ret = i915_gem_evict_vm(&ggtt->vm, &ww);
-+ ret = i915_gem_evict_vm(&ggtt->vm, &ww, NULL);
- mutex_unlock(&ggtt->vm.mutex);
- }
- if (ret)
-diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
-index f025ee4fa526..a4b4d9b7d26c 100644
---- a/drivers/gpu/drm/i915/i915_gem_evict.c
-+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
-@@ -416,6 +416,11 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
- * @vm: Address space to cleanse
- * @ww: An optional struct i915_gem_ww_ctx. If not NULL, i915_gem_evict_vm
- * will be able to evict vma's locked by the ww as well.
-+ * @busy_bo: Optional pointer to struct drm_i915_gem_object. If not NULL, then
-+ * in the event i915_gem_evict_vm() is unable to trylock an object for eviction,
-+ * then @busy_bo will point to it. -EBUSY is also returned. The caller must drop
-+ * the vm->mutex, before trying again to acquire the contended lock. The caller
-+ * also owns a reference to the object.
- *
- * This function evicts all vmas from a vm.
- *
-@@ -425,7 +430,8 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
- * To clarify: This is for freeing up virtual address space, not for freeing
- * memory in e.g. the shrinker.
- */
--int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)
-+int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww,
-+ struct drm_i915_gem_object **busy_bo)
- {
- int ret = 0;
-
-@@ -457,15 +463,22 @@ int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)
- * the resv is shared among multiple objects, we still
- * need the object ref.
- */
-- if (dying_vma(vma) ||
-+ if (!i915_gem_object_get_rcu(vma->obj) ||
- (ww && (dma_resv_locking_ctx(vma->obj->base.resv) == &ww->ctx))) {
- __i915_vma_pin(vma);
- list_add(&vma->evict_link, &locked_eviction_list);
- continue;
- }
-
-- if (!i915_gem_object_trylock(vma->obj, ww))
-+ if (!i915_gem_object_trylock(vma->obj, ww)) {
-+ if (busy_bo) {
-+ *busy_bo = vma->obj; /* holds ref */
-+ ret = -EBUSY;
-+ break;
-+ }
-+ i915_gem_object_put(vma->obj);
- continue;
-+ }
-
- __i915_vma_pin(vma);
- list_add(&vma->evict_link, &eviction_list);
-@@ -473,25 +486,29 @@ int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)
- if (list_empty(&eviction_list) && list_empty(&locked_eviction_list))
- break;
-
-- ret = 0;
- /* Unbind locked objects first, before unlocking the eviction_list */
- list_for_each_entry_safe(vma, vn, &locked_eviction_list, evict_link) {
- __i915_vma_unpin(vma);
-
-- if (ret == 0)
-+ if (ret == 0) {
- ret = __i915_vma_unbind(vma);
-- if (ret != -EINTR) /* "Get me out of here!" */
-- ret = 0;
-+ if (ret != -EINTR) /* "Get me out of here!" */
-+ ret = 0;
-+ }
-+ if (!dying_vma(vma))
-+ i915_gem_object_put(vma->obj);
- }
-
- list_for_each_entry_safe(vma, vn, &eviction_list, evict_link) {
- __i915_vma_unpin(vma);
-- if (ret == 0)
-+ if (ret == 0) {
- ret = __i915_vma_unbind(vma);
-- if (ret != -EINTR) /* "Get me out of here!" */
-- ret = 0;
-+ if (ret != -EINTR) /* "Get me out of here!" */
-+ ret = 0;
-+ }
-
- i915_gem_object_unlock(vma->obj);
-+ i915_gem_object_put(vma->obj);
- }
- } while (ret == 0);
-
-diff --git a/drivers/gpu/drm/i915/i915_gem_evict.h b/drivers/gpu/drm/i915/i915_gem_evict.h
-index e593c530f9bd..bf0ee0e4fe60 100644
---- a/drivers/gpu/drm/i915/i915_gem_evict.h
-+++ b/drivers/gpu/drm/i915/i915_gem_evict.h
-@@ -11,6 +11,7 @@
- struct drm_mm_node;
- struct i915_address_space;
- struct i915_gem_ww_ctx;
-+struct drm_i915_gem_object;
-
- int __must_check i915_gem_evict_something(struct i915_address_space *vm,
- struct i915_gem_ww_ctx *ww,
-@@ -23,6 +24,7 @@ int __must_check i915_gem_evict_for_node(struct i915_address_space *vm,
- struct drm_mm_node *node,
- unsigned int flags);
- int i915_gem_evict_vm(struct i915_address_space *vm,
-- struct i915_gem_ww_ctx *ww);
-+ struct i915_gem_ww_ctx *ww,
-+ struct drm_i915_gem_object **busy_bo);
-
- #endif /* __I915_GEM_EVICT_H__ */
-diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
-index f17c09ead7d7..4d06875de14a 100644
---- a/drivers/gpu/drm/i915/i915_vma.c
-+++ b/drivers/gpu/drm/i915/i915_vma.c
-@@ -1569,7 +1569,7 @@ static int __i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
- * locked objects when called from execbuf when pinning
- * is removed. This would probably regress badly.
- */
-- i915_gem_evict_vm(vm, NULL);
-+ i915_gem_evict_vm(vm, NULL, NULL);
- mutex_unlock(&vm->mutex);
- }
- } while (1);
-diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
-index 8c6517d29b8e..37068542aafe 100644
---- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
-+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
-@@ -344,7 +344,7 @@ static int igt_evict_vm(void *arg)
-
- /* Everything is pinned, nothing should happen */
- mutex_lock(&ggtt->vm.mutex);
-- err = i915_gem_evict_vm(&ggtt->vm, NULL);
-+ err = i915_gem_evict_vm(&ggtt->vm, NULL, NULL);
- mutex_unlock(&ggtt->vm.mutex);
- if (err) {
- pr_err("i915_gem_evict_vm on a full GGTT returned err=%d]\n",
-@@ -356,7 +356,7 @@ static int igt_evict_vm(void *arg)
-
- for_i915_gem_ww(&ww, err, false) {
- mutex_lock(&ggtt->vm.mutex);
-- err = i915_gem_evict_vm(&ggtt->vm, &ww);
-+ err = i915_gem_evict_vm(&ggtt->vm, &ww, NULL);
- mutex_unlock(&ggtt->vm.mutex);
- }
-
---
-2.39.0
-
diff --git a/PKGBUILD b/PKGBUILD
index d90ccbc9b64d..25b4d43a7af7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,7 +68,7 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
-pkgver=6.1.3
+pkgver=6.1.4
pkgrel=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
@@ -91,19 +91,17 @@ source=(
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz"
"ck-hrtimer-$_commit.tar.gz::https://github.com/graysky2/linux-patches/archive/$_commit.tar.gz"
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- 0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
-sha256sums=('6dc89ae7a7513e433c597c7346ed7ff4bfd115ea43a3b5e27a6bdb38c5580317'
+sha256sums=('8aa8f64fa60bb13381a9608d1fefbdd0555e2a70c40b2c7d0671b0d64aa4559e'
'SKIP'
'0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a'
'f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0'
'6d3b9cb4639c1c5eb4e2697aed0dbffa5b4a37d63a0861dec8315dd052723e0e'
- '00c7b866ba5393639d5ca2349883909ad6b1bedf6091e857c83f208e0838479c'
- '0cde718acd7e96ce5f221db696459b145162196f6fb6b729e3f9231672c40df1')
+ '00c7b866ba5393639d5ca2349883909ad6b1bedf6091e857c83f208e0838479c')
prepare() {
cd linux-${pkgver}