From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: Re: [PATCH 1/7] drm/i915/gtt: Defer address space cleanup to an RCU worker
Date: Thu, 20 Jun 2019 17:51:54 +0100 [thread overview]
Message-ID: <762064d7-b00f-57fd-33e2-b92ee7da1df9@linux.intel.com> (raw)
In-Reply-To: <156095621331.21217.2570744388023676419@skylake-alporthouse-com>
On 19/06/2019 15:56, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-06-19 15:51:18)
>>
>> On 19/06/2019 12:23, Chris Wilson wrote:
>>> Enable RCU protection of i915_address_space and its ppgtt superclasses,
>>> and defer its cleanup into a worker executed after an RCU grace period.
>>>
>>> In the future we will be able to use the RCU protection to reduce the
>>> locking around VM lookups, but the immediate benefit is being able to
>>> defer the release into a kworker (process context). This is required as
>>> we may need to sleep to reap the WC pages stashed away inside the ppgtt.
>>
>> I can't see that it adds RCU protection apart from using queue_rcu_work
>> for some reason.
>
> That provides the RCU safe freeing, yes. My intentional is to use the
> rcu read lock around the vm lookup + kref when dropping the struct_mutex
> there.
>
>> It _seems_ like it could just as well use normal
>> deferred worker? RCU may have a benefit of being relaxed in timing ie we
>> don't care it happens immediately, but also don't want to put some made
>> up time period against it. So it's all about natural batching only at
>> this point?
>
> At this moment, to fix up the current bug and to allow i915_active to be
> struct_mutex-less, we need to defer the i915_vm_release and
> gen8_ppgtt_release to process context. Hence using the worker callback
> and not the regular softirq-context rcu callback.
It's fine by me, I just wanted for some reassurances about future plans. :)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2019-06-20 16:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 11:23 [PATCH 1/7] drm/i915/gtt: Defer address space cleanup to an RCU worker Chris Wilson
2019-06-19 11:23 ` [PATCH 2/7] drm/i915: Track i915_active using debugobjects Chris Wilson
2019-06-19 11:23 ` [PATCH 3/7] drm/i915: Signal fence completion from i915_request_wait Chris Wilson
2019-06-19 14:27 ` Tvrtko Ursulin
2019-06-19 14:35 ` Chris Wilson
2019-06-19 11:23 ` [PATCH 4/7] drm/i915: Remove waiting & retiring from shrinker paths Chris Wilson
2019-06-19 11:23 ` [PATCH 5/7] drm/i915: Throw away the active object retirement complexity Chris Wilson
2019-06-19 11:23 ` [PATCH 6/7] drm/i915: Provide an i915_active.acquire callback Chris Wilson
2019-06-19 11:23 ` [PATCH 7/7] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-06-19 11:53 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915/gtt: Defer address space cleanup to an RCU worker Patchwork
2019-06-19 11:56 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-19 12:34 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-06-19 14:51 ` [PATCH 1/7] " Tvrtko Ursulin
2019-06-19 14:56 ` Chris Wilson
2019-06-20 16:51 ` Tvrtko Ursulin [this message]
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=762064d7-b00f-57fd-33e2-b92ee7da1df9@linux.intel.com \
--to=tvrtko.ursulin@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.