From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, riel@redhat.com
Subject: [PATCH 2/3] swap-token: makes global variables to function local
Date: Wed, 25 May 2011 12:12:55 +0900 [thread overview]
Message-ID: <4DDC73B7.1050409@jp.fujitsu.com> (raw)
In-Reply-To: <4DDB1388.2080102@jp.fujitsu.com>
global_faults and last_aging are only used in grab_swap_token().
Then, they can be moved into grab_swap_token().
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
mm/thrash.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/thrash.c b/mm/thrash.c
index 0d41ff0..0504e8a 100644
--- a/mm/thrash.c
+++ b/mm/thrash.c
@@ -30,14 +30,14 @@
static DEFINE_SPINLOCK(swap_token_lock);
struct mm_struct *swap_token_mm;
struct mem_cgroup *swap_token_memcg;
-static unsigned int global_faults;
-static unsigned int last_aging;
void grab_swap_token(struct mm_struct *mm)
{
int current_interval;
unsigned int old_prio = mm->token_priority;
struct mem_cgroup *memcg;
+ static unsigned int global_faults;
+ static unsigned int last_aging;
global_faults++;
--
1.7.3.1
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-05-25 3:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 2:30 [PATCH v2 1/3] vmscan,memcg: memcg aware swap token KOSAKI Motohiro
2011-05-19 2:32 ` [PATCH v2 2/3] vmscan: implement swap token trace KOSAKI Motohiro
2011-05-19 2:34 ` [PATCH v2 3/3] vmscan: implement swap token priority aging KOSAKI Motohiro
2011-05-20 19:30 ` Andrew Morton
2011-05-24 2:10 ` KOSAKI Motohiro
2011-05-25 3:02 ` [PATCH 1/3] swap-token: fix dead link KOSAKI Motohiro
2011-05-25 12:27 ` Rik van Riel
2011-05-25 3:12 ` KOSAKI Motohiro [this message]
2011-05-25 12:27 ` [PATCH 2/3] swap-token: makes global variables to function local Rik van Riel
2011-05-25 3:13 ` [PATCH 3/3] swap-token: add a comment for priority aging KOSAKI Motohiro
2011-05-25 12:28 ` Rik van Riel
2011-05-26 20:35 ` [PATCH v2 1/3] vmscan,memcg: memcg aware swap token Andrew Morton
2011-05-30 7:44 ` KOSAKI Motohiro
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=4DDC73B7.1050409@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).