Skip to contentSkip to conversation

increase evtchn limits

DISCUSSION Mukesh Rathor 3 participants 6 messages May 21, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to boot up with lot more than 32 vcpus on this very large box. I overcame vcpu_info[MAX_VIRT_CPUS] by doing vcpu placement hypercall in guest, but now running into evt channel limit (lots of devices):

       unsigned long evtchn_pending[sizeof(unsigned long) * 8];

which limits to 512 max for my 64bit dom0. The only recourse seems to create a new struct shared_info_v2{}, and re-arrange it a bit with lot more event channels. Since, start_info has magic with version info, I can just check that in guest and use new shared_info...(doing the design on the fly here). I can create a new vcpuop saying the guest is using newer version. Or forget new version of shared_info{}, I can just put evtchn stuff in my own mfn and tell hypervisor to relocate it, (just like vcpu_info does) via new VCPUOP_ call.

Keir, what do you think?

thanks,
Mukesh

#1 lore raw
Quoted 8 lines · Mukesh Rathor

Hi,

I'm trying to boot up with lot more than 32 vcpus on this very large box. I overcame vcpu_info[MAX_VIRT_CPUS] by doing vcpu placement hypercall in guest, but now running into evt channel limit (lots of devices):

       unsigned long evtchn_pending[sizeof(unsigned long) * 8];

I'm not sure, but it seems: 1024 for 32bit and 4096 for 64bit.

32bit: 4 * (4 * 8) * 8 = 1024
64bit: 8 * (8 * 8) * 8 = 4096

zhigang

Quoted 19 lines

which limits to 512 max for my 64bit dom0. The only recourse seems to create a new struct shared_info_v2{}, and re-arrange it a bit with lot more event channels. Since, start_info has magic with version info, I can just check that in guest and use new shared_info...(doing the design on the fly here). I can create a new vcpuop saying the guest is using newer version. Or forget new version of shared_info{}, I can just put evtchn stuff in my own mfn and tell hypervisor to relocate it, (just like vcpu_info does) via new VCPUOP_ call.

Keir, what do you think?

thanks,
Mukesh

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw
In reply to Mukesh Rathor
Quoted 8 lines · Mukesh Rathor

I'm trying to boot up with lot more than 32 vcpus on this very large box. I overcame vcpu_info[MAX_VIRT_CPUS] by doing vcpu placement hypercall in guest, but now running into evt channel limit (lots of devices):

       unsigned long evtchn_pending[sizeof(unsigned long) * 8];

which limits to 512 max for my 64bit dom0.

How many CPUs do you have to bring up? How many event channels are we squandering per CPU in PV Linux right now (can you enumerate them)?

-- Keir

#2 lore raw
In reply to Zhigang Wang
Quoted 6 lines · Zhigang Wang
Quoted 2 lines
       unsigned long evtchn_pending[sizeof(unsigned long) * 8];

I'm not sure, but it seems: 1024 for 32bit and 4096 for 64bit.

32bit: 4 * (4 * 8) * 8 = 1024
64bit: 8 * (8 * 8) * 8 = 4096

This is correct. Which is why I wonder how many CPUs you are dealing with, and how many event channels are being allocated per CPU. 4096 event channels ought to be plenty for dom0 bringup on even a very big system.

K.

#3 lore raw
Quoted 9 lines · On Fri, 21 May 2010 08:12:13 +0100 Keir Fraser <[email protected]>…
Quoted 6 lines · Zhigang Wang
Quoted 2 lines
       unsigned long evtchn_pending[sizeof(unsigned long) * 8];

I'm not sure, but it seems: 1024 for 32bit and 4096 for 64bit.

32bit: 4 * (4 * 8) * 8 = 1024
64bit: 8 * (8 * 8) * 8 = 4096

Quoted 7 lines

This is correct. Which is why I wonder how many CPUs you are dealing with, and how many event channels are being allocated per CPU. 4096 event channels ought to be plenty for dom0 bringup on even a very big system.

K.

My bad, it's ulong[], not sure why I thought it was uchar[]. So sorry for the false alarm. I'm hitting BUG_ON(!test_bit(chn, s->evtchn_mask)); in bind_evtchn_to_cpu() and when I saw it on chn == 520, combined with my thinking it was uchar, i made wrong conclusion. Apologies. Anyways, I'll debug further.

But looking forward, I can see hitting limits of 4096 not too far in future, so I think it will be a great idea to 'collapse the four IPIs onto one event channel', perhaps next xen release.

Thanks again.
Mukesh

#4 lore raw
Quoted 3 lines · Mukesh Rathor

But looking forward, I can see hitting limits of 4096 not too far in future, so I think it will be a great idea to 'collapse the four IPIs onto one event channel', perhaps next xen release.

This doesn't require any Xen changes, and hence is not an issue to be dealt with in a Xen release. It can be implemented in any guest kernel as soon as anyone cares to.

-- Keir