From: David Rientjes <rientjes@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Dolkow, Snild" <Snild.Dolkow@sonymobile.com>,
Oskar.Andero@sonymobile.com,
Dan Carpenter <dan.carpenter@oracle.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"Lekanovic, Radovan" <Radovan.Lekanovic@sonymobile.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Brian Swetland <swetland@google.com>
Subject: Re: [PATCH] lowmemorykiller: prevent multiple instances of low memory killer
Date: Mon, 15 Apr 2013 16:11:18 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1304151608040.13614@chino.kir.corp.google.com> (raw)
In-Reply-To: <20130415194947.GA26557@kroah.com>
On Mon, 15 Apr 2013, Greg Kroah-Hartman wrote:
> > The positive numbers are used to return information on the remaining
> > cache size (again, see the comment I pasted above). We could use
> > -EBUSY, but we'd have to change vmscan.c, which checks specifically
> > for -1. I can't see a technical reason why -EBUSY couldn't have been
> > chosen instead, but there's also no real reason to change it now.
>
> If it's not the correct thing to do, sure we can change it, just send a
> patch. It makes way more sense than some random -1 return value to me.
>
> Care to send a series of patches fixing this up properly?
>
The comment in shrinker.h is misleading, not the source code.
do_shrinker_shrink() will fail for anything negative and 0. The patch
being discussed could easily use -1 or 0 hardcoded into the return value,
forget the definition of LMK_BUSY.
Also, please consider using an atomic chmpxchg instead of a spinlock: if
you're only ever doing spin_trylock() then you don't need a spinlock.
next prev parent reply other threads:[~2013-04-15 23:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 13:03 Oskar Andero
2013-04-15 13:18 ` Dan Carpenter
2013-04-15 13:38 ` Dolkow, Snild
2013-04-15 14:13 ` Dan Carpenter
2013-04-15 15:03 ` Oskar Andero
2013-04-15 18:28 ` Dolkow, Snild
2013-04-15 19:49 ` Greg Kroah-Hartman
2013-04-15 23:11 ` David Rientjes [this message]
2013-04-16 6:19 ` Dan Carpenter
2013-04-16 10:59 ` Oskar Andero
2013-04-16 20:00 ` David Rientjes
2013-04-23 21:54 ` Oskar Andero
2013-04-24 8:33 ` Dolkow, Snild
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=alpine.DEB.2.02.1304151608040.13614@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=Oskar.Andero@sonymobile.com \
--cc=Radovan.Lekanovic@sonymobile.com \
--cc=Snild.Dolkow@sonymobile.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swetland@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®