From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: Re: [PATCH 3/3] drm/i915: Flush the workqueue before draining
Date: Thu, 04 Jul 2019 15:39:49 +0300 [thread overview]
Message-ID: <87a7du2ctm.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <156223599157.25091.6847916886153823523@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2019-07-04 11:22:17)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>>
>> > Trying to drain a workqueue while we may still be adding to it from
>> > background tasks is, according to kernel/workqueue.c, verboten. So, add
>> > a flush_workqueue() at the start of our cleanup procedure.
>>
>> I don't get it. drain_workqueue does it's own flushing.
>
> Ordering is important here. The problem with drain_workqueue() is that
> is forbids us from adding more tasks into the workqueue as it drains, so
> before we drain we must plug.
>
> It's just adding more hammers. Eventually it'll break.
If so, then we just increase passes? :)
Ok, I was going to say we don't add to free work from
any of it's handlers.
But then realized this is not about the free list handling,
even tho the freed objects is drained along.
And yes, drain only handles flushing for it's chain.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-07-04 12:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 17:19 Just a selection of some fine brown paper bags Chris Wilson
2019-07-03 17:19 ` [PATCH 1/3] drm/i915/gem: Defer obj->base.resv fini until RCU callback Chris Wilson
2019-07-03 18:06 ` [PATCH v2] " Chris Wilson
2019-07-04 13:53 ` [PATCH 1/3] " Mika Kuoppala
2019-07-04 14:02 ` Chris Wilson
2019-07-04 14:18 ` Mika Kuoppala
2019-07-04 14:22 ` Chris Wilson
2019-07-03 17:19 ` [PATCH 2/3] drm/i915/gtt: Defer the free for alloc error paths Chris Wilson
2019-07-04 10:14 ` Mika Kuoppala
2019-07-04 10:28 ` Matthew Auld
2019-07-04 10:40 ` Chris Wilson
2019-07-04 10:58 ` Mika Kuoppala
2019-07-04 11:02 ` Chris Wilson
2019-07-04 11:40 ` Mika Kuoppala
2019-07-03 17:19 ` [PATCH 3/3] drm/i915: Flush the workqueue before draining Chris Wilson
2019-07-04 10:22 ` Mika Kuoppala
2019-07-04 10:26 ` Chris Wilson
2019-07-04 12:39 ` Mika Kuoppala [this message]
2019-07-03 19:36 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2] drm/i915/gem: Defer obj->base.resv fini until RCU callback (rev2) Patchwork
2019-07-03 19:53 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-05 0:35 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7du2ctm.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.