[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters
Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero
Thu, 22 Jul 2021 16:38:45 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0
On 22/07/21 16:12, wangyanan (Y) wrote:
The smp_parse and pc_smp_parse are going to be converted into a
generic parser, and the added sanity-check in this patch will also be
tested in an unit test. So is it probably better to keep the check in the
parser instead of the caller? The duplication will be eliminated anyway
when there is one single parser.
But I can also implement the check in machine_set_smp as you mentioned
if it's more reasonable and preferred. :)
Yes, I would prefer to avoid having duplicate code. There are some
common checks already in machine_set_smp, e.g. comparing ms->smp.cpus
against mc->min_cpus and mc->max_cpus.