All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] Paravirtualize idle CPU wakeup optimization
@ 2021-07-13  5:24 Parth Shah
  2021-07-13  5:24 ` [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region Parth Shah
  2021-07-13  5:24 ` [RFC 2/2] kernel/idle: Update and use idle-hint " Parth Shah
  0 siblings, 2 replies; 6+ messages in thread
From: Parth Shah @ 2021-07-13  5:24 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: ego, mikey, srikar, parths1229, svaidy

This patch-set is a revision over HCALL based implementation which can
be found at:
https://lore.kernel.org/linuxppc-dev/20210401115922.1524705-1-parth@linux.ibm.com/
But since the overhead of HCALL is huge, this patch-set uses lppaca
region to update idle-hint, where hypervisor keeps changing the newly
added idle_hint attribute in the VPA region of each vCPUs of all KVMs,
and guest have to just look at this attribute.

This implementation is not aimed for full fledged solution, but is
rather a demonstration of para-virtualizing task scheduler. Hypervisor
can provided better idle-hints about vCPU scheduling and guest can use
it for better scheduling decisions.

Abstract:
=========
The Linux task scheduler searches for an idle cpu for task wakeup
in-order to lower the wakeup latency as much as possible. The process of
determining if a cpu is idle or not has evolved over time.
Currently, in available_idle_cpu(), a cpu is considered idle if
- there are no task running or enqueued to the runqueue of the cpu and
- the cpu is not-preempted, i.e. while running inside a guest, a cpu is
  not yielded (determined via vcpu_is_preempted())

While inside the guest, there is no way to deterministically predict
if a vCPU that has been yielded/ceded to the hypervisor can be gotten
back. Hence currently the scheduler considers such CEDEd vCPU as not
"available" idle and would instead pick other busy CPUs for waking up
the wakee task.

In this patch-set we try to further classify idle cpus as instantly
available or not. This is achieved by taking hint from the hypervisor
by quering if the vCPU will be scheduled instantly or not.  In most
cases, scheduler prefers prev_cpu of a waking task unless it is busy.
In this patchset, the hypervisor uses this information to figure out
if the prev_cpu used by the task (of the corresponding vCPU) is idle
or not, and passes this information to the guest.

Interface:
===========
This patchset introduces a new attribute in lppaca structure which is
shared by both the hypervisor and the guest. The new attribute, i.e.
idle_hint is updated regularly by the hypervisor. When a particular cpu
goes into idle-state, it updates the idle_hint of all the vCPUs of all
existing KVMs whose prev_cpu == smp_processor_id(). It similarly revert
backs the update when coming out of the idle-state.


Internal working:
========
The code-flow of the current implementation is as follow:
- In do_idle(), when entering an idle-state, walk through all vCPUs of
  all KVM guests and find whose prev_cpu of vCPU task was same as the
  caller's cpu, and mark the idle_hint=1 in the lppaca region of such
  vCPUs.
- Similarly, mark idle_hint=0 for such vCPUs when exiting idle state.
- Guest OS scheduler searches for idle cpu using `avaialable_idle_cpu()`
  which also looks if a vcpu_is_preempted() to see if vCPU is yielded or
  not.
- If vCPU is yielded, then the GuestOS will additionally see if
  idle_hint is marked as 1 or not. If idle_hint==1 then consider the
  vCPU as non-preempted and use it for scheduling a task.


The patch-set is based on v5.13 kernel.

Results:
========
- Baseline kernel = v5.13
- Patched kernel = v5.13 + this patch-set

Setup:
All the results are taken on IBM POWER9 baremetal system running patched
kernel. This system consists of 2 NUMA nodes, 22 cores per socket with
SMT-4 mode.

Each KVM guest have identical cpu topology with total 40 CPUs, which are
10 cores with SMT-4 support.

Scenarios:
----------
1. Under-commit case: Only one KVM is active at a time.

- Baseline kernel:
$> schbench -m 20 -t 2 -r 30
Latency percentiles (usec)
        50.0000th: 86
        75.0000th: 406
        90.0000th: 497
        95.0000th: 541
        *99.0000th: 2572 <-----
        99.5000th: 3724
        99.9000th: 6904
        min=0, max=10007

- With Patched kernel:
$> schbench -m 20 -t 2 -r 30
Latency percentiles (usec)
        50.0000th: 386
        75.0000th: 470
        90.0000th: 529
        95.0000th: 589
        *99.0000th: 741 (-71%) <-----
        99.5000th: 841
        99.9000th: 1522
        min=0, max=6488

We see a significant reduction in the tail latencies due to being able
to schedule on an yielded/ceded idle CPU with the patchset instead of
waking up the task on a busy CPU.


2. Over-commit case: Multiple KVM guests sharing same set of CPUs.

