summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeka2022-12-31 16:40:42 +0300
committerJeka2022-12-31 16:40:42 +0300
commit46b138d9d709ca9368d5416e1732260513d5a18a (patch)
tree8cfa21a87d649f8a0125922a7cc4a465b1bb3147
parent520f31c9eb9a1114b60e2ddc2f0df9353a0a191c (diff)
downloadaur-46b138d9d709ca9368d5416e1732260513d5a18a.tar.gz
kernel release 6.1.2
-rw-r--r--.SRCINFO10
-rw-r--r--0102-improve_the_catch-all_evict_to_handle_lock.patch250
-rw-r--r--PKGBUILD8
-rw-r--r--config2
4 files changed, 8 insertions, 262 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 090a2257b394..812cf005018a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-jcore
pkgdesc = Kernel for Manjaro/EndeavourOS/Arch (ACS override patch include)
- pkgver = 6.1.1
+ pkgver = 6.1.2
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
@@ -20,10 +20,9 @@ pkgbase = linux-jcore
replaces = linux-acs-manjaro
replaces = linux-acs-manjaro-headers
options = !strip
- source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.1.tar.xz
+ source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.2.tar.xz
source = config
source = 0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch
- source = 0102-improve_the_catch-all_evict_to_handle_lock.patch
source = 0301-revert-fbcon-remove-now-unusued-softback_lines-cursor-argument.patch
source = 0302-revert-fbcon-remove-no-op-fbcon_set_origin.patch
source = 0303-revert-fbcon-remove-soft-scrollback-code.patch
@@ -41,10 +40,9 @@ pkgbase = linux-jcore
source = 0412-bootsplash.patch
source = 0413-bootsplash.gitpatch
source = 0999-acs.gitpatch
- sha256sums = a3e61377cf4435a9e2966b409a37a1056f6aaa59e561add9125a88e3c0971dfb
- sha256sums = e628d5544d90f0a8e58988c46976a1cceffafdccedc874caff96cd7ce580ac5b
+ sha256sums = ee41f3c4f599b2f46f08aae428c9243db403e7292eb2c9f04ee34909b038d1ae
+ sha256sums = ca20bbaddaaf078aee31d029c069da76d51b02b62bc2d5dce578b6f22c32e1e5
sha256sums = 05f04019d4a2ee072238c32860fa80d673687d84d78ef436ae9332b6fb788467
- sha256sums = a5a482a4d715f4d11a00f898de520effa01cce31faadd98b02cf10006a4ac8be
sha256sums = 2b11905b63b05b25807dd64757c779da74dd4c37e36d3f7a46485b1ee5a9d326
sha256sums = 94a8538251ad148f1025cc3de446ce64f73dc32b01815426fb159c722e8fa5bc
sha256sums = 50f4ccc4aeb0ffb8ec648b90a84ff188dbfed5364075cf0c6045c5696caf6ca9
diff --git a/0102-improve_the_catch-all_evict_to_handle_lock.patch b/0102-improve_the_catch-all_evict_to_handle_lock.patch
deleted file mode 100644
index 4317e6cbe622..000000000000
--- a/0102-improve_the_catch-all_evict_to_handle_lock.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From 0c079d3f88df5f8286cd5c91b54bdac7c819be85 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] 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 845023c14eb36f..094e92ed28db4f 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 73d9eda1d6b7a6..c83d98e1dc5da0 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 f025ee4fa52618..a4b4d9b7d26c7a 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 e593c530f9bd7a..bf0ee0e4fe6088 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 f17c09ead7d778..4d06875de14a14 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 8c6517d29b8e0c..37068542aafe7f 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);
- }
-
diff --git a/PKGBUILD b/PKGBUILD
index b2e487e3ef5a..41d5874ac57d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ pkgbase=linux-jcore
pkgname=('linux-jcore' 'linux-jcore-headers')
_kernelname=-jcore
_hostname=jcore
-pkgver=6.1.1
+pkgver=6.1.2
pkgrel=1
pkgdesc="Kernel for Manjaro/EndeavourOS/Arch (ACS override patch include)"
arch=('x86_64')
@@ -26,7 +26,6 @@ source=("https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.xz"
'config'
# ARCH Patches
'0101-ZEN_Add_sysctl_and_CONFIG_to_disallow_unprivileged_CLONE_NEWUSER.patch'
- '0102-improve_the_catch-all_evict_to_handle_lock.patch'
# MANJARO Patches
# Bootsplash
@@ -48,10 +47,9 @@ source=("https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.xz"
'0413-bootsplash.gitpatch'
# ACS override patch
'0999-acs.gitpatch')
-sha256sums=('a3e61377cf4435a9e2966b409a37a1056f6aaa59e561add9125a88e3c0971dfb'
- 'e628d5544d90f0a8e58988c46976a1cceffafdccedc874caff96cd7ce580ac5b'
+sha256sums=('ee41f3c4f599b2f46f08aae428c9243db403e7292eb2c9f04ee34909b038d1ae'
+ 'ca20bbaddaaf078aee31d029c069da76d51b02b62bc2d5dce578b6f22c32e1e5'
'05f04019d4a2ee072238c32860fa80d673687d84d78ef436ae9332b6fb788467'
- 'a5a482a4d715f4d11a00f898de520effa01cce31faadd98b02cf10006a4ac8be'
'2b11905b63b05b25807dd64757c779da74dd4c37e36d3f7a46485b1ee5a9d326'
'94a8538251ad148f1025cc3de446ce64f73dc32b01815426fb159c722e8fa5bc'
'50f4ccc4aeb0ffb8ec648b90a84ff188dbfed5364075cf0c6045c5696caf6ca9'
diff --git a/config b/config
index 6b338ae7efea..7aa96d3eb674 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 6.1.1-1 Kernel Configuration
+# Linux/x86 6.1.2-1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.0"
CONFIG_CC_IS_GCC=y