All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap
@ 2018-09-01 11:28 ` Fengguang Wu
  0 siblings, 0 replies; 31+ messages in thread
From: Fengguang Wu @ 2018-09-01 11:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Memory Management List, kvm, Peng DongX, Liu Jingqi,
	Dong Eddie, Dave Hansen, Huang Ying, Brendan Gregg, Fengguang Wu,
	LKML

This new /proc/PID/idle_bitmap interface aims to complement the current global
/sys/kernel/mm/page_idle/bitmap. To enable efficient user space driven migrations.

The pros and cons will be discussed in changelog of "[PATCH] proc: introduce
/proc/PID/idle_bitmap". The driving force is to improve efficiency by 10+
times, so that hot/cold page tracking can be done in some regular intervals in
user space w/o too much overheads. Making it possible for some user space
daemon to do regular page migration between NUMA nodes of different speeds.

Note it's not about NUMA migration between local and remote nodes -- we already
have NUMA balancing for that. This interface and user space migration daemon
targets for NUMA nodes made of different mediums -- ie. DIMM and NVDIMM(*) --
with larger performance gaps. Basic policy will be "move hot pages to DIMM;
cold pages to NVDIMM".

Since NVDIMMs size can easily reach several Terabytes, working set tracking
efficiency will matter and be challeging.

(*) Here we use persistent memory (PMEM) w/o using its persistence.
Persistence is good to have, however it requires modifying applications.
Upcoming NVDIMM products like Intel Apache Pass (AEP) will be more cost and energy
effective than DRAM, but slower. Merely using it in form of NUMA memory node
could immediately benefit many workloads. For example, warm but not hot apps,
workloads with sharp hot/cold page distribution (good for migration), or relies
more on memory size than latency and bandwidth, and do more reads than writes.

This is an early RFC version to collect feedbacks. It's complete enough to demo
the basic ideas and performance, however not usable yet.

Regards,
Fengguang


^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct
@ 2018-09-03 14:10 ` Nikita Leshenko
  0 siblings, 0 replies; 31+ messages in thread
From: Nikita Leshenko @ 2018-09-03 14:10 UTC (permalink / raw)
  To: fengguang.wu
  Cc: akpm, linux-mm, fengguang.wu, dongx.peng, jingqi.liu, eddie.dong,
	dave.hansen, ying.huang, bgregg, kvm, linux-kernel

On September 2, 2018 5:21:15 AM, fengguang.wu@intel.com wrote:
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 8b47507faab5..0c483720de8d 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -3892,6 +3892,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm)
>  	if (type == KVM_EVENT_CREATE_VM) {
>  		add_uevent_var(env, "EVENT=create");
>  		kvm->userspace_pid = task_pid_nr(current);
> +		current->kvm = kvm;

Is it OK to store `kvm` on the task_struct? What if the thread that
originally created the VM exits? From the documentation it seems
like a VM is associated with an address space and not a specific
thread, so maybe it should be stored on mm_struct?

From Documentation/virtual/kvm/api.txt:
   Only run VM ioctls from the same process (address space) that was used
   to create the VM.

-Nikita
>  	} else if (type == KVM_EVENT_DESTROY_VM) {
>  		add_uevent_var(env, "EVENT=destroy");
>  	}
> -- 
> 2.15.0
> 
> 
> 

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

end of thread, other threads:[~2018-09-06 14:35 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-01 11:28 [RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap Fengguang Wu
2018-09-01 11:28 ` Fengguang Wu
2018-09-01 11:28 ` [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct Fengguang Wu
2018-09-01 11:28   ` Fengguang Wu
2018-09-01 11:28 ` [RFC][PATCH 2/5] [PATCH 2/5] proc: introduce /proc/PID/idle_bitmap Fengguang Wu
2018-09-01 11:28   ` Fengguang Wu
2018-09-04 19:02   ` Sean Christopherson
2018-09-06 14:12   ` Dave Hansen
2018-09-01 11:28 ` [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read Fengguang Wu
2018-09-01 11:28   ` Fengguang Wu
2018-09-04  7:57   ` Nikita Leshenko
2018-09-04  8:12     ` Peng, DongX
2018-09-04  8:15       ` Fengguang Wu
2018-09-01 11:28 ` [RFC][PATCH 4/5] [PATCH 4/5] kvm-ept-idle: EPT page table walk for A bits Fengguang Wu
2018-09-01 11:28   ` Fengguang Wu
2018-09-06 14:35   ` Dave Hansen
2018-09-01 11:28 ` [RFC][PATCH 5/5] [PATCH 5/5] kvm-ept-idle: enable module Fengguang Wu
2018-09-01 11:28   ` Fengguang Wu
2018-09-04 19:14   ` Sean Christopherson
2018-09-02  8:24 ` [RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap Fengguang Wu
2018-09-03 14:10 [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct Nikita Leshenko
2018-09-03 14:10 ` Nikita Leshenko
2018-09-03 16:03 ` Christian Borntraeger
2018-09-04  0:28   ` Fengguang Wu
2018-09-04  0:46     ` Fengguang Wu
2018-09-04  6:37       ` Nikita Leshenko
2018-09-04  7:15         ` Fengguang Wu
2018-09-04  7:43           ` Christian Borntraeger
2018-09-04  7:43             ` Christian Borntraeger
2018-09-04  8:31             ` Fengguang Wu
2018-09-04  8:31               ` Fengguang Wu

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.