All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mitsyanko <i.mitsyanko@gmail.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Marcel Apfelbaum <marcel@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class
Date: Mon, 6 Nov 2017 18:21:45 -0500	[thread overview]
Message-ID: <20171106232145.GA25246@flamenco> (raw)
In-Reply-To: <CAKmqyKOSOHdpzfu_WMPWo6Mh_kfmYhem0nR=BD3_hUws0tGEww@mail.gmail.com>

On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote:
> Sorry for the silence here, I noticed these were broken just before I
> went on holidays but didn't get a chance to fix anything.
> 
> For the Xilinx case I was thinking of patching the machine code to
> sanely follow the -smp option.
> 
> -smp 1 -> Only create 1 A53
> -smp 4 -> Create 4 A53s
> -smp 6 -> Create all the CPUs
> 
> I see a lot of advantages in not forcing the smallest number of CPUs
> to be 4 unless we really have to.
> 
> I do see a nice advantage in being able to set the default smp option
> to something not 1 so the default closely matches hardware, but users
> can override that if they want to.
> 
> So for the patch below I like the default_cpus option, but for Xilinx
> at least I would like to patch the logic to follow the -smp option
> instead of force a minimum.

Agreed, honouring -smp would be the right fix.
Just note that since this is a regression we need the fix to
be in for 2.11.

I just took a look at the non-Xilinx boards. It seems simple enough to
substitute the hard-coded value for smp_cpus, but yet again
I see "Property" structs that I'm not sure what to do with.
For instance, bcm2836.c:152:

static Property bcm2836_props[] = {
    DEFINE_PROP_UINT32("enabled-cpus", BCM2836State, enabled_cpus, BCM2836_NCPUS),
    DEFINE_PROP_END_OF_LIST()
};

What is the purpose here? To enable/disable CPUs with -global args,
just like it's done for the Xilinx boards? Shouldn't we just use
-smp for that?

Also, note that I don't have a way to test these boards, which
explains why I'm reluctant to change board code. But of
course if board maintainers step in, I'm all for it :-)

Thanks,

		Emilio

WARNING: multiple messages have this Message-ID (diff)
From: "Emilio G. Cota" <cota@braap.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	Igor Mitsyanko <i.mitsyanko@gmail.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Igor Mammedov <imammedo@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>,
	"Edgar E . Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class
Date: Mon, 6 Nov 2017 18:21:45 -0500	[thread overview]
Message-ID: <20171106232145.GA25246@flamenco> (raw)
In-Reply-To: <CAKmqyKOSOHdpzfu_WMPWo6Mh_kfmYhem0nR=BD3_hUws0tGEww@mail.gmail.com>

On Mon, Nov 06, 2017 at 14:32:35 -0800, Alistair Francis wrote:
> Sorry for the silence here, I noticed these were broken just before I
> went on holidays but didn't get a chance to fix anything.
> 
> For the Xilinx case I was thinking of patching the machine code to
> sanely follow the -smp option.
> 
> -smp 1 -> Only create 1 A53
> -smp 4 -> Create 4 A53s
> -smp 6 -> Create all the CPUs
> 
> I see a lot of advantages in not forcing the smallest number of CPUs
> to be 4 unless we really have to.
> 
> I do see a nice advantage in being able to set the default smp option
> to something not 1 so the default closely matches hardware, but users
> can override that if they want to.
> 
> So for the patch below I like the default_cpus option, but for Xilinx
> at least I would like to patch the logic to follow the -smp option
> instead of force a minimum.

Agreed, honouring -smp would be the right fix.
Just note that since this is a regression we need the fix to
be in for 2.11.

I just took a look at the non-Xilinx boards. It seems simple enough to
substitute the hard-coded value for smp_cpus, but yet again
I see "Property" structs that I'm not sure what to do with.
For instance, bcm2836.c:152:

static Property bcm2836_props[] = {
    DEFINE_PROP_UINT32("enabled-cpus", BCM2836State, enabled_cpus, BCM2836_NCPUS),
    DEFINE_PROP_END_OF_LIST()
};

