[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH QEMU v5 1/8] softmmu/dirtylimit: Add parameter check for hmp
From: |
Juan Quintela |
Subject: |
Re: [PATCH QEMU v5 1/8] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit" |
Date: |
Tue, 13 Jun 2023 18:37:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Juan Quintela <quintela@redhat.com> wrote:
> ~hyman <hyman@git.sr.ht> wrote:
>> From: Hyman Huang(黄勇) <yong.huang@smartx.com>
>>
>> dirty_rate paraemter of hmp command "set_vcpu_dirty_limit" is invalid
>> if less than 0, so add parameter check for it.
>
> why?
And here I am, making a full of myself.
vcpu_dirty_limit and vcpu_dirty_limit_period are two different things.
So:
Reviewed-by: Juan Quintela <quintela@redhat.com>
> Next patch does it correctly:
>
> + if (params->has_x_vcpu_dirty_limit_period &&
> + (params->x_vcpu_dirty_limit_period < 1 ||
> + params->x_vcpu_dirty_limit_period > 1000)) {
> + error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
> + "x-vcpu-dirty-limit-period",
> + "a value between 1 and 1000");
> + return false;
> + }
> +
> return true;
> }
>
> I hate to have to search several places to check for errors in values.
> We get all errors in the functions that set the parameters.
>
> Can you resend with just the monitor command removed?
>
> Or there is any advantage of getting the error message from
> qemu_set_vcpu_dirty_limit()?
>
> Later, Juan.
- [PATCH QEMU v5 0/8] migration: introduce dirtylimit capability, ~hyman, 2023/06/08
- [PATCH QEMU v5 1/8] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit", ~hyman, 2023/06/08
- [PATCH QEMU v5 5/8] migration: Refactor auto-converge capability logic, ~hyman, 2023/06/08
- [PATCH QEMU v5 2/8] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter, ~hyman, 2023/06/08
- [PATCH QEMU v5 7/8] migration: Extend query-migrate to provide dirty page limit info, ~hyman, 2023/06/08
- [PATCH QEMU v5 8/8] tests: Add migration dirty-limit capability test, ~hyman, 2023/06/08
- [PATCH QEMU v5 4/8] migration: Introduce dirty-limit capability, ~hyman, 2023/06/08