* 4.19-stable: Re: [PATCH 2/3] drm/i915: Break up error capture compression loops with cond_resched()
[not found] ` <20200916090059.3189-2-chris@chris-wilson.co.uk>
@ 2020-11-09 10:24 ` Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2020-11-09 10:24 UTC (permalink / raw)
To: Chris Wilson, kernel list; +Cc: intel-gfx, Mika Kuoppala, stable
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
Hi!
> As the error capture will compress user buffers as directed to by the
> user, it can take an arbitrary amount of time and space. Break up the
> compression loops with a call to cond_resched(), that will allow other
> processes to schedule (avoiding the soft lockups) and also serve as a
> warning should we try to make this loop atomic in the future.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: stable@vger.kernel.org
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
This was queued for 4.19-stable, but is very likely wrong.
> @@ -397,6 +399,7 @@ static int compress_page(struct i915_vma_compress *c,
> if (!(wc && i915_memcpy_from_wc(ptr, src, PAGE_SIZE)))
> memcpy(ptr, src, PAGE_SIZE);
> dst->pages[dst->page_count++] = ptr;
> + cond_resched();
>
> return 0;
> }
4.19 compress_page begins with
static int compress_page(struct compress *c,
...
page = __get_free_page(GFP_ATOMIC | __GFP_NOWARN);
and likely may not sleep. That changed with commit
a42f45a2a85998453078, but that one is not present in 4.19..
I believe we don't need this in stable: dumping of error file will not
take so long to trigger softlockup detectors... and if userland access
blocked, we would be able to reschedule, anyway.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-09 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200916090059.3189-1-chris@chris-wilson.co.uk>
[not found] ` <20200916090059.3189-2-chris@chris-wilson.co.uk>
2020-11-09 10:24 ` 4.19-stable: Re: [PATCH 2/3] drm/i915: Break up error capture compression loops with cond_resched() Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).