What is the purpose here? To enable/disable CPUs with -global args,
just like it's done for the Xilinx boards? Shouldn't we just use
-smp for that?

Also, note that I don't have a way to test these boards, which
explains why I'm reluctant to change board code. But of
course if board maintainers step in, I'm all for it :-)

Thanks,

		Emilio

  reply	other threads:[~2017-11-06 23:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 18:47 [Qemu-devel] [PATCH] hw: add .min_cpus and .default_cpus fields to machine_class Emilio G. Cota
2017-11-03 18:47 ` Emilio G. Cota
2017-11-03 18:56 ` [Qemu-arm] " Emilio G. Cota
2017-11-03 18:56   ` [Qemu-devel] " Emilio G. Cota
2017-11-03 20:02   ` [Qemu-arm] " Eduardo Habkost
2017-11-03 20:02     ` [Qemu-devel] " Eduardo Habkost
2017-11-03 22:24     ` [Qemu-arm] " Emilio G. Cota
2017-11-03 22:24       ` [Qemu-devel] " Emilio G. Cota
2017-11-06 14:10       ` [Qemu-arm] " Eduardo Habkost
2017-11-06 14:10         ` [Qemu-devel] " Eduardo Habkost
2017-11-06 20:13         ` [Qemu-arm] " Emilio G. Cota
2017-11-06 20:13           ` [Qemu-devel] " Emilio G. Cota
2017-11-07  0:43           ` [Qemu-arm] " Alistair Francis
2017-11-07  0:43             ` Alistair Francis
2017-11-07 12:31             ` [Qemu-arm] " Eduardo Habkost
2017-11-07 12:31               ` Eduardo Habkost
2017-11-08 21:29           ` [Qemu-arm] " Richard Henderson
2017-11-08 21:29             ` [Qemu-devel] " Richard Henderson
2017-11-08 21:52             ` [Qemu-arm] " Eduardo Habkost
2017-11-08 21:52               ` [Qemu-devel] " Eduardo Habkost
2017-11-08 22:08               ` Alistair Francis
2017-11-08 22:08                 ` Alistair Francis
2017-11-06 21:54         ` [Qemu-arm] " Emilio G. Cota
2017-11-06 21:54           ` [Qemu-devel] " Emilio G. Cota
2017-11-06 22:32           ` [Qemu-arm] " Alistair Francis
2017-11-06 22:32             ` Alistair Francis
2017-11-06 23:21             ` Emilio G. Cota [this message]
2017-11-06 23:21               ` Emilio G. Cota
2017-11-06 23:33               ` [Qemu-arm] " Alistair Francis
2017-11-06 23:33                 ` Alistair Francis
2017-11-07  0:54                 ` [Qemu-arm] " Philippe Mathieu-Daudé
2017-11-07  0:54                   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2017-11-07  1:19                   ` Alistair Francis
2017-11-07  1:19                     ` Alistair Francis
2017-11-07 16:15           ` Philippe Mathieu-Daudé
2017-11-07 16:15             ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-11-07 19:32           ` Eduardo Habkost
2017-11-07 19:32             ` [Qemu-devel] " Eduardo Habkost
2017-11-07 19:48             ` [Qemu-arm] " Alistair Francis
2017-11-07 19:48               ` Alistair Francis
2017-11-07 19:54               ` [Qemu-arm] " Eduardo Habkost
2017-11-07 19:54                 ` Eduardo Habkost
2017-11-07 20:15 ` [Qemu-arm] " Eduardo Habkost
2017-11-07 20:15   ` Eduardo Habkost
2017-11-10 19:23   ` [Qemu-arm] " Emilio G. Cota
2017-11-10 19:23     ` Emilio G. Cota

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=20171106232145.GA25246@flamenco \
    --to=cota@braap.org \
    --cc=alistair.francis@xilinx.com \
    --cc=ehabkost@redhat.com \
    --cc=i.mitsyanko@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=marcel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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.