From: Yi Wang <wang.yi59@zte.com.cn>
To: pbonzini@redhat.com
Cc: 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, peterz@infradead.org,
xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn, up2wing@gmail.com,
wang.liang82@zte.com.cn
Subject: [PATCH 1/2] kvm: x86: add likely to sched_info_on()
Date: Thu, 4 Jul 2019 19:46:14 +0800 [thread overview]
Message-ID: <1562240775-16086-2-git-send-email-wang.yi59@zte.com.cn> (raw)
In-Reply-To: <1562240775-16086-1-git-send-email-wang.yi59@zte.com.cn>
The condition to test is likely() to be true when make defconfig.
Add the hint.
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 4992e7c..64fff41 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -642,7 +642,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
(1 << KVM_FEATURE_ASYNC_PF_VMEXIT) |
(1 << KVM_FEATURE_PV_SEND_IPI);
- if (sched_info_on())
+ if (likely(sched_info_on()))
entry->eax |= (1 << KVM_FEATURE_STEAL_TIME);
entry->ebx = 0;
--
1.8.3.1
next prev parent reply other threads:[~2019-07-04 11:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 11:46 [PATCH 0/2] fix likely hint of sched_info_on() Yi Wang
2019-07-04 11:46 ` Yi Wang [this message]
2019-07-04 12:15 ` [PATCH 1/2] kvm: x86: add likely to sched_info_on() 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 ` [PATCH 0/2] fix likely hint " Peter Zijlstra
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=1562240775-16086-2-git-send-email-wang.yi59@zte.com.cn \
--to=wang.yi59@zte.com.cn \
--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=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=up2wing@gmail.com \
--cc=wang.liang82@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 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.