From: "Goel, Akash" <akash.goel@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org, Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org
Cc: Sourab Gupta <sourab.gupta@intel.com>,
akash.goels@gmail.com, akash.goel@intel.com
Subject: Re: [PATCH 2/2] drm/i915: Make GPU pages movable
Date: Fri, 4 Nov 2016 19:23:05 +0530 [thread overview]
Message-ID: <806a1044-c67b-9030-31c9-eb35f5a83fa4@intel.com> (raw)
In-Reply-To: <20161104133747.GB20322@nuc-i3427.alporthouse.com>
On 11/4/2016 7:07 PM, Chris Wilson wrote:
> Best if we send these as a new series to unconfuse CI.
>
Okay will send as a new series.
> On Fri, Nov 04, 2016 at 06:18:26PM +0530, akash.goel@intel.com wrote:
>> +static int do_migrate_page(struct drm_i915_gem_object *obj)
>> +{
>> + struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
>> + int ret = 0;
>> +
>> + if (!can_migrate_page(obj))
>> + return -EBUSY;
>> +
>> + /* HW access would be required for a GGTT bound object, for which
>> + * device has to be kept awake. But a deadlock scenario can arise if
>> + * the attempt is made to resume the device, when either a suspend
>> + * or a resume operation is already happening concurrently from some
>> + * other path and that only also triggers compaction. So only unbind
>> + * if the device is currently awake.
>> + */
>> + if (!intel_runtime_pm_get_if_in_use(dev_priv))
>> + return -EBUSY;
>> +
>> + i915_gem_object_get(obj);
>> + if (!unsafe_drop_pages(obj))
>> + ret = -EBUSY;
>> + i915_gem_object_put(obj);
>
> Since the object release changes, we can now do this without the
> i915_gem_object_get / i915_gem_object_put (as we are guarded by the BKL
> struct_mutex).
Fine will remove object_get/put as with struct_mutex protection object
can't disappear across unsafe_drop_pages().
Best regards
Akash
> -Chris
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-11-04 13:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 6:09 [PATCH 1/2] shmem: Support for registration of Driver/file owner specific ops akash.goel
2016-03-23 6:09 ` [PATCH 2/2] drm/i915: Make pages of GFX allocations movable akash.goel
2016-03-23 7:58 ` Chris Wilson
2016-03-23 8:25 ` Goel, Akash
2016-03-24 8:13 ` Chris Wilson
2016-03-24 18:22 ` [PATCH v2 " akash.goel
2016-03-24 18:40 ` Chris Wilson
2016-04-04 11:27 ` [PATCH v3 " akash.goel
2016-03-24 12:11 ` [Intel-gfx] [PATCH 1/2] shmem: Support for registration of Driver/file owner specific ops Joonas Lahtinen
2016-10-19 15:11 ` akash goel
2016-10-20 15:15 ` Joonas Lahtinen
2016-11-04 12:48 ` [PATCH 1/2] shmem: Support for registration of driver/file " akash.goel
2016-11-04 12:48 ` [PATCH 2/2] drm/i915: Make GPU pages movable akash.goel
2016-11-04 13:37 ` Chris Wilson
2016-11-04 13:53 ` Goel, Akash [this message]
2016-11-04 15:02 [PATCH 1/2] shmem: Support for registration of driver/file owner specific ops akash.goel
2016-11-04 15:02 ` [PATCH 2/2] drm/i915: Make GPU pages movable akash.goel
2016-11-09 11:28 ` Daniel Vetter
2016-11-09 18:36 ` Hugh Dickins
2016-11-10 6:39 ` Hugh Dickins
2016-11-10 7:30 ` Goel, Akash
2016-11-14 7:57 ` akash goel
2016-11-16 1:25 ` Hugh Dickins
2016-11-16 5:13 ` akash goel
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=806a1044-c67b-9030-31c9-eb35f5a83fa4@intel.com \
--to=akash.goel@intel.com \
--cc=akash.goels@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=hughd@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-mm@kvack.org \
--cc=sourab.gupta@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox