lkml.org 
[lkml]   [2006]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH -mm 1/2] mm: make shrink_all_memory overflow-resistant
On 2/27/06, Pavel Machek <pavel@suse.cz> wrote:
> On Po 27-02-06 19:53:47, Jesper Juhl wrote:
> > On 2/27/06, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > Make shrink_all_memory() overflow-resistant.
> > >
> > >
> > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > ---
> > > include/linux/swap.h | 2 +-
> > > mm/vmscan.c | 9 +++++----
> > > 2 files changed, 6 insertions(+), 5 deletions(-)
> > >
> > > Index: linux-2.6.16-rc4-mm2/mm/vmscan.c
> > > ===================================================================
> > > --- linux-2.6.16-rc4-mm2.orig/mm/vmscan.c
> > > +++ linux-2.6.16-rc4-mm2/mm/vmscan.c
> > > @@ -1785,18 +1785,19 @@ void wakeup_kswapd(struct zone *zone, in
> > > * Try to free `nr_pages' of memory, system-wide. Returns the number of freed
> > > * pages.
> > > */
> > > -int shrink_all_memory(unsigned long nr_pages)
> > > +unsigned long shrink_all_memory(unsigned int nr_pages)
> >
> > What about the callers of shrink_all_memory() who currently expect it
> > to return an int, have you checked how they will react to you changing
> > the return type (and signedness) ?
>
> That's okay, we checked all 3 callers :-).

I'm sure you did, I'm not saying you didn't.
All I'm asking for is a short explanation of why the changes the patch
makes are correct since that's not obvious to me, and I'd like to
understand the patch.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-27 20:09    [W:0.094 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site