From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: Bo Liu <bo-liu@hotmail.com>
Cc: akpm@linux-foundation.org, hugh.dickins@tiscali.co.uk,
linux-mm@kvack.org
Subject: Re: [PATCH] try_to_unuse : remove redundant swap_count()
Date: Tue, 20 Oct 2009 21:06:53 +0900 (JST) [thread overview]
Message-ID: <0f7b4023bee9b7ccc47998cd517d193c.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <COL115-W535064AC2F576372C1BB1B9FC00@phx.gbl>
Bo Liu wrote:
>
>
> While comparing with swcount,it's no need to
> call swap_count(). Just as int set_start_mm =
> (*swap_map>= swcount) is ok.
>
Hmm ?
*swap_map = (SWAP_HAS_CACHE) | count. What this change means ?
Anyway, swap_count() macro is removed by Hugh's patch (queued in -mm)
Regards,
-Kame
> Signed-off-by: Bo Liu <bo-liu@hotmail.com>
> ---
>
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 63ce10f..2456fc6 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1152,7 +1152,7 @@ static int try_to_unuse(unsigned int type)
> retval = unuse_mm(mm, entry, page);
> if (set_start_mm &&
> - swap_count(*swap_map) < swcount) {
> + ((*swap_map) < swcount)) {
> mmput(new_start_mm);
> atomic_inc(&mm->mm_users);
> new_start_mm = mm;
>
> --
> 1.6.0.6
> _________________________________________________________________
> Windows Live Hotmail: Your friends can get your Facebook updates, right
from
> Hotmailョ.
> http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009
> --
> 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>
>
--
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>
next prev parent reply other threads:[~2009-10-20 12:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 7:09 [PATCH] try_to_unuse : remove redundant swap_count() Bo Liu
2009-10-20 12:06 ` KAMEZAWA Hiroyuki [this message]
2009-10-21 1:12 ` Bo Liu
2009-10-21 1:25 ` Bob Liu
2009-10-28 20:31 ` Hugh Dickins
2009-10-28 20:34 ` [PATCH] mm: remove incorrect swap_count() from try_to_unuse() Hugh Dickins
2009-10-28 23:38 ` KAMEZAWA Hiroyuki
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=0f7b4023bee9b7ccc47998cd517d193c.squirrel@webmail-b.css.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bo-liu@hotmail.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=linux-mm@kvack.org \
/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).