From: Zhan Jianyu <nasa4836@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, mhocko@suse.cz,
Balbir Singh <bsingharora@gmail.com>,
kamezawa.hiroyu@jp.fujitsu.com,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>,
riel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] mm/vmscan : use vmcan_swappiness( ) basing on MEMCG config to elimiate unnecessary runtime cost
Date: Wed, 4 Sep 2013 16:58:12 +0800 [thread overview]
Message-ID: <CAHz2CGXRz4ComkEZZBKknn-7g5fAtGCrKuJ+nrGNKZHsudYbYg@mail.gmail.com> (raw)
In-Reply-To: <20130903224731.GC1412@cmpxchg.org>
On Wed, Sep 4, 2013 at 6:47 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Mon, Aug 26, 2013 at 09:36:58PM +0800, larmbr wrote:
>> Currently, we get the vm_swappiness via vmscan_swappiness(), which
>> calls global_reclaim() to check if this is a global reclaim.
>>
>> Besides, the current implementation of global_reclaim() always returns
>> true for the !CONFIG_MEGCG case, and judges the other case by checking
>> whether scan_control->target_mem_cgroup is null or not.
>>
>> Thus, we could just use two versions of vmscan_swappiness() based on
>> MEMCG Kconfig , to eliminate the unnecessary run-time cost for
>> the !CONFIG_MEMCG at all, and to squash all memcg-related checking
>> into the CONFIG_MEMCG version.
>
> The compiler can easily detect that global_reclaim() always returns
> true for !CONFIG_MEMCG during compile time and not even generate a
> branch for this.
>
Hi, Johannes Weiner,
Thanks for your comment ;)
Andrew has pointed this out and this patch is abandoned.
--
Regards,
Zhan Jianyu
--
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>
prev parent reply other threads:[~2013-09-04 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 13:36 [PATCH RESEND] mm/vmscan : use vmcan_swappiness( ) basing on MEMCG config to elimiate unnecessary runtime cost larmbr
2013-08-27 0:13 ` Naoya Horiguchi
2013-09-03 22:47 ` Johannes Weiner
2013-09-04 8:58 ` Zhan Jianyu [this message]
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=CAHz2CGXRz4ComkEZZBKknn-7g5fAtGCrKuJ+nrGNKZHsudYbYg@mail.gmail.com \
--to=nasa4836@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--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).