From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Bob Liu <yjfpb04@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Bo Liu <bo-liu@hotmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] try_to_unuse : remove redundant swap_count()
Date: Wed, 28 Oct 2009 20:31:28 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0910282017410.19885@sister.anvils> (raw)
In-Reply-To: <dc46d49c0910201825g1b3b3987w8f9002761a64166f@mail.gmail.com>
On Wed, 21 Oct 2009, Bob 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 ?
> >
>
> Sorry for the wrong format, I changed to gmail.
> Because swcount is assigned value *swap_map not swap_count(*swap_map).
> So I think here should compare with *swap_map not swap_count(*swap_map).
>
> And refer to variable set_start_mm, it is inited also by comparing
> *swap_map and swcount not swap_count(*swap_map) and swcount.
> So I submited this patch.
Thanks a lot for the fuller description: I mistakenly dismissed
your patch the first time, misunderstanding what you had found.
As I remarked in private mail (being smtp-challenged last week),
what you found was worse than a redundant use of swap_count(): it
was a wrong use of swap_count(), and caused an (easily overlooked)
regression in swapoff's (never wonderful) performance.
>
> > Anyway, swap_count() macro is removed by Hugh's patch (queued in -mm)
Actually no: I removed some of the other wrappers, which were obscuring
things for me; but swap_count() still seemed useful, so I left it.
> >
> I am sorry for not notice that. So just forget about this patch.
No, let's not forget it at all, it was a good find, thank you.
Updated version of the patch comes in following mail.
Hugh
--
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-28 20:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 7:09 Bo Liu
2009-10-20 12:06 ` KAMEZAWA Hiroyuki
2009-10-21 1:12 ` Bo Liu
2009-10-21 1:25 ` Bob Liu
2009-10-28 20:31 ` Hugh Dickins [this message]
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=Pine.LNX.4.64.0910282017410.19885@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=bo-liu@hotmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=yjfpb04@gmail.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