[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Xen: credit2: avoid picking a spurious idle unit when caps are used


  • To: Dario Faggioli <dfaggioli@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 5 Aug 2021 08:31:15 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=knNHBwop9o4F+q/IufFmBNEmkdjW2M9uIYpMX1yd6WE=; b=eFoOCKs11YZ2VwJY899SsTUYTxj5pzRuoCoXS9uomWHVGOBy+j9u4uw626jjYa4tUmuDUEXiMOON4tzV31YAiiUgHV6L6pqPX+cXqIW+5OsrTfbqgnGpveaK0Siw2hMwkhSw6UwJwEgttAvlDMUenc/5Qjb+9fiWnEEwLSOaDzTRR81VRhyhFZ2Lsy2H4z4GEPR4Rdc57u5mza1W3wvAWnuv0zViMGrHfWRFzqGCLBvYFQ8vOj21Fww2ZmE3PqZhfQqWLuxxDV1uzLt8f03C3CnCJdeW8JbRtRK55oZ209EWlDpwFnvEKuSSwnI/CrBnfLzarBZIhW+E0O3hFPVCaw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SQIHnOTMUgnZJ7yx9iH/KCViJKP2hK35yOaMR5mVgAxxWFDLorA5HcFXj9gFuEaN16+VDvHNt+H/XYGF5ifP/lIKzOZAEPm2tSW9NCLIZDvK4LkcZODOd7P/68F5k/0C1DHwgxfrQCrz44LgXOF1q7Kj2VEfKrLn/WB6kqGDXAFUvzAxiU0EbGyTmgRARITEfuyiOXdaQU43GYAf/Dk0hNurVdk/Swk97+TMKw7rKTsTmmh/A2D0KaGaYlMn5Q7qRNFxJCvNnmr83snKRsxVousf9z2nsr046oyFebeaDn7LRAaO0Gf2CSBamZDV3RXwnB2j85KjPTOdPocaA80dKg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 05 Aug 2021 06:31:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.08.2021 19:55, Dario Faggioli wrote:
> Commit 07b0eb5d0ef0 ("credit2: make sure we pick a runnable unit from the
> runq if there is one") did not fix completely the problem of potentially
> selecting a scheduling unit that will then not be able to run.
> 
> In fact, in case caps are used and the unit we are currently looking
> at, during the runqueue scan, does not have enough budget for being run,
> we should continue looking instead than giving up and picking the idle
> unit.
> 
> Suggested-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> Signed-off-by: Dario Faggioli <dfaggioli@xxxxxxxx>

In part based on your explanation in response to my v1 comments:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with one nit:

> @@ -3494,16 +3503,25 @@ runq_candidate(struct csched2_runqueue_data *rqd,
>          }
>  
>          /*
> -         * If the one in the runqueue has more credit than current (or idle,
> -         * if current is not runnable), or if current is yielding, and also
> -         * if the one in runqueue either is not capped, or is capped but has
> -         * some budget, then choose it.
> +         * If we are here, we are almost sure we want to pick the unit in
> +         * the runqueue. Last thing we need to check is that it either is
> +         * not capped or, if it is, it has some budget.
> +         *
> +         * Note that budget availability must be the very last check that
> +         * we, in this loop, due to the side effects that unit_grab_budget().
> +         * causes.

The sentence looks broken to me: I think you either want to delete "that
we," or add "do" before the 1st or after the 2nd comma. If you agree, or
if you have another suggestion, I'd be happy to apply the adjustment
(let me know of your preference, if any) while committing.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.