Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
On Wed, Nov 10, 2021 at 11:13:37AM +0106, John Ogness wrote: > Even after we introduce kthread printers, there will still be situations > where direct printing is used: booting (before kthreads exist) and > shutdown/suspend/crash situations, when the kthreads may not be > active. Although I'm unaw

Re: printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
On Wed, Nov 10, 2021 at 10:00:35AM +0100, Vincent Guittot wrote: > Is it the same SCHED_WARN_ON(rq->tmp_alone_branch != > &rq->leaf_cfs_rq_list); that generates the deadlock on v5.15 too ? > > one remaining tmp_alone_branch warning has been fixed in v5.15 with > 2630cde26711 ("sched/fair: Add ance

printk deadlock due to double lock attempt on current CPU's runqueue

2021-11-10 Thread Sultan Alsawaf
Hi, I encountered a printk deadlock on 5.13 which appears to still affect the latest kernel. The deadlock occurs due to printk being used while having the current CPU's runqueue locked, and the underlying framebuffer console attempting to lock the same runqueue when printk tries to flush the log b

Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks

2020-04-21 Thread Sultan Alsawaf
On Tue, Apr 21, 2020 at 09:51:37AM +0300, Joonas Lahtinen wrote: > Quoting Sultan Alsawaf (2020-04-20 19:15:14) > > On Mon, Apr 20, 2020 at 11:21:42AM +0300, Joonas Lahtinen wrote: > > > So it seems that the patch got pulled into v5.6 and has been backported > >

Re: [PATCH v2] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-21 Thread Sultan Alsawaf
On Tue, Apr 21, 2020 at 11:04:13AM +0300, Joonas Lahtinen wrote: > Quoting Sultan Alsawaf (2020-04-20 18:42:16) > > On Mon, Apr 20, 2020 at 12:02:39PM +0300, Joonas Lahtinen wrote: > > > I think the the patch should be dropped for now before the issue is > > > pr

Re: [PATCH v2] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-20 Thread Sultan Alsawaf
On Mon, Apr 20, 2020 at 12:02:39PM +0300, Joonas Lahtinen wrote: > I think the the patch should be dropped for now before the issue is > properly addressed. Either by backporting the mainline fixes or if > those are too big and there indeed is a smaller alternative patch > that is properly reviewed

Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks

2020-04-20 Thread Sultan Alsawaf
On Mon, Apr 20, 2020 at 11:21:42AM +0300, Joonas Lahtinen wrote: > So it seems that the patch got pulled into v5.6 and has been backported > to v5.5 but not v5.4. You're right, that's my mistake. > In doing that zeroing of ring->vaddr is removed so the test to do mdelay(1) > and "ring->vaddr = NU

Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks

2020-04-19 Thread Sultan Alsawaf
Chris, Could you please look at this in earnest? This is a real bug that crashes my laptop without any kind of provocation. It is undeniably a bug in i915, and I've clearly described it in my patch. If you dont like the patch, I'm open to any suggestions you have for an alternative solution. My go

Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks

2020-04-15 Thread Sultan Alsawaf
On Tue, Apr 14, 2020 at 09:23:56AM +0100, Chris Wilson wrote: > Quoting Sultan Alsawaf (2020-04-14 07:13:12) > > Chris, > > > > Could you please take a look at this? This really is quite an important fix. > > It's crazy. See a266bf420060 for a patch that should b

Re: [PATCH 1/1] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-15 Thread Sultan Alsawaf
On Tue, Apr 14, 2020 at 09:13:28AM +0100, Chris Wilson wrote: > Quoting Sultan Alsawaf (2020-04-07 07:26:22) > > From: Sultan Alsawaf > > > > The following deadlock exists in i915_active_wait() due to a double lock > > on ref->mutex (call chain list

Re: [PATCH v2] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-15 Thread Sultan Alsawaf
On Tue, Apr 14, 2020 at 09:15:07AM +0100, Chris Wilson wrote: > The patch does not fix a deadlock. Greg, this patch is not a backport of > a bugfix, why is it in stable? > -Chris Here's the deadlock this supposedly doesn't fix: INFO: task kswapd0:178 blocked for more than 122 seconds. Tainte

Re: [PATCH v4] drm/i915: Synchronize active and retire callbacks

2020-04-14 Thread Sultan Alsawaf
Chris, Could you please take a look at this? This really is quite an important fix. Thanks, Sultan ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-11 Thread Sultan Alsawaf
On Fri, Apr 10, 2020 at 11:08:38AM +0200, Greg KH wrote: > On Tue, Apr 07, 2020 at 12:18:09AM -0700, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > > > The following deadlock exists in i915_active_wait() due to a double lock > > on ref->mutex (call chain list

Re: [PATCH v2] drm/i915: Fix ref->mutex deadlock in i915_active_wait()

2020-04-11 Thread Sultan Alsawaf
On Fri, Apr 10, 2020 at 11:08:38AM +0200, Greg KH wrote: > On Tue, Apr 07, 2020 at 12:18:09AM -0700, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > > > The following deadlock exists in i915_active_wait() due to a double lock > > on ref->mutex (call chain list

Re: [PATCH v3] drm/i915: Synchronize active and retire callbacks

2020-04-04 Thread Sultan Alsawaf
On Fri, Apr 03, 2020 at 03:35:15PM -0700, Sultan Alsawaf wrote: > + ref->retire(ref); > + mutex_unlock(&ref->callback_lock); Ugh, this patch is still wrong because the mutex unlock after ref->retire() is a use-after-free. F

[PATCH 2/2] drm/i915/gt: Schedule request retirement when timeline idles

2020-03-31 Thread Sultan Alsawaf
c97c3b3712d8d87295ea757cc51) Signed-off-by: Joonas Lahtinen Cc: # 5.4.x Signed-off-by: Sultan Alsawaf --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 8 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 8 ++ drivers/gpu/drm/i915/gt/in

[PATCH 0/2] A couple of important fixes for i915 on 5.4

2020-03-31 Thread Sultan Alsawaf
From: Sultan Alsawaf Hi, This patchset contains fixes for two pesky i915 bugs that exist in 5.4. The first bug, fixed by "drm/i915/gt: Schedule request retirement when timeline idles" upstream, is very high power consumption by i915 hardware due to an old commit that broke the RC6 p

Re: [PATCH 2/2] drm/i915/gt: Schedule request retirement when timeline idles

2020-03-31 Thread Sultan Alsawaf
CC'ing relevant folks. My apologies. Sultan ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 0/2] A couple of important fixes for i915 on 5.4

2020-03-31 Thread Sultan Alsawaf
On Mon, Mar 30, 2020 at 10:51:28AM +0200, Greg KH wrote: > On Sun, Mar 29, 2020 at 08:30:55PM -0700, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > > > Hi, > > > > This patchset contains fixes for two pesky i915 bugs that exist in 5.4. > > Any re