linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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 3/3] swap-token: add a comment for priority aging
Date: Wed, 25 May 2011 12:13:28 +0900	[thread overview]
Message-ID: <4DDC73D8.5050900@jp.fujitsu.com> (raw)
In-Reply-To: <4DDB1388.2080102@jp.fujitsu.com>

Add to a few comment of design decision of swap token aging.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 mm/thrash.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/mm/thrash.c b/mm/thrash.c
index 0504e8a..8832edb 100644
--- a/mm/thrash.c
+++ b/mm/thrash.c
@@ -50,6 +50,17 @@ void grab_swap_token(struct mm_struct *mm)
 	if (!swap_token_mm)
 		goto replace_token;

+	/*
+	 * Usually, we don't need priority aging because long interval faults
+	 * makes priority decrease quickly. But there is one exception. If the
+	 * token owner task is sleeping, it never make long interval faults.
+	 * Thus, we need a priority aging mechanism instead. The requirements
+	 * of priority aging are
+	 *  1) An aging interval is reasonable enough long. Too short aging
+	 *     interval makes quick swap token lost and decrease performance.
+	 *  2) The swap token owner task have to get priority aging even if
+	 *     it's under sleep.
+	 */
 	if ((global_faults - last_aging) > TOKEN_AGING_INTERVAL) {
 		swap_token_mm->token_priority /= 2;
 		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>

  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       ` [PATCH 2/3] swap-token: makes global variables to function local KOSAKI Motohiro
2011-05-25 12:27         ` Rik van Riel
2011-05-25  3:13       ` KOSAKI Motohiro [this message]
2011-05-25 12:28         ` [PATCH 3/3] swap-token: add a comment for priority aging 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=4DDC73D8.5050900@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