[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 8/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Tre
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 8/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Treat S390 cpus as devices |
Date: |
Tue, 30 Jul 2013 16:58:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Am 30.07.2013 16:50, schrieb Igor Mammedov:
> On Tue, 30 Jul 2013 10:27:26 -0400
> "Jason J. Herne" <address@hidden> wrote:
>> On 07/30/2013 03:24 AM, Igor Mammedov wrote:
>> Is there an easier way of getting the count besides this?
>>
>> int cpu_count = 0;
>> for (cpu = first_cpu; cpu != NULL; cpu = cpu->next_cpu) {
>> cpu_count++;
>> }
>
> maybe qemu_for_each_cpu(), direct access to first_cpu & co is not encouraged.
Negative: qemu_for_each_cpu() is discouraged, first_cpu and next_cpu are
okay. I need to send out my patch introducing CPU_FOREACH() macro based
on QTAILQ_FOREACH(), preview on qom-cpu-12 branch.
Markus wanted to rip out qemu_for_each_cpu() - also on that branch - but
mst wanted both to coexist.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg