mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	xue.zhihong@zte.com.cn, up2wing@gmail.com,
	wang.liang82@zte.com.cn
Subject: Re: [PATCH 0/2] fix likely hint of sched_info_on()
Date: Thu, 4 Jul 2019 14:17:55 +0200	[thread overview]
Message-ID: <20190704121755.GM3402@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1562240775-16086-1-git-send-email-wang.yi59@zte.com.cn>

On Thu, Jul 04, 2019 at 07:46:13PM +0800, Yi Wang wrote:
> When make defconfig, CONFIG_SCHEDSTATS is set to be y, so
> sched_info_on() is 'likely' to be true. However, some functions
> invoke this function with unlikely hint or use no hint. Let's
> fix this.

How about remove the hint entirely? likely(1) is as rediculous as
unlikely(1), a constant is a constant and no amount of hinting should
make the compiler do anything else.

And if you want to retain the hint for the TASK_DELAY_ACCT nonsense,
stick it there.

Also, fix the lack of { } while you're there.

      parent reply	other threads:[~2019-07-04 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 11:46 Yi Wang
2019-07-04 11:46 ` [PATCH 1/2] kvm: x86: add likely to sched_info_on() Yi Wang
2019-07-04 12:15   ` Paolo Bonzini
2019-07-04 11:46 ` [PATCH 2/2] sched: fix unlikely use of sched_info_on() Yi Wang
2019-07-04 12:17 ` Peter Zijlstra [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=20190704121755.GM3402@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=up2wing@gmail.com \
    --cc=wang.liang82@zte.com.cn \
    --cc=wang.yi59@zte.com.cn \
    --cc=x86@kernel.org \
    --cc=xue.zhihong@zte.com.cn \
    /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

all inboxes | Powered by JetHome®