Re: [patch] remove vcpu_info array v5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi Kivity wrote:
Yes, but I believe the whole point of jes patches is to remove those limits.

So we could linear search huge lists? Or code hashes where arrays would do? No, sir.

An array of pointers statically sized at MAX_CPUS is fine. If you insist, you can realloc() it on demand.

Sorry, but this is riciculous. Please try and take a look at where the
search is performed. It's *solely* in the ACPI hot plug code.

realloc() is not an option, unless of course you are in favor of putting
a big lock around all access to such an array.

My patch gets rid of the pointless MAX_CPUS sized array, which doesn't
buy us anything. In fact, most of the changes in my patch makes the
code simpler, because it removes a stack of silly cases where qemu uses
env->cpu_index to get into the array, just to hide CPUState from libkvm,
just to have the callback in QEMU go from int vcpu back to CPUState.

Lets just do it right and get rid of this silliness.

Jes
--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux