From: Dave Chinner <dchinner@redhat.com>
To: Oskar Andero <oskar.andero@sonymobile.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Radovan Lekanovic <radovan.lekanovic@sonymobile.com>,
David Rientjes <rientjes@google.com>,
Glauber Costa <glommer@openvz.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects
Date: Thu, 16 May 2013 21:52:12 +1000 [thread overview]
Message-ID: <20130516115212.GC11167@devil.localdomain> (raw)
In-Reply-To: <1368693736-15486-1-git-send-email-oskar.andero@sonymobile.com>
On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote:
> The shrinkers must return -1 to indicate that it is busy. Instead, treat
> any negative value as busy.
Why? The API defines return condition for aborting a scan and gives
a specific value for doing that. i.e. explain why should change the
API to over-specify the 'abort scan" return value like this.
FWIW, using "any" negative number for "abort scan" is a bad API
design decision. It means that in future we can't introduce
different negative return values in the API if we have a new to.
i.e. each specific negative return value needs to have the potential
for defining a different behaviour.
So if any change needs to be made, it is to change the -1 return
value to an enum and have the shrinkers return that enum when they
want an abort.
-Dave.
--
Dave Chinner
dchinner@redhat.com
--
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: Dave Chinner <dchinner@redhat.com>
To: Oskar Andero <oskar.andero@sonymobile.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Radovan Lekanovic <radovan.lekanovic@sonymobile.com>,
David Rientjes <rientjes@google.com>,
Glauber Costa <glommer@openvz.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects
Date: Thu, 16 May 2013 21:52:12 +1000 [thread overview]
Message-ID: <20130516115212.GC11167@devil.localdomain> (raw)
In-Reply-To: <1368693736-15486-1-git-send-email-oskar.andero@sonymobile.com>
On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote:
> The shrinkers must return -1 to indicate that it is busy. Instead, treat
> any negative value as busy.
Why? The API defines return condition for aborting a scan and gives
a specific value for doing that. i.e. explain why should change the
API to over-specify the 'abort scan" return value like this.
FWIW, using "any" negative number for "abort scan" is a bad API
design decision. It means that in future we can't introduce
different negative return values in the API if we have a new to.
i.e. each specific negative return value needs to have the potential
for defining a different behaviour.
So if any change needs to be made, it is to change the -1 return
value to an enum and have the shrinkers return that enum when they
want an abort.
-Dave.
--
Dave Chinner
dchinner@redhat.com
next prev parent reply other threads:[~2013-05-16 11:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 8:42 [PATCH] mm: vmscan: handle any negative return value from scan_objects Oskar Andero
2013-05-16 8:42 ` Oskar Andero
2013-05-16 11:52 ` Dave Chinner [this message]
2013-05-16 11:52 ` Dave Chinner
2013-05-16 12:27 ` Oskar Andero
2013-05-16 12:27 ` Oskar Andero
2013-05-17 6:33 ` Dave Chinner
2013-05-17 6:33 ` Dave Chinner
2013-05-17 8:00 ` Oskar Andero
2013-05-17 8:00 ` Oskar Andero
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=20130516115212.GC11167@devil.localdomain \
--to=dchinner@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=glommer@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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.