qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 7/9] pc: acpi: drop not needed intermediate bitmap cpu->found_cpus
Date: Fri, 12 Feb 2016 11:05:48 +0100	[thread overview]
Message-ID: <20160212110548.5c0ad728@nial.brq.redhat.com> (raw)
In-Reply-To: <20160211155933.GB6239@thinpad.lan.raisama.net>

On Thu, 11 Feb 2016 13:59:33 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Fri, Feb 05, 2016 at 05:44:49PM +0100, Igor Mammedov wrote:
> > On Fri, 5 Feb 2016 17:19:50 +0100
> > Igor Mammedov <imammedo@redhat.com> wrote:
> >   
> > > On Fri, 5 Feb 2016 13:39:07 -0200
> > > Eduardo Habkost <ehabkost@redhat.com> wrote:
> > >   
> > > > On Thu, Feb 04, 2016 at 12:47:33PM +0100, Igor Mammedov wrote:    
> > > > > cpu->found_cpus bitmap is used for setting present
> > > > > flag in CPON AML package at start up. But it takes
> > > > > a bunch of code to fill bitmap and cloud be simplified
> > > > > by calling qemu_get_cpu_by_arch_id(apic_id) directly.
> > > > > 
> > > > > Hence do so and remove not used anymore bitmap
> > > > > with related utilities, which saves us ~32LOC
> > > > > and also would simplify consolidating APCI parts
> > > > > of CPU hotplug.
> > > > > 
> > > > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>      
> > > > 
> > > > This makes the code loops through all smp_cpus CPUs max_cpus
> > > > times, instead of just looping through the smp_cpus CPUs once.    
> > > Yep, that looks bad.
> > > I'll redo it using possible_cpu_arch_ids(), it is a little
> > > bit bigger refactoring.  
> > I think I'll make bitmap local to build_processor_devices() as it's
> > needed only for building CPON package, that way it will go along
> > with related legacy hotplug and won't get in the way of new hotplug.  
> 
> What about pc_possible_cpu_arch_ids() itself? It has exactly the
> same problem: it looks at CPU objects smp_cpus*max_cpus times, to
> fill the CPUArchId.cpu field. If that's a problem for
> build_processor_devices(), I assume that's a problem for all
> other possible_cpu_arch_ids() callers?
pls see v2
https://www.mail-archive.com/qemu-devel@nongnu.org/msg351298.html

  reply	other threads:[~2016-02-12 10:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 11:47 [Qemu-devel] [PATCH 0/9] pc: do not create invalid MADT.LAPIC/Processor entries Igor Mammedov
2016-02-04 11:47 ` [Qemu-devel] [PATCH 2/9] machine: introduce MachineClass.possible_cpu_arch_ids() hook Igor Mammedov
2016-02-04 12:18   ` Marcel Apfelbaum
2016-02-04 13:36     ` Igor Mammedov
2016-02-05 14:13       ` Eduardo Habkost
2016-02-05 14:49         ` Igor Mammedov
2016-02-05 15:04   ` Eduardo Habkost
2016-02-05 15:39     ` Igor Mammedov
2016-02-05 15:50       ` Eduardo Habkost
2016-02-05 16:29         ` Igor Mammedov
2016-02-04 11:47 ` [Qemu-devel] [PATCH 3/9] pc: acpi: cleanup qdev_get_machine() calls Igor Mammedov
2016-02-04 12:21   ` Marcel Apfelbaum
2016-02-04 11:47 ` [Qemu-devel] [PATCH 4/9] pc: acpi: SRAT: create only valid processor lapic entries Igor Mammedov
2016-02-05 15:07   ` Eduardo Habkost
2016-02-04 11:47 ` [Qemu-devel] [PATCH 5/9] pc: acpi: create Processor and Notify objects only for valid lapics Igor Mammedov
2016-02-05 15:17   ` Eduardo Habkost
2016-02-05 15:43     ` Igor Mammedov
2016-02-04 11:47 ` [Qemu-devel] [PATCH 6/9] pc: acpi: create MADT.lapic entries " Igor Mammedov
2016-02-05 15:28   ` Eduardo Habkost
2016-02-05 16:14     ` Igor Mammedov
2016-02-11 16:11       ` Eduardo Habkost
2016-02-12 10:04         ` Igor Mammedov
2016-02-04 11:47 ` [Qemu-devel] [PATCH 7/9] pc: acpi: drop not needed intermediate bitmap cpu->found_cpus Igor Mammedov
2016-02-05 15:39   ` Eduardo Habkost
2016-02-05 16:19     ` Igor Mammedov
2016-02-05 16:44       ` Igor Mammedov
2016-02-11 15:59         ` Eduardo Habkost
2016-02-12 10:05           ` Igor Mammedov [this message]
2016-02-04 11:47 ` [Qemu-devel] [PATCH 8/9] pc: move apic_id_limit to PCMachineState Igor Mammedov
     [not found]   ` <56B348BA.40502@gmail.com>
2016-02-04 17:08     ` Igor Mammedov
2016-02-04 18:18       ` Michael S. Tsirkin
2016-02-04 18:24         ` Igor Mammedov
2016-02-04 11:47 ` [Qemu-devel] [PATCH 9/9] pc: acpi: clarify why possible LAPIC entries must be present in MADT Igor Mammedov
2016-02-05 15:39   ` Eduardo Habkost
2016-02-04 11:49 ` [Qemu-devel] [PATCH 1/9] cpu: rename cpu_exists() to qemu_get_cpu_by_arch_id() Igor Mammedov
2016-02-05 14:20   ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160212110548.5c0ad728@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).