From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: kamezawa.hiroyu@jp.fujitsu.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, minchan.kim@gmail.com,
riel@redhat.com
Subject: Re: [PATCH 3/3] vmscan: implement swap token priority decay
Date: Wed, 18 May 2011 10:08:48 +0900 [thread overview]
Message-ID: <4DD31C20.8050608@jp.fujitsu.com> (raw)
In-Reply-To: <20110516172258.c7dcd982.kamezawa.hiroyu@jp.fujitsu.com>
>> diff --git a/mm/thrash.c b/mm/thrash.c
>> index 14c6c9f..0c4f0a8 100644
>> --- a/mm/thrash.c
>> +++ b/mm/thrash.c
>> @@ -47,6 +47,9 @@ void grab_swap_token(struct mm_struct *mm)
>> if (!swap_token_mm)
>> goto replace_token;
>>
>> + if (!(global_faults& 0xff))
>> + mm->token_priority /= 2;
>> +
>
> I personally don't like this kind of checking counter with mask.
> Hmm. How about this ?
>
> ==
> #define TOKEN_AGE_MASK ~(0xff)
> /*
> * If current global_fault is in different age from previous global_fault,
> * Aging priority and starts new era.
> */
> if ((mm->faultstamp& TOKEN_AGE_MASK) != (global_faults& MM_TOKEN_MASK))
> mm->token_priority /= 2;
> ==
OK. will do.
WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: kamezawa.hiroyu@jp.fujitsu.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, minchan.kim@gmail.com,
riel@redhat.com
Subject: Re: [PATCH 3/3] vmscan: implement swap token priority decay
Date: Wed, 18 May 2011 10:08:48 +0900 [thread overview]
Message-ID: <4DD31C20.8050608@jp.fujitsu.com> (raw)
In-Reply-To: <20110516172258.c7dcd982.kamezawa.hiroyu@jp.fujitsu.com>
>> diff --git a/mm/thrash.c b/mm/thrash.c
>> index 14c6c9f..0c4f0a8 100644
>> --- a/mm/thrash.c
>> +++ b/mm/thrash.c
>> @@ -47,6 +47,9 @@ void grab_swap_token(struct mm_struct *mm)
>> if (!swap_token_mm)
>> goto replace_token;
>>
>> + if (!(global_faults& 0xff))
>> + mm->token_priority /= 2;
>> +
>
> I personally don't like this kind of checking counter with mask.
> Hmm. How about this ?
>
> ==
> #define TOKEN_AGE_MASK ~(0xff)
> /*
> * If current global_fault is in different age from previous global_fault,
> * Aging priority and starts new era.
> */
> if ((mm->faultstamp& TOKEN_AGE_MASK) != (global_faults& MM_TOKEN_MASK))
> mm->token_priority /= 2;
> ==
OK. will do.
--
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-18 1:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 11:38 [PATCH 0/3] swap token revisit KOSAKI Motohiro
2011-05-13 11:38 ` KOSAKI Motohiro
2011-05-13 11:40 ` [PATCH 1/3] vmscan,memcg: memcg aware swap token KOSAKI Motohiro
2011-05-13 11:40 ` KOSAKI Motohiro
2011-05-15 17:56 ` Rik van Riel
2011-05-15 17:56 ` Rik van Riel
2011-05-16 8:01 ` KAMEZAWA Hiroyuki
2011-05-16 8:01 ` KAMEZAWA Hiroyuki
2011-05-13 11:40 ` [PATCH 2/3] vmscan: implement swap token trace KOSAKI Motohiro
2011-05-13 11:40 ` KOSAKI Motohiro
2011-05-15 22:26 ` Rik van Riel
2011-05-15 22:26 ` Rik van Riel
2011-05-16 8:02 ` KAMEZAWA Hiroyuki
2011-05-16 8:02 ` KAMEZAWA Hiroyuki
2011-05-13 11:42 ` [PATCH 3/3] vmscan: implement swap token priority decay KOSAKI Motohiro
2011-05-13 11:42 ` KOSAKI Motohiro
2011-05-15 22:34 ` Rik van Riel
2011-05-15 22:34 ` Rik van Riel
2011-05-16 8:22 ` KAMEZAWA Hiroyuki
2011-05-16 8:22 ` KAMEZAWA Hiroyuki
2011-05-18 1:08 ` KOSAKI Motohiro [this message]
2011-05-18 1:08 ` 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=4DD31C20.8050608@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=minchan.kim@gmail.com \
--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.