Two KVMs running baseline kernel is used for creating noise using `schbench
-m 10 -t 2 -r 3000` while only the other KVM is benchmarked.

- Baseline kernel:
$> schbench -m 20 -t 2 -r 30
Latency percentiles (usec)
        50.0000th: 289
        75.0000th: 1074
        90.0000th: 7288
        95.0000th: 11248
        *99.0000th: 17760
        99.5000th: 21088
        99.9000th: 28896
        min=0, max=36640

- With Patched kernel:
$> schbench -m 20 -t 2 -r 30
Latency percentiles (usec)
        50.0000th: 281
        75.0000th: 445
        90.0000th: 4344
        95.0000th: 9168
        *99.0000th: 15824
        99.5000th: 19296
        99.9000th: 26656
        min=0, max=36455


The results demonstrates that the proposed method of getting idle-hint
from the hypervisor to better find an idle cpu in the guestOS is very
helpful in under-commmit cases due to higher chance of finding the
previously used physical cpu as idle.
The results also confirms that there is no regression in the over-commit
case where the proposed methodlogy does not affect much.


Parth Shah (2):
  powerpc/book3s_hv: Add new idle-hint attribute in VPA region
  kernel/idle: Update and use idle-hint in VPA region

 arch/powerpc/include/asm/idle_hint.h | 28 +++++++++++++++++++++++
 arch/powerpc/include/asm/lppaca.h    |  3 ++-
 arch/powerpc/include/asm/paravirt.h  | 12 ++++++++--
 arch/powerpc/kvm/book3s.h            |  2 ++
 arch/powerpc/kvm/book3s_hv.c         | 34 ++++++++++++++++++++++++++++
 kernel/sched/idle.c                  |  3 +++
 6 files changed, 79 insertions(+), 3 deletions(-)
 create mode 100644 arch/powerpc/include/asm/idle_hint.h

-- 
2.26.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region
  2021-07-13  5:24 [RFC 0/2] Paravirtualize idle CPU wakeup optimization Parth Shah
