All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Like Xu <like.xu@linux.intel.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	like.xu@intel.com, "Igor Mammedov" <imammedo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties
Date: Mon, 1 Apr 2019 20:38:18 -0300	[thread overview]
Message-ID: <20190401233818.GA22884@habkost.net> (raw)
In-Reply-To: <2546bf3e-2009-5a76-bc63-0ad73d333a78@linux.intel.com>

On Mon, Apr 01, 2019 at 10:56:30AM +0800, Like Xu wrote:
> On 2019/3/29 17:27, Alex Bennée wrote:
[...]
> > > @@ -1713,6 +1717,9 @@ static void cortex_a9_initfn(Object *obj)
> > >   #ifndef CONFIG_USER_ONLY
> > >   static uint64_t a15_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
> > >   {
> > > +    MachineState *ms = MACHINE(qdev_get_machine());
> > 
> > How expensive is qdev_get_machine? This could potentially be a
> > performance issue if this register is read a lot.
> 
> It may not bother us cause the MachineState object would be feteched from
> qemu QOM at its first requested time and save it as static variable for
> incoming requests.

We already have a current_machine variable declared in
include/hw/boards.h.  We normally avoid using it and use
MACHINE(qdev_get_machine()) instead, but I never understood why.

-- 
Eduardo

  parent reply	other threads:[~2019-04-01 23:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1553849325-44201-1-git-send-email-like.xu@linux.intel.com>
     [not found] ` <20190329112152.0c7ad147@redhat.com>
2019-04-04  3:26   ` [Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties Like Xu
2019-04-08 13:26     ` Igor Mammedov
2019-04-08 13:26       ` Igor Mammedov
2019-04-08 14:38       ` Like Xu
2019-04-08 14:38         ` Like Xu
     [not found] ` <1553849325-44201-2-git-send-email-like.xu@linux.intel.com>
2019-04-04 11:37   ` [Qemu-devel] [PATCH 1/9] cpu/topology: add struct CpuTopology to MachineState Igor Mammedov
     [not found] ` <1553849325-44201-3-git-send-email-like.xu@linux.intel.com>
2019-04-04 14:25   ` [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties Igor Mammedov
2019-04-04 16:21     ` Dr. David Alan Gilbert
2019-04-30  7:30     ` Like Xu
2019-04-30  7:30       ` Like Xu
2019-05-02 15:09       ` Igor Mammedov
2019-05-02 15:09         ` Igor Mammedov
2019-05-03  1:08         ` Eduardo Habkost
2019-05-03  1:01       ` Eduardo Habkost
2019-05-03  1:01         ` Eduardo Habkost
     [not found] ` <1553849325-44201-4-git-send-email-like.xu@linux.intel.com>
2019-04-08 12:54   ` [Qemu-devel] [PATCH 3/9] cpu/topology: add uncommon arch support for smp " Igor Mammedov
2019-04-08 12:54     ` Igor Mammedov
2019-04-16  8:47     ` Like Xu
2019-04-16  8:47       ` Like Xu
2019-04-16 12:00       ` Igor Mammedov
2019-04-16 12:00         ` Igor Mammedov
     [not found] ` <1553849325-44201-5-git-send-email-like.xu@linux.intel.com>
     [not found]   ` <87h8bmuj2d.fsf@zen.linaroharston>
     [not found]     ` <2546bf3e-2009-5a76-bc63-0ad73d333a78@linux.intel.com>
2019-04-01 23:38       ` Eduardo Habkost [this message]
2019-04-02  2:35         ` [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM " Like Xu
2019-04-02  4:45           ` Peter Maydell
2019-04-02  5:20             ` Like Xu
2019-04-02  5:27               ` Peter Maydell
2019-04-08 13:11   ` Igor Mammedov
2019-04-08 13:11     ` Igor Mammedov

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=20190401233818.GA22884@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=imammedo@redhat.com \
    --cc=like.xu@intel.com \
    --cc=like.xu@linux.intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.