|
From: | Alberto Garcia |
Subject: | Re: [Qemu-block] [PATCH v3 3/3] throttle: make throttle_config(throttle_get_config()) symmetric |
Date: | Wed, 01 Mar 2017 13:30:52 +0100 |
User-agent: | Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 01 Mar 2017 12:50:26 PM CET, Stefan Hajnoczi wrote: > Throttling has a weird property that throttle_get_config() does not > always return the same throttling settings that were given with > throttle_config(). In other words, the set and get functions aren't > symmetric. > > If .max is 0 then the throttling code assigns a default value of .avg / > 10 in throttle_config(). This is an implementation detail of the > throttling algorithm. When throttle_get_config() is called the .max > value returned should still be 0. > > Users are exposed to this quirk via "info block" or "query-block" > monitor commands. This has caused confusion because it looks like a bug > when an unexpected value is reported. > > This patch hides the .max value adjustment in throttle_get_config() and > updates test-throttle.c appropriately. > > Reported-by: Nini Gu <address@hidden> > Signed-off-by: Stefan Hajnoczi <address@hidden> Reviewed-by: Alberto Garcia <address@hidden> Berto
[Prev in Thread] | Current Thread | [Next in Thread] |