All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Oskar Andero <oskar.andero@sonymobile.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Hugh Dickins <hughd@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Radovan Lekanovic <radovan.lekanovic@sonymobile.com>,
	David Rientjes <rientjes@google.com>,
	Dave Chinner <david@fromorbit.com>, Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC PATCH 0/2] return value from shrinkers
Date: Tue, 14 May 2013 19:03:23 +0400	[thread overview]
Message-ID: <5192523B.7030805@parallels.com> (raw)
In-Reply-To: <1368454595-5121-1-git-send-email-oskar.andero@sonymobile.com>

On 05/13/2013 06:16 PM, Oskar Andero wrote:
> Hi,
> 
> In a previous discussion on lkml it was noted that the shrinkers use the
> magic value "-1" to signal that something went wrong.
> 
> This patch-set implements the suggestion of instead using errno.h values
> to return something more meaningful.
> 
> The first patch simply changes the check from -1 to any negative value and
> updates the comment accordingly.
> 
> The second patch updates the shrinkers to return an errno.h value instead
> of -1. Since this one spans over many different areas I need input on what is
> a meaningful return value. Right now I used -EBUSY on everything for consitency.
> 
> What do you say? Is this a good idea or does it make no sense at all?
> 
> Thanks!
> 

Right now me and Dave are completely reworking the way shrinkers
operate. I suggest, first of all, that you take a look at that cautiously.

On the specifics of what you are doing here, what would be the benefit
of returning something other than -1 ? Is there anything we would do
differently for a return value lesser than 1?

So far, shrink_slab behaves the same, you are just expanding the test.
If you really want to push this through, I would suggest coming up with
a more concrete reason for why this is wanted.

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: Oskar Andero <oskar.andero@sonymobile.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	Hugh Dickins <hughd@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Radovan Lekanovic <radovan.lekanovic@sonymobile.com>,
	David Rientjes <rientjes@google.com>,
	Dave Chinner <david@fromorbit.com>, Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC PATCH 0/2] return value from shrinkers
Date: Tue, 14 May 2013 19:03:23 +0400	[thread overview]
Message-ID: <5192523B.7030805@parallels.com> (raw)
In-Reply-To: <1368454595-5121-1-git-send-email-oskar.andero@sonymobile.com>

On 05/13/2013 06:16 PM, Oskar Andero wrote:
> Hi,
> 
> In a previous discussion on lkml it was noted that the shrinkers use the
> magic value "-1" to signal that something went wrong.
> 
> This patch-set implements the suggestion of instead using errno.h values
> to return something more meaningful.
> 
> The first patch simply changes the check from -1 to any negative value and
> updates the comment accordingly.
> 
> The second patch updates the shrinkers to return an errno.h value instead
> of -1. Since this one spans over many different areas I need input on what is
> a meaningful return value. Right now I used -EBUSY on everything for consitency.
> 
> What do you say? Is this a good idea or does it make no sense at all?
> 
> Thanks!
> 

Right now me and Dave are completely reworking the way shrinkers
operate. I suggest, first of all, that you take a look at that cautiously.

On the specifics of what you are doing here, what would be the benefit
of returning something other than -1 ? Is there anything we would do
differently for a return value lesser than 1?

So far, shrink_slab behaves the same, you are just expanding the test.
If you really want to push this through, I would suggest coming up with
a more concrete reason for why this is wanted.


  parent reply	other threads:[~2013-05-14 15:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 14:16 [RFC PATCH 0/2] return value from shrinkers Oskar Andero
2013-05-13 14:16 ` Oskar Andero
2013-05-13 14:16 ` [RFC PATCH 1/2] mm: vmscan: let any negative return value from shrinker mean error Oskar Andero
2013-05-13 14:16   ` Oskar Andero
2013-05-16  0:47   ` Dave Chinner
2013-05-16  0:47     ` Dave Chinner
2013-05-13 14:16 ` [RFC PATCH 2/2] Clean-up shrinker return values Oskar Andero
2013-05-13 14:16   ` Oskar Andero
2013-05-14 15:03 ` Glauber Costa [this message]
2013-05-14 15:03   ` [RFC PATCH 0/2] return value from shrinkers Glauber Costa
2013-05-15 14:10   ` Oskar Andero
2013-05-15 14:10     ` Oskar Andero
2013-05-15 14:18     ` Glauber Costa
2013-05-15 14:18       ` Glauber Costa
2013-05-15 14:47       ` Oskar Andero
2013-05-15 14:47         ` Oskar Andero
2013-05-15 14:49         ` Glauber Costa
2013-05-15 14:49           ` Glauber Costa
2013-05-16  8:20           ` Oskar Andero
2013-05-16  8:20             ` Oskar Andero
2013-05-16  8:23             ` Glauber Costa
2013-05-16  8:23               ` Glauber Costa
2013-05-15 23:05 ` Andrew Morton
2013-05-15 23:05   ` Andrew Morton
2013-05-16  7:52   ` Oskar Andero
2013-05-16  7:52     ` Oskar Andero
2013-05-16 16:27     ` Andrew Morton
2013-05-16 16:27       ` Andrew Morton

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=5192523B.7030805@parallels.com \
    --to=glommer@parallels.com \
    --cc=david@fromorbit.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=oskar.andero@sonymobile.com \
    --cc=radovan.lekanovic@sonymobile.com \
    --cc=rientjes@google.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.