lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHz2CGXRz4ComkEZZBKknn-7g5fAtGCrKuJ+nrGNKZHsudYbYg@mail.gmail.com>
Date:	Wed, 4 Sep 2013 16:58:12 +0800
From:	Zhan Jianyu <nasa4836@...il.com>
To:	Johannes Weiner <hannes@...xchg.org>
Cc:	linux-mm@...ck.org, mhocko@...e.cz,
	Balbir Singh <bsingharora@...il.com>,
	kamezawa.hiroyu@...fujitsu.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>, riel@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] mm/vmscan : use vmcan_swappiness( ) basing on
 MEMCG config to elimiate unnecessary runtime cost

On Wed, Sep 4, 2013 at 6:47 AM, Johannes Weiner <hannes@...xchg.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