xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PROPOSAL] Event channel for SMP-VMs: per-vCPU or per-OS?
@ 2013-10-28 15:26 Luwei Cheng
  2013-10-28 15:51 ` Roger Pau Monné
  2013-10-29 15:21 ` David Vrabel
  0 siblings, 2 replies; 26+ messages in thread
From: Luwei Cheng @ 2013-10-28 15:26 UTC (permalink / raw)
  To: xen-devel; +Cc: George.Dunlap, wei.liu2, david.vrabel


[-- Attachment #1.1: Type: text/plain, Size: 1758 bytes --]

This following idea was first discussed with George Dunlap, David Vrabel
and Wei Liu in XenDevSummit13. Many thanks for their encouragement to
post this idea to the community for a wider discussion.

[Current Design]
Each event channel is associated with only “one” notified vCPU: one-to-one.

[Problem]
Some events are per-vCPU (such as local timer interrupts) while some others
are per-OS (such as I/O interrupts: network and disk).
For SMP-VMs, it is possible that when one vCPU is waiting in the scheduling
queue, another vCPU is running. So, if the I/O events can be dynamically
routed to the running vCPU, the events can be processed quickly, without
suffering from VM scheduling delays (tens of milliseconds). On the other
hand, no reschedule operations are introduced.

Though users can set IRQ affinity in the guest OS, the current
implementation forces to bind the IRQ to the first vCPU of the
affinity mask [events.c: set_affinity_irq].
If the hypervisor delivers the event to a different vCPU, the event
will get lost because the guest OS has masked out this event in all
non-notified vCPUs [events.c: bind_evtchn_to_cpu].

[New Design]
For per-OS event channel, add “vCPU affinity” support: one-to-many.
The “affinity” should be consistent with the ‘/proc/irq/#/smp_affinity’ of
the
guest OS and users can change the mapping at runtime. But by default,
all vCPUs should be enabled to serve I/O.

When such flexibility is enabled, I/O balancing among vCPUs can be
offloaded to the hypervisor. “irqbalance” is designed for physical
SMP systems, not virtual SMP systems.

Any comments are welcome!

Thanks,
Luwei
--
Mr. CHENG Luwei, PhD Candidate
Department of Computer Science
The University of Hong Kong

[-- Attachment #1.2: Type: text/html, Size: 2233 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2013-10-30 13:11 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-28 15:26 [PROPOSAL] Event channel for SMP-VMs: per-vCPU or per-OS? Luwei Cheng
2013-10-28 15:51 ` Roger Pau Monné
2013-10-29  2:56   ` Luwei Cheng
2013-10-29  8:19     ` Jan Beulich
2013-10-29  9:02       ` Luwei Cheng
2013-10-29  9:34         ` Jan Beulich
2013-10-29  9:49           ` Luwei Cheng
2013-10-29  9:57             ` Jan Beulich
2013-10-29 10:52               ` George Dunlap
2013-10-29 11:00                 ` Roger Pau Monné
2013-10-29 14:20                   ` Luwei Cheng
2013-10-29 14:30                     ` Wei Liu
2013-10-29 14:43                       ` Luwei Cheng
2013-10-29 15:25                         ` Wei Liu
2013-10-30  7:40                           ` Luwei Cheng
2013-10-30 10:27                             ` Wei Liu
2013-10-29 11:22                 ` Jan Beulich
2013-10-29 14:28                   ` Luwei Cheng
2013-10-29 14:42                     ` Jan Beulich
2013-10-29 15:20                       ` Luwei Cheng
2013-10-29 16:37                         ` Jan Beulich
2013-10-29 15:21 ` David Vrabel
2013-10-30  7:35   ` Luwei Cheng
2013-10-30  8:45     ` Roger Pau Monné
2013-10-30  8:45     ` Roger Pau Monné
2013-10-30 13:11       ` Luwei Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).