From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: "Michał Winiarski" <michal.winiarski@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH v3 3/3] drm/i915/gtt: Free unused lower-level page tables
Date: Mon, 10 Oct 2016 16:39:52 +0300 [thread overview]
Message-ID: <1476106792.3897.27.camel@linux.intel.com> (raw)
In-Reply-To: <1475865562-2879-1-git-send-email-michal.winiarski@intel.com>
On pe, 2016-10-07 at 20:39 +0200, Michał Winiarski wrote:
> Since "Dynamic page table allocations" were introduced, our page tables
> can grow (being dynamically allocated) with address space range usage.
> Unfortunately, their lifetime is bound to vm. This is not a huge problem
> when we're not using softpin - drm_mm is creating an upper bound on used
> range by causing addresses for our VMAs to eventually be reused.
>
> With softpin, long lived contexts can drain the system out of memory
> even with a single "small" object. For example:
>
> bo = bo_alloc(size);
> while(true)
> offset += size;
> exec(bo, offset);
>
> Will cause us to create new allocations until all memory in the system
> is used for tracking GPU pages (even though almost all PTEs in this vm
> are pointing to scratch).
>
> Let's free unused page tables in clear_range to prevent this - if no
> entries are used, we can safely free it and return this information to
> the caller (so that higher-level entry is pointing to scratch).
>
> v2: Document return value and free semantics (Joonas)
> v3: No newlines in vars block (Joonas)
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Now that we're using Patchwork for CI, better always send the whole
series so that testing catches it properly.
Once the CI results are in and OK, can be merged.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-10 13:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 13:17 [PATCH v2 1/3] drm/i915: Remove unused "valid" parameter from pte_encode Michał Winiarski
2016-10-07 13:17 ` [PATCH v2 2/3] drm/i915/gtt: Split gen8_ppgtt_clear_pte_range Michał Winiarski
2016-10-10 13:12 ` Mika Kuoppala
2016-10-10 13:37 ` Joonas Lahtinen
2016-10-07 13:17 ` [PATCH v2 3/3] drm/i915/gtt: Free unused lower-level page tables Michał Winiarski
2016-10-07 18:39 ` [PATCH v3 " Michał Winiarski
2016-10-10 12:26 ` Chris Wilson
2016-10-10 13:39 ` Joonas Lahtinen [this message]
2016-10-10 12:14 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] drm/i915: Remove unused "valid" parameter from pte_encode (rev2) 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=1476106792.3897.27.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.winiarski@intel.com \
--cc=mika.kuoppala@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