@ 2021-07-13  5:24 ` Parth Shah
  2021-07-13  9:18   ` kernel test robot
  2021-07-13  5:24 ` [RFC 2/2] kernel/idle: Update and use idle-hint " Parth Shah
  1 sibling, 1 reply; 6+ messages in thread
From: Parth Shah @ 2021-07-13  5:24 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: ego, mikey, srikar, parths1229, svaidy

In lppaca region, add a new attribute idle_hint which can allow guest scheduler for
better cpu selection. Hypervisor can update idle_hint attribute based on
the prediction that if vCPU needs to be scheduled then can it be scheduled
instantly or not.

Signed-off-by: Parth Shah <parth@linux.ibm.com>
---
 arch/powerpc/include/asm/idle_hint.h | 28 +++++++++++++++++++++++
 arch/powerpc/include/asm/lppaca.h    |  3 ++-
 arch/powerpc/kvm/book3s.h            |  2 ++
 arch/powerpc/kvm/book3s_hv.c         | 34 ++++++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 arch/powerpc/include/asm/idle_hint.h

diff --git a/arch/powerpc/include/asm/idle_hint.h b/arch/powerpc/include/asm/idle_hint.h
new file mode 100644
index 000000000000..165d65c0275b
--- /dev/null
+++ b/arch/powerpc/include/asm/idle_hint.h
@@ -0,0 +1,28 @@
+#ifndef _ASM_POWERPC_IDLEHINT_H
+#define _ASM_POWERPC_IDLEHINT_H
+
+#include <linux/kvm_host.h>
+
+extern void kvmppc_idle_hint_set(struct kvm_vcpu *vcpu, int idle_hint);
+
+extern int idle_hint_is_active;
+
+extern void set_idle_hint(int cpu, int value);
+
+static inline int prev_cpu_of_kvm(struct kvm_vcpu *vcpu)
+{
+	struct pid *pid;
+	struct task_struct *task = NULL;
+
+	rcu_read_lock();
+	pid = rcu_dereference(vcpu->pid);
+	if (pid)
+		task = get_pid_task(pid, PIDTYPE_PID);
+	rcu_read_unlock();
+
+	if (!task)
+		return -1;
+
+	return task_cpu(task);
+}
+#endif
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index c390ec377bae..ee790a566036 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -111,7 +111,8 @@ struct lppaca {
 	__be32	page_ins;		/* CMO Hint - # page ins by OS */
 	u8	reserved11[148];
 	volatile __be64 dtl_idx;	/* Dispatch Trace Log head index */
-	u8	reserved12[96];
+	volatile __be32 idle_hint;	/* Can vCPU be scheduled instantly? */
+	u8	reserved12[92];
 } ____cacheline_aligned;
 
 #define lppaca_of(cpu)	(*paca_ptrs[cpu]->lppaca_ptr)
diff --git a/arch/powerpc/kvm/book3s.h b/arch/powerpc/kvm/book3s.h
index 740e51def5a5..61b0741c139a 100644
--- a/arch/powerpc/kvm/book3s.h
+++ b/arch/powerpc/kvm/book3s.h
@@ -7,6 +7,8 @@
 #ifndef __POWERPC_KVM_BOOK3S_H__
 #define __POWERPC_KVM_BOOK3S_H__
 
+#include <asm/idle_hint.h>
+
 extern void kvmppc_core_flush_memslot_hv(struct kvm *kvm,
 					 struct kvm_memory_slot *memslot);
 extern bool kvm_unmap_gfn_range_hv(struct kvm *kvm, struct kvm_gfn_range *range);
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index bc0813644666..c008be20294d 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -447,6 +447,7 @@ static void init_vpa(struct kvm_vcpu *vcpu, struct lppaca *vpa)
 {
 	vpa->__old_status |= LPPACA_OLD_SHARED_PROC;
 	vpa->yield_count = cpu_to_be32(1);
+	vpa->idle_hint = cpu_to_be32(0);
 }
 
 static int set_vpa(struct kvm_vcpu *vcpu, struct kvmppc_vpa *v,
@@ -911,6 +912,17 @@ static int kvm_arch_vcpu_yield_to(struct kvm_vcpu *target)
 	return kvm_vcpu_yield_to(target);
 }
 
+void kvmppc_idle_hint_set(struct kvm_vcpu *vcpu, int idle_hint)
+{
+	struct lppaca *lppaca;
+
+	if (!vcpu) return;
+
+	lppaca = (struct lppaca *)vcpu->arch.vpa.pinned_addr;
+	if (lppaca)
+		lppaca->idle_hint = cpu_to_be32(idle_hint);
+}
+
 static int kvmppc_get_yield_count(struct kvm_vcpu *vcpu)
 {
 	int yield_count = 0;
@@ -2803,6 +2815,28 @@ static int on_primary_thread(void)
 	return 1;
 }
 
+void set_idle_hint_for_kvm(struct kvm *kvm, int cpu, int value)
+{
+	int i;
+	struct kvm_vcpu *vcpu;
+
+	kvm_for_each_vcpu(i, vcpu, kvm) {
+		if (cpu == prev_cpu_of_kvm(vcpu)) {
+			kvmppc_idle_hint_set(vcpu, value);
+		}
+	}
+}
+
+void set_idle_hint(int cpu, int value)
+{
+	struct kvm *kvm;
+	struct kvm *tmp;
+
+	list_for_each_entry_safe(kvm, tmp, &vm_list, vm_list) {
+		set_idle_hint_for_kvm(kvm, cpu, value);
+	}
+}
+
 /*
  * A list of virtual cores for each physical CPU.
  * These are vcores that could run but their runner VCPU tasks are
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 2/2] kernel/idle: Update and use idle-hint in VPA region
  2021-07-13  5:24 [RFC 0/2] Paravirtualize idle CPU wakeup optimization Parth Shah
  2021-07-13  5:24 ` [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region Parth Shah
@ 2021-07-13  5:24 ` Parth Shah
  2021-07-13  7:49   ` kernel test robot
  2021-07-13  8:10   ` kernel test robot
  1 sibling, 2 replies; 6+ messages in thread
From: Parth Shah @ 2021-07-13  5:24 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: ego, mikey, srikar, parths1229, svaidy

In guest, Set idle_hint to 1 when the prev_cpu of a vCPU goes into idle state,
similarly set idle_hint to 0 when exiting an idle state.

Since the idle_hint is in VPA region, the available_idle_cpu() in guest can
read this region every time to find if a vCPU can be scheduled instantly by
the hypervsior or not.

Signed-off-by: Parth Shah <parth@linux.ibm.com>
---
 arch/powerpc/include/asm/paravirt.h | 12 ++++++++++--
 kernel/sched/idle.c                 |  3 +++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/paravirt.h b/arch/powerpc/include/asm/paravirt.h
index bcb7b5f917be..b20e4d25bd00 100644
--- a/arch/powerpc/include/asm/paravirt.h
+++ b/arch/powerpc/include/asm/paravirt.h
@@ -21,6 +21,12 @@ static inline bool is_shared_processor(void)
 	return static_branch_unlikely(&shared_processor);
 }
 
+static inline int idle_hint_of(int cpu)
+{
+	__be32 idle_hint = READ_ONCE(lppaca_of(cpu).idle_hint);
+	return be32_to_cpu(idle_hint);
+}
+
 /* If bit 0 is set, the cpu has been preempted */
 static inline u32 yield_count_of(int cpu)
 {
@@ -109,8 +115,10 @@ static inline bool vcpu_is_preempted(int cpu)
 	}
 #endif
 
-	if (yield_count_of(cpu) & 1)
-		return true;
+	if (yield_count_of(cpu) & 1) {
+		if (idle_hint_of(cpu) == 0)
+			return true;
+	}
 	return false;
 }
 
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 7ca3d3d86c2a..fdc8d1d474f0 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -7,6 +7,7 @@
  *        tasks which are handled in sched/fair.c )
  */
 #include "sched.h"
+#include <asm/idle_hint.h>
 
 #include <trace/events/power.h>
 
@@ -290,6 +291,7 @@ static void do_idle(void)
 			arch_cpu_idle_dead();
 		}
 
+		set_idle_hint(cpu, 1);
 		arch_cpu_idle_enter();
 		rcu_nocb_flush_deferred_wakeup();
 
@@ -306,6 +308,7 @@ static void do_idle(void)
 			cpuidle_idle_call();
 		}
 		arch_cpu_idle_exit();
+		set_idle_hint(cpu, 0);
 	}
 
 	/*
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RFC 2/2] kernel/idle: Update and use idle-hint in VPA region
  2021-07-13  5:24 ` [RFC 2/2] kernel/idle: Update and use idle-hint " Parth Shah
@ 2021-07-13  7:49   ` kernel test robot
  2021-07-13  8:10   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-07-13  7:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]

Hi Parth,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.14-rc1 next-20210712]
[cannot apply to kvm-ppc/kvm-ppc-next scottwood/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/c14c77422fea64356bf506d760f11d2308201912
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
        git checkout c14c77422fea64356bf506d760f11d2308201912
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/sched/idle.c:10:10: fatal error: asm/idle_hint.h: No such file or directory
      10 | #include <asm/idle_hint.h>
         |          ^~~~~~~~~~~~~~~~~
   compilation terminated.


vim +10 kernel/sched/idle.c

  > 10	#include <asm/idle_hint.h>
    11	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 10056 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC 2/2] kernel/idle: Update and use idle-hint in VPA region
  2021-07-13  5:24 ` [RFC 2/2] kernel/idle: Update and use idle-hint " Parth Shah
  2021-07-13  7:49   ` kernel test robot
@ 2021-07-13  8:10   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-07-13  8:10 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]

Hi Parth,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.14-rc1 next-20210712]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: arm64-buildonly-randconfig-r003-20210713 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/c14c77422fea64356bf506d760f11d2308201912
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
        git checkout c14c77422fea64356bf506d760f11d2308201912
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash kernel/sched/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/sched/idle.c:10:10: fatal error: 'asm/idle_hint.h' file not found
   #include <asm/idle_hint.h>
            ^~~~~~~~~~~~~~~~~
   1 error generated.


vim +10 kernel/sched/idle.c

  > 10	#include <asm/idle_hint.h>
    11	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38215 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region
  2021-07-13  5:24 ` [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region Parth Shah
@ 2021-07-13  9:18   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-07-13  9:18 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]

Hi Parth,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.14-rc1 next-20210712]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/09b5719b7516bcf50add81162e131d53ec10aeca
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Parth-Shah/Paravirtualize-idle-CPU-wakeup-optimization/20210713-132728
        git checkout 09b5719b7516bcf50add81162e131d53ec10aeca
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/powerpc/kvm/book3s_hv.c:3071:6: warning: no previous prototype for 'set_idle_hint_for_kvm' [-Wmissing-prototypes]
    3071 | void set_idle_hint_for_kvm(struct kvm *kvm, int cpu, int value)
         |      ^~~~~~~~~~~~~~~~~~~~~


vim +/set_idle_hint_for_kvm +3071 arch/powerpc/kvm/book3s_hv.c

  3070	
> 3071	void set_idle_hint_for_kvm(struct kvm *kvm, int cpu, int value)
  3072	{
  3073		int i;
  3074		struct kvm_vcpu *vcpu;
  3075	
  3076		kvm_for_each_vcpu(i, vcpu, kvm) {
  3077			if (cpu == prev_cpu_of_kvm(vcpu)) {
  3078				kvmppc_idle_hint_set(vcpu, value);
  3079			}
  3080		}
  3081	}
  3082	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 73223 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-13  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13  5:24 [RFC 0/2] Paravirtualize idle CPU wakeup optimization Parth Shah
2021-07-13  5:24 ` [RFC 1/2] powerpc/book3s_hv: Add new idle-hint attribute in VPA region Parth Shah
2021-07-13  9:18   ` kernel test robot
2021-07-13  5:24 ` [RFC 2/2] kernel/idle: Update and use idle-hint " Parth Shah
2021-07-13  7:49   ` kernel test robot
2021-07-13  8:10   ` kernel test robot

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.