summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch2
-rw-r--r--0002-mm-vmscan-fix-extreme-overreclaim-and-swap-floods.patch2
-rw-r--r--0003-soundwire-intel-Initialize-clock-stop-timeout.patch2
-rw-r--r--0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch2
-rw-r--r--0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch2
-rw-r--r--0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch223
-rw-r--r--PKGBUILD14
8 files changed, 17 insertions, 244 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1a72e73002a0..1e00d5182c99 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-ck
pkgver = 6.0.10
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
license = GPL2
@@ -21,7 +21,6 @@ pkgbase = linux-ck
source = 0003-soundwire-intel-Initialize-clock-stop-timeout.patch
source = 0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch
source = 0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch
- source = 0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = 39e57fcd84cd70bfa3e1a4185d3aa0ed7f1432f24c6548d16326b0c3c9541dd0
@@ -29,12 +28,11 @@ pkgbase = linux-ck
sha256sums = 848ccd048f91b17f0e0192d2900c462986eeacf78bb578b2de9498c4a0526983
sha256sums = 3a8f397b89bad95c46f42c0f80ede7536a4a45a28621e00ed486918a55f905ed
sha256sums = 85b197dbe033264925b4803b3c8907ed73b967061c098e269eacd5575d6da34b
- sha256sums = 05a9b754ff501c45833238db1f304533a3b0aec3f9281cb8381c580066a2eff5
- sha256sums = 800804877e411394cd7aa77884054e0447da51b5fb010e3f3f992bfe41e41fba
- sha256sums = 3f5a6fc58ae54bcfd95e147a2156c501eecfd9fcf2a9ceed056df87d59954af8
- sha256sums = 9aeaddde2dd4bca54ee00ee11a53677a3afe82c61543c416708edaa0f27097c9
- sha256sums = 5d22887375ab7a8615b7ad84445d5c62350be23873396222c48f6e39dd64161c
- sha256sums = 966f24db411f100a2c7028c7e26814fa34a742f55a236df5df5357174404750a
+ sha256sums = 09d6205b2550143a3a7b2614f10610a00a7b3bbe26aadaa7c128d87f662e5f76
+ sha256sums = cade95b098bd1ccd14f1cf111e95572b61dc72099ebe767e75beca4ead12cc40
+ sha256sums = 83553cf53bd06efc20a3f432562358c160f1517dad88694c2ff2389df5cc38f9
+ sha256sums = 1a123dcf3c4b797eec0bac0ffe13ff015b95f21ca4ae40800e1a03f1d74c420a
+ sha256sums = 9d855466dfb15f3e9a57db77c58ed57c59d0db0e677787653491ae44fc5d0f86
pkgname = linux-ck
pkgdesc = The Linux kernel and modules with ck's hrtimer patches
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
index a53367407193..476b8db3ee6b 100644
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
@@ -1,7 +1,7 @@
From f763c5f50435a3eb7e9ebf2bdc98c6f42d76eb34 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Mon, 16 Sep 2019 04:53:20 +0200
-Subject: [PATCH 1/7] ZEN: Add sysctl and CONFIG to disallow unprivileged
+Subject: [PATCH 1/6] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
diff --git a/0002-mm-vmscan-fix-extreme-overreclaim-and-swap-floods.patch b/0002-mm-vmscan-fix-extreme-overreclaim-and-swap-floods.patch
index 95bb2f11106d..b618b4922790 100644
--- a/0002-mm-vmscan-fix-extreme-overreclaim-and-swap-floods.patch
+++ b/0002-mm-vmscan-fix-extreme-overreclaim-and-swap-floods.patch
@@ -1,7 +1,7 @@
From a6f5827368ab235751c4af71b3c27c601ff803f1 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes@cmpxchg.org>
Date: Tue, 2 Aug 2022 12:28:11 -0400
-Subject: [PATCH 2/7] mm: vmscan: fix extreme overreclaim and swap floods
+Subject: [PATCH 2/6] mm: vmscan: fix extreme overreclaim and swap floods
During proactive reclaim, we sometimes observe severe overreclaim, with
several thousand times more pages reclaimed than requested.
diff --git a/0003-soundwire-intel-Initialize-clock-stop-timeout.patch b/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
index 46502e56099e..653246eda837 100644
--- a/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
+++ b/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
@@ -1,7 +1,7 @@
From 5ee238d09efc2243473b0eaa14496c18e1d1c924 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd@collabora.com>
Date: Sat, 8 Oct 2022 21:57:51 +0200
-Subject: [PATCH 3/7] soundwire: intel: Initialize clock stop timeout
+Subject: [PATCH 3/6] soundwire: intel: Initialize clock stop timeout
The bus->clk_stop_timeout member is only initialized to a non-zero value
during the codec driver probe. This can lead to corner cases where this
diff --git a/0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch b/0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch
index 51063a433be4..ce6c07f0cd4b 100644
--- a/0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch
+++ b/0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch
@@ -1,7 +1,7 @@
From 0f134b2b1903b238d7bd126c45c59242025fd823 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Date: Fri, 7 Oct 2022 09:51:13 +0200
-Subject: [PATCH 4/7] drm/sched: add DRM_SCHED_FENCE_DONT_PIPELINE flag
+Subject: [PATCH 4/6] drm/sched: add DRM_SCHED_FENCE_DONT_PIPELINE flag
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch b/0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch
index 291fee74396f..c23acb868e3f 100644
--- a/0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch
+++ b/0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch
@@ -1,7 +1,7 @@
From 6e755c436e31374e96be923e96d4bc81a8a13f6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Date: Fri, 7 Oct 2022 10:59:58 +0200
-Subject: [PATCH 5/7] drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM
+Subject: [PATCH 5/6] drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM
updates
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
diff --git a/0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch b/0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch
deleted file mode 100644
index cecf8b9caa8e..000000000000
--- a/0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From f7f83dfc74d55e134cc85668089d66d4d6df2107 Mon Sep 17 00:00:00 2001
-From: Mani Milani <mani@chromium.org>
-Date: Thu, 10 Nov 2022 16:31:33 +1100
-Subject: [PATCH 6/7] drm/i915: Fix unhandled deadlock in grab_vma()
-
-At present, the gpu thread crashes at times when grab_vma() attempts to
-acquire a gem object lock when in a deadlock state.
-
-Problems:
-I identified the following 4 issues in the current code:
-1. Since grab_vma() calls i915_gem_object_trylock(), which consequently
- calls ww_mutex_trylock(), to acquire lock, it does not perform any
- -EDEADLK handling; And -EALREADY handling is also unreliable,
- according to the description of ww_mutex_trylock().
-2. Since the return value of grab_vma() is a boolean showing
- success/failure, it does not provide any extra information on the
- failure reason, and therefore does not provide any mechanism to its
- caller to take any action to fix a potential deadlock.
-3. Current grab_vma() implementation produces inconsistent behaviour
- depending on the refcount value, without informing the caller. If
- refcount is already zero, grab_vma() neither acquires lock nor
- increments the refcount, but still returns 'true' for success! This
- means that grab_vma() returning true (for success) does not always
- mean that the gem obj is actually safely accessible.
-4. Currently, calling "i915_gem_object_lock(obj,ww)" is meant to be
- followed by a consequent "i915_gem_object_unlock(obj)" ONLY if the
- original 'ww' object pointer was NULL, or otherwise not be called and
- leave the houskeeping to "i915_gem_ww_ctx_fini(ww)". There are a few
- issues with this:
- - This is not documented anywhere in the code (that I could find),
- but only explained in an older commit message.
- - This produces an inconsistent usage of the lock/unlock functions,
- increasing the chance of mistakes and issues.
- - This is not a clean design as it requires any new code that calls
- these lock/unlock functions to know their internals, as well as the
- internals of the functions calling the new code being added.
-
-Fix:
-To fix the issues above, this patch:
-1. Changes grab_vma() to call i915_gem_object_lock() instead of
- i915_gem_object_trylock(), to handle -EDEADLK and -EALREADY cases.
- This should not cause any issue since the PIN_NONBLOCK flag is
- checked beforehand in the 2 cases grab_vma() is called.
-2. Changes grab_vma() to return the actual error code, instead of bool.
-3. Changes grab_vma() to behave consistently when returning success, by
- both incrementing the refcount and acquiring lock at all times.
-4. Changes i915_gem_object_unlock() to pair with i915_gem_object_lock()
- nicely in all cases and do the housekeeping without the need for the
- caller to do anything other than simply calling lock and unlock.
-5. Ensures the gem obj->obj_link is initialized and deleted from the ww
- list such that it can be tested for emptiness using list_empty().
-
-Signed-off-by: Mani Milani <mani@chromium.org>
-For: https://gitlab.freedesktop.org/drm/intel/-/issues/7570
----
- drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +
- drivers/gpu/drm/i915/gem/i915_gem_object.h | 10 ++++-
- drivers/gpu/drm/i915/i915_gem_evict.c | 48 ++++++++++++----------
- drivers/gpu/drm/i915/i915_gem_ww.c | 8 ++--
- 4 files changed, 41 insertions(+), 27 deletions(-)
-
-diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
-index 85482a04d158..0caf171b37d9 100644
---- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
-+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
-@@ -78,6 +78,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
-
- INIT_LIST_HEAD(&obj->mm.link);
-
-+ INIT_LIST_HEAD(&obj->obj_link);
-+
- INIT_LIST_HEAD(&obj->lut_list);
- spin_lock_init(&obj->lut_lock);
-
-diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
-index 6f0a3ce35567..fe634aebc067 100644
---- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
-+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
-@@ -219,7 +219,7 @@ static inline bool i915_gem_object_trylock(struct drm_i915_gem_object *obj,
- return ww_mutex_trylock(&obj->base.resv->lock, &ww->ctx);
- }
-
--static inline void i915_gem_object_unlock(struct drm_i915_gem_object *obj)
-+static inline void __i915_gem_object_unlock(struct drm_i915_gem_object *obj)
- {
- if (obj->ops->adjust_lru)
- obj->ops->adjust_lru(obj);
-@@ -227,6 +227,14 @@ static inline void i915_gem_object_unlock(struct drm_i915_gem_object *obj)
- dma_resv_unlock(obj->base.resv);
- }
-
-+static inline void i915_gem_object_unlock(struct drm_i915_gem_object *obj)
-+{
-+ if (list_empty(&obj->obj_link))
-+ __i915_gem_object_unlock(obj);
-+ else
-+ i915_gem_ww_unlock_single(obj);
-+}
-+
- static inline void
- i915_gem_object_set_readonly(struct drm_i915_gem_object *obj)
- {
-diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
-index f025ee4fa526..3eb514b4eddc 100644
---- a/drivers/gpu/drm/i915/i915_gem_evict.c
-+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
-@@ -55,29 +55,33 @@ static int ggtt_flush(struct intel_gt *gt)
- return intel_gt_wait_for_idle(gt, MAX_SCHEDULE_TIMEOUT);
- }
-
--static bool grab_vma(struct i915_vma *vma, struct i915_gem_ww_ctx *ww)
-+static int grab_vma(struct i915_vma *vma, struct i915_gem_ww_ctx *ww)
- {
-+ int err;
-+
-+ /* Dead objects don't need pins */
-+ if (dying_vma(vma))
-+ atomic_and(~I915_VMA_PIN_MASK, &vma->flags);
-+
-+ err = i915_gem_object_lock(vma->obj, ww);
-+
- /*
- * We add the extra refcount so the object doesn't drop to zero until
-- * after ungrab_vma(), this way trylock is always paired with unlock.
-+ * after ungrab_vma(), this way lock is always paired with unlock.
- */
-- if (i915_gem_object_get_rcu(vma->obj)) {
-- if (!i915_gem_object_trylock(vma->obj, ww)) {
-- i915_gem_object_put(vma->obj);
-- return false;
-- }
-- } else {
-- /* Dead objects don't need pins */
-- atomic_and(~I915_VMA_PIN_MASK, &vma->flags);
-- }
-+ if (!err)
-+ i915_gem_object_get(vma->obj);
-
-- return true;
-+ return err;
- }
-
- static void ungrab_vma(struct i915_vma *vma)
- {
-- if (dying_vma(vma))
-+ if (dying_vma(vma)) {
-+ /* Dead objects don't need pins */
-+ atomic_and(~I915_VMA_PIN_MASK, &vma->flags);
- return;
-+ }
-
- i915_gem_object_unlock(vma->obj);
- i915_gem_object_put(vma->obj);
-@@ -93,10 +97,11 @@ mark_free(struct drm_mm_scan *scan,
- if (i915_vma_is_pinned(vma))
- return false;
-
-- if (!grab_vma(vma, ww))
-+ if (grab_vma(vma, ww))
- return false;
-
- list_add(&vma->evict_link, unwind);
-+
- return drm_mm_scan_add_block(scan, &vma->node);
- }
-
-@@ -284,10 +289,12 @@ i915_gem_evict_something(struct i915_address_space *vm,
- vma = container_of(node, struct i915_vma, node);
-
- /* If we find any non-objects (!vma), we cannot evict them */
-- if (vma->node.color != I915_COLOR_UNEVICTABLE &&
-- grab_vma(vma, ww)) {
-- ret = __i915_vma_unbind(vma);
-- ungrab_vma(vma);
-+ if (vma->node.color != I915_COLOR_UNEVICTABLE) {
-+ ret = grab_vma(vma, ww);
-+ if (!ret) {
-+ ret = __i915_vma_unbind(vma);
-+ ungrab_vma(vma);
-+ }
- } else {
- ret = -ENOSPC;
- }
-@@ -382,10 +389,9 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
- break;
- }
-
-- if (!grab_vma(vma, ww)) {
-- ret = -ENOSPC;
-+ ret = grab_vma(vma, ww);
-+ if (ret)
- break;
-- }
-
- /*
- * Never show fear in the face of dragons!
-diff --git a/drivers/gpu/drm/i915/i915_gem_ww.c b/drivers/gpu/drm/i915/i915_gem_ww.c
-index 3f6ff139478e..937b279f50fc 100644
---- a/drivers/gpu/drm/i915/i915_gem_ww.c
-+++ b/drivers/gpu/drm/i915/i915_gem_ww.c
-@@ -19,16 +19,14 @@ static void i915_gem_ww_ctx_unlock_all(struct i915_gem_ww_ctx *ww)
- struct drm_i915_gem_object *obj;
-
- while ((obj = list_first_entry_or_null(&ww->obj_list, struct drm_i915_gem_object, obj_link))) {
-- list_del(&obj->obj_link);
-- i915_gem_object_unlock(obj);
-- i915_gem_object_put(obj);
-+ i915_gem_ww_unlock_single(obj);
- }
- }
-
- void i915_gem_ww_unlock_single(struct drm_i915_gem_object *obj)
- {
-- list_del(&obj->obj_link);
-- i915_gem_object_unlock(obj);
-+ list_del_init(&obj->obj_link);
-+ __i915_gem_object_unlock(obj);
- i915_gem_object_put(obj);
- }
-
---
-2.38.1
-
diff --git a/PKGBUILD b/PKGBUILD
index db0015fcc293..3f8c8e17046a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -69,7 +69,7 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
pkgver=6.0.10
-pkgrel=1
+pkgrel=2
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
license=(GPL2)
@@ -95,7 +95,6 @@ source=(
0003-soundwire-intel-Initialize-clock-stop-timeout.patch
0004-drm-sched-add-DRM_SCHED_FENCE_DONT_PIPELINE-flag.patch
0005-drm-amdgpu-use-DRM_SCHED_FENCE_DONT_PIPELINE-for-VM-.patch
- 0006-drm-i915-Fix-unhandled-deadlock-in-grab_vma.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
@@ -106,12 +105,11 @@ sha256sums=('39e57fcd84cd70bfa3e1a4185d3aa0ed7f1432f24c6548d16326b0c3c9541dd0'
'848ccd048f91b17f0e0192d2900c462986eeacf78bb578b2de9498c4a0526983'
'3a8f397b89bad95c46f42c0f80ede7536a4a45a28621e00ed486918a55f905ed'
'85b197dbe033264925b4803b3c8907ed73b967061c098e269eacd5575d6da34b'
- '05a9b754ff501c45833238db1f304533a3b0aec3f9281cb8381c580066a2eff5'
- '800804877e411394cd7aa77884054e0447da51b5fb010e3f3f992bfe41e41fba'
- '3f5a6fc58ae54bcfd95e147a2156c501eecfd9fcf2a9ceed056df87d59954af8'
- '9aeaddde2dd4bca54ee00ee11a53677a3afe82c61543c416708edaa0f27097c9'
- '5d22887375ab7a8615b7ad84445d5c62350be23873396222c48f6e39dd64161c'
- '966f24db411f100a2c7028c7e26814fa34a742f55a236df5df5357174404750a')
+ '09d6205b2550143a3a7b2614f10610a00a7b3bbe26aadaa7c128d87f662e5f76'
+ 'cade95b098bd1ccd14f1cf111e95572b61dc72099ebe767e75beca4ead12cc40'
+ '83553cf53bd06efc20a3f432562358c160f1517dad88694c2ff2389df5cc38f9'
+ '1a123dcf3c4b797eec0bac0ffe13ff015b95f21ca4ae40800e1a03f1d74c420a'
+ '9d855466dfb15f3e9a57db77c58ed57c59d0db0e677787653491ae44fc5d0f86')
prepare() {
cd linux-${pkgver}