Subject: Re: [PATCH] cobalt/sched-quota: Account for already consumed time on limit update From: Jan Kiszka References: Message-ID: Date: Mon, 26 Nov 2018 15:22:03 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum , Xenomai On 26.11.18 13:22, Jan Kiszka wrote: > On 25.11.18 18:14, Philippe Gerum wrote: >> On 11/21/18 5:59 PM, Jan Kiszka wrote: >>> If we change the quota value of thread group, we should take its already >>> consumed time during the current cycle into account. So far, we refilled >>> the budget blindly, which could have given the group an uncontrolled >>> "peak". >>> >>> This commit first update the run_budget_ns of an active group and kills >>> its limit timer. Then it refills run_budget_ns only with the remaining >>> budget of the current cycle, taking the new quota as limit. >>> >>> Accumulated credits are still dropped - not worth to deal with their >>> complexity in this scenario. >>>> Signed-off-by: Jan Kiszka >>> --- >>> >>> Philippe, review would be appreciated. >>> >> >> Looks good. > > Thanks. Applied to next now. > ...and it will go into stable as well. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux