From nobody Mon Feb 9 14:33:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1589470602; cv=none; d=zohomail.com; s=zohoarc; b=ERs+zj0KKEokxnaUZ2C8HlLKY4ntl4WhLTRFSNrTelZ7f3mSuIVIo+gRdWTSlklHp7u6A0j2AeSKn94yeU2OckFI4HnJeY+vy/d5vra4Pvevs02LrxeN+a6HHIspgE82fUChvVb9qD+e+3+VzZ3QVR8Rt6/lnXWCiIN/dgff9hw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589470602; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zyYIBqx6BNCF4niHtbqhWRxxcDc9qPWMp1H2zIi86P0=; b=D2ba48UYpIELudm+mlDb9vO1/vzvZpGuft3R2CBYlFWJAP+B+HItYNRWCmFhPfSvWc1qyzeRwAx8eUO74Rzj3yWsmq7cw9tjlysTFqIFya5xgdcciymgddTyBBh01uZW4AFNKp4p7u1wB8ITBFa578YO9gEO0TZ4RCT+Ug+1dK4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1589470602483462.4039320357298; Thu, 14 May 2020 08:36:42 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZFuG-00079b-9D; Thu, 14 May 2020 15:36:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZFuF-00079W-AH for xen-devel@lists.xenproject.org; Thu, 14 May 2020 15:36:19 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a7582e02-95f8-11ea-a4ad-12813bfff9fa; Thu, 14 May 2020 15:36:18 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 34574AEC5; Thu, 14 May 2020 15:36:20 +0000 (UTC) X-Inumbo-ID: a7582e02-95f8-11ea-a4ad-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Subject: [PATCH v3 2/3] xen/sched: don't call sync_vcpu_execstate() in sched_unit_migrate_finish() Date: Thu, 14 May 2020 17:36:13 +0200 Message-Id: <20200514153614.2240-3-jgross@suse.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200514153614.2240-1-jgross@suse.com> References: <20200514153614.2240-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , George Dunlap , Jan Beulich , Dario Faggioli Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" With support of core scheduling sched_unit_migrate_finish() gained a call of sync_vcpu_execstate() as it was believed to be called as a result of vcpu migration in any case. In case of migrating a vcpu away from a physical cpu for a short period of time ionly without ever being scheduled on the selected new cpu this might not be true, so drop the call and let the lazy state syncing do its job. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Dario Faggioli --- V2: - new patch --- xen/common/sched/core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 5df66cbf9b..cb49a8bc02 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -1078,12 +1078,7 @@ static void sched_unit_migrate_finish(struct sched_u= nit *unit) sched_spin_unlock_double(old_lock, new_lock, flags); =20 if ( old_cpu !=3D new_cpu ) - { - /* Vcpus are moved to other pcpus, commit their states to memory. = */ - for_each_sched_unit_vcpu ( unit, v ) - sync_vcpu_execstate(v); sched_move_irqs(unit); - } =20 /* Wake on new CPU. */ for_each_sched_unit_vcpu ( unit, v ) --=20 2.26.1