All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Yucong <slaoub@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: akpm@linux-foundation.org, mgorman@suse.de, hannes@cmpxchg.org,
	mhocko@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list()
Date: Thu, 12 Jun 2014 21:25:13 +0800	[thread overview]
Message-ID: <1402579513.1106.13.camel@debian> (raw)
In-Reply-To: <5399A0F3.8040106@redhat.com>

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
take.
If the those arguments is wrapped to arg_container, we just need to pass
one pointer to shrink_page_list instead of five.

thx!
cyc  

--
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: Chen Yucong <slaoub@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: akpm@linux-foundation.org, mgorman@suse.de, hannes@cmpxchg.org,
	mhocko@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list()
Date: Thu, 12 Jun 2014 21:25:13 +0800	[thread overview]
Message-ID: <1402579513.1106.13.camel@debian> (raw)
In-Reply-To: <5399A0F3.8040106@redhat.com>

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
take.
If the those arguments is wrapped to arg_container, we just need to pass
one pointer to shrink_page_list instead of five.

thx!
cyc  


  reply	other threads:[~2014-06-12 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  9:36 [PATCH] mm/vmscan.c: wrap five parameters into arg_container in shrink_page_list() Chen Yucong
2014-06-12  9:36 ` Chen Yucong
2014-06-12 12:45 ` Rik van Riel
2014-06-12 12:45   ` Rik van Riel
2014-06-12 13:25   ` Chen Yucong [this message]
2014-06-12 13:25     ` Chen Yucong
2014-06-12 20:00 ` Andrew Morton
2014-06-12 20:00   ` 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=1402579513.1106.13.camel@debian \
    --to=slaoub@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.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.