public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Keith Packard <keithp@keithp.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, airlied@linux.ie,
	dri-devel@lists.freedesktop.org
Cc: kosaki.motohiro@jp.fujitsu.com
Subject: Re: [PATCH] i915: slab shrinker have to return -1 if it cant shrink any objects
Date: Thu, 30 Jun 2011 09:55:55 +0100	[thread overview]
Message-ID: <1309424153_44559@CP5-2952> (raw)
In-Reply-To: <yuny60kt1nx.fsf@aiko.keithp.com>

On Wed, 29 Jun 2011 20:53:54 -0700, Keith Packard <keithp@keithp.com> wrote:
> On Fri, 24 Jun 2011 17:03:22 +0900, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> 
> > Now, i915_gem_inactive_shrink() should return -1 instead of 0 if it
> > can't take a lock. Otherwise, vmscan is getting a lot of confusing
> > because vmscan can't distinguish "can't take a lock temporary" and
> > "we've shrank all of i915 objects".
> 
> This doesn't look like the cleanest change possible. I think it would be
> better if the shrink function could uniformly return an error
> indication so that we wouldn't need the weird looking conditional return.

Unless I am mistaken, and there are more patches in flight, the return
code from i915_gem_inactive_shrink() is promoted to unsigned long and then
used in the calculation of how may objects to evict...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-06-30  9:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24  8:03 [PATCH] i915: slab shrinker have to return -1 if it can't shrink any objects KOSAKI Motohiro
2011-06-30  3:53 ` Keith Packard
2011-06-30  8:55   ` Chris Wilson [this message]
2011-07-12  9:36     ` [PATCH] i915: slab shrinker have to return -1 if it cant " KOSAKI Motohiro
2011-07-12 10:06       ` Chris Wilson
2011-07-13  0:19         ` KOSAKI Motohiro
2011-07-13  7:41           ` Chris Wilson
2011-07-13  8:19             ` KOSAKI Motohiro
2011-07-13  8:40               ` Chris Wilson
2011-07-13 11:34                 ` Dave Chinner
2011-07-13 10:42               ` Dave Chinner
2011-07-14  2:48                 ` KOSAKI Motohiro
2011-07-14  3:47                   ` Dave Chinner

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=1309424153_44559@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.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