All of lore.kernel.org
 help / color / mirror / Atom feed
From: yuankuiz@codeaurora.org
To: Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org, lizefan@huawei.com, hannes@cmpxchg.org,
	linux-kernel@vger.kernel.org, pkondeti@codeaurora.org,
	cgroups-owner@vger.kernel.org
Subject: Re: [PATCH]cgroup: __cpuset_node_allowed return bool
Date: Mon, 26 Mar 2018 22:37:31 +0800	[thread overview]
Message-ID: <ea271bc26e293c232c6ea7772607c7fc@codeaurora.org> (raw)
In-Reply-To: <20180326142527.GJ2149215@devbig577.frc2.facebook.com>

Hi Tejun,

     inline.

On 2018-03-26 10:25 PM, Tejun Heo wrote:
> On Mon, Mar 26, 2018 at 10:20:43PM +0800, yuankuiz@codeaurora.org 
> wrote:
>>  1) return int type variable in bool function:
>>  bool enabled()
>>  {
>>  	int ret = 1;
>>  	return ret;
>>  }
> ...
>>  2)
>>  bool enabled()
>>  {
>>  	bool ret = 1;
>>  	return ret;
>>  }
> ...
>>  so the #1) style function can generate significant instructions
>> than the #2).
> 
> That is a problem for the compiler, not the code.
> 
>>  While, this is happened only when "-On" is not used with *-gcc
>> together. Though, it is oftern there, it is best to provide this
>> with decoupling of which option is used for optimization.
> 
> We don't want to dictate minute coding styles to avoid things which
> are trivially optimized by compilers.
[ZJ] Optimized by compiler is observed only. Such as it is not so big 
difference in x86-arch.

> 
> Thanks.

  reply	other threads:[~2018-03-26 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24  4:56 [PATCH]cgroup: __cpuset_node_allowed return bool yuankuiz
2018-03-24  5:05 ` yuankuiz
2018-03-26 14:12   ` Tejun Heo
2018-03-26 14:20     ` yuankuiz
2018-03-26 14:25       ` Tejun Heo
2018-03-26 14:37         ` yuankuiz [this message]
2018-03-26 14:41           ` yuankuiz
2018-03-27 16:45     ` yuankuiz

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=ea271bc26e293c232c6ea7772607c7fc@codeaurora.org \
    --to=yuankuiz@codeaurora.org \
    --cc=cgroups-owner@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=pkondeti@codeaurora.org \
    --cc=tj@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.