[lkml]   [2014]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list()
On Thu, 2014-06-12 at 08:45 -0400, Rik van Riel wrote:
> > shrink_page_list() has too many arguments that have already reached
> ten.
> > Some of those arguments and temporary variables introduces extra 80
> bytes
> > on the stack.
> >
> > This patch wraps five parameters into arg_container and removes some
> temporary
> > variables, thus making shrink_page_list() to consume fewer stack
> space.
> Won't the container with those arguments now live on the stack,
> using up the same space that the variables used to take?
Of course, the container with those arguments live on the stack.

One of the key reason for introducing this patch is to avoid passing
five pointer arguments to shrink_page_list().

The arg_container also uses up the same space that the variables used to
If the those arguments is wrapped to arg_container, we just need to pass
one pointer to shrink_page_list instead of five.


 \ /
  Last update: 2014-06-12 16:21    [W:0.024 / U:3.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site