Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378601

Re: [PATCH v2] cpuset: use static key better and convert to new API

From Zefan Li <lizefan@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] cpuset: use static key better and convert to new API
Date 2016-04-14 10:40 +0200
Message-ID <rnKYG-7jf-13@gated-at.bofh.it> (permalink)
References <rkRjY-1aV-17@gated-at.bofh.it> <rkRWH-1G1-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016/4/6 17:19, Vlastimil Babka wrote:
> An important function for cpusets is cpuset_node_allowed(), which optimizes on
> the fact if there's a single root CPU set, it must be trivially allowed. But
> the check "nr_cpusets() <= 1" doesn't use the cpusets_enabled_key static key
> the right way where static keys eliminate branching overhead with jump labels.
> 
> This patch converts it so that static key is used properly. It's also switched
> to the new static key API and the checking functions are converted to return
> bool instead of int. We also provide a new variant __cpuset_zone_allowed()
> which expects that the static key check was already done and they key was
> enabled. This is needed for get_page_from_freelist() where we want to also
> avoid the relatively slower check when ALLOC_CPUSET is not set in alloc_flags.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Looks good to me.

Acked-by: Zefan Li <lizefan@huawei.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] cpuset: use static key better and convert to new API Vlastimil Babka <vbabka@suse.cz> - 2016-04-06 10:50 +0200
  Re: [PATCH] cpuset: use static key better and convert to new API kbuild test robot <lkp@intel.com> - 2016-04-06 11:00 +0200
    Re: [PATCH] cpuset: use static key better and convert to new API Vlastimil Babka <vbabka@suse.cz> - 2016-04-06 11:20 +0200
  [PATCH v2] cpuset: use static key better and convert to new API Vlastimil Babka <vbabka@suse.cz> - 2016-04-06 11:30 +0200
    Re: [PATCH v2] cpuset: use static key better and convert to new API Zefan Li <lizefan@huawei.com> - 2016-04-14 10:40 +0200

csiph-web