[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/6] xen/credit2: Clean up trace handling
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 20 Sep 2021 11:11:10 +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; bh=ZQ14YNKsbXfYrrub9l0XRKId0d3U7KU+ivHIckNGKJ4=; b=kwm51En0PbTJpdBQ3cfSeZU31wCYn7XJguTQAZ2sToCesFE3RaedbGcmp6mIx93hKWt/dE6yn0pXLmUG9oWVdp8dV0PlLVkvtqJOIb+XWcBQcF7IzyJQhXhg2PmJ21jWbtt3shOLkLEm1ejWYUmig2X6bAJkJRHq3ifRF1LimWIHMJ1hC/OeMk5Q55II1lHSj4q02XCdwZbywaAAKZjYPSu0vxnVi1lFw8JlNEYl6xS8VvZGc7iwJ2VqLJaFayeoHZFY+8cvKZfqVEend+pnrG03JuP02SeYMlOhJGoUiDpk2wSqtcUsblnfPaobUMr5HulyU1eWExVvpI/qEGizGQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WktPLMPgIBogDq6XhyIlKH7Gp3XIkpDAVIoYLI21aGQcCuwPUqbRzkDgML/Onx2qpiEwHsB2VRyhdFThJJL3SJTmY0pU8qdy5AMTaSo7RSytiWoVlHRjNrFt+spxHQi8Kuv6MvWN5GqxxMxC4YmOnmkOdFTznbheKLcPUomIg502ncw0dNQAXaBTHf6Evm2bYxbtdykssDtff5gwU095XyGZTBa7LzX6H2qLKlenU16lDsEsJMxPyTrhI5Na2FnQep0S3QOx8sBlTsUGoYnR8ZAxJbxUAO23capv45ij238ydAlpJZTx+lPobuFtQhz9JXyHCTXoKSNo9L4chJsAuA==
- 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@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 20 Sep 2021 09:11:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 17.09.2021 10:45, Andrew Cooper wrote:
> There is no need for bitfields anywhere - use more sensible types. There is
> also no need to cast 'd' to (unsigned char *) before passing it to a function
> taking void *.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with (nit) ...
> @@ -1888,18 +1883,17 @@ void burn_credits(struct csched2_runqueue_data *rqd,
> if ( unlikely(tb_init_done) )
> {
> struct {
> - unsigned unit:16, dom:16;
> - int credit, budget;
> - int delta;
> - } d;
> - d.dom = svc->unit->domain->domain_id;
> - d.unit = svc->unit->unit_id;
> - d.credit = svc->credit;
> - d.budget = has_cap(svc) ? svc->budget : INT_MIN;
> - d.delta = delta;
> - __trace_var(TRC_CSCHED2_CREDIT_BURN, 1,
> - sizeof(d),
> - (unsigned char *)&d);
> + uint16_t unit, dom;
> + uint32_t credit, budget, delta;
> + } d = {
> + .unit = svc->unit->unit_id,
> + .dom = svc->unit->domain->domain_id,
> + .credit = svc->credit,
> + .budget = has_cap(svc) ? svc->budget : INT_MIN,
... a stray blank removed here.
Jan
|