linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Kuo-Hsin Yang <vovoy@chromium.org>, Michal Hocko <mhocko@kernel.org>
Cc: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	linux-mm@kvack.org, akpm@linux-foundation.org,
	peterz@infradead.org, dave.hansen@intel.com, corbet@lwn.net,
	hughd@google.com, joonas.lahtinen@linux.intel.com,
	marcheu@chromium.org, hoegsberg@chromium.org
Subject: Re: [PATCH 2/2] drm/i915: Mark pinned shmemfs pages as unevictable
Date: Tue, 16 Oct 2018 19:31:06 +0100	[thread overview]
Message-ID: <153971466599.22931.16793398326492316920@skylake-alporthouse-com> (raw)
In-Reply-To: <20181016182155.GW18839@dhcp22.suse.cz>

Quoting Michal Hocko (2018-10-16 19:21:55)
> On Wed 17-10-18 01:43:00, Kuo-Hsin Yang wrote:
> > The i915 driver use shmemfs to allocate backing storage for gem objects.
> > These shmemfs pages can be pinned (increased ref count) by
> > shmem_read_mapping_page_gfp(). When a lot of pages are pinned, vmscan
> > wastes a lot of time scanning these pinned pages. Mark these pinned
> > pages as unevictable to speed up vmscan.
> 
> I would squash the two patches into the single one. One more thing
> though. One more thing to be careful about here. Unless I miss something
> such a page is not migrateable so it shouldn't be allocated from a
> movable zone. Does mapping_gfp_constraint contains __GFP_MOVABLE? If
> yes, we want to drop it as well. Other than that the patch makes sense
> with my very limited knowlege of the i915 code of course.

They are not migrateable today. But we have proposed hooking up
.migratepage and setting __GFP_MOVABLE which would then include unlocking
the mapping at migrate time.

Fwiw, the shmem_unlock_mapping() call feels quite expensive, almost
nullifying the advantage gained from not walking the lists in reclaim.
I'll have better numbers in a couple of days.
-Chris

  reply	other threads:[~2018-10-16 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 17:42 [PATCH 0/2] shmem, drm/i915: Mark pinned shmemfs pages as unevictable Kuo-Hsin Yang
2018-10-16 17:42 ` [PATCH 1/2] shmem: export shmem_unlock_mapping Kuo-Hsin Yang
2018-10-16 17:43 ` [PATCH 2/2] drm/i915: Mark pinned shmemfs pages as unevictable Kuo-Hsin Yang
2018-10-16 18:21   ` Michal Hocko
2018-10-16 18:31     ` Chris Wilson [this message]
2018-10-16 19:13       ` Michal Hocko
2018-10-18  6:56       ` Chris Wilson
2018-10-18  8:15         ` Michal Hocko
2018-10-17  8:58 ` [PATCH v2] shmem, drm/i915: mark " Kuo-Hsin Yang

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=153971466599.22931.16793398326492316920@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@intel.com \
    --cc=hoegsberg@chromium.org \
    --cc=hughd@google.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcheu@chromium.org \
    --cc=mhocko@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vovoy@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).