From patchwork Mon May 11 11:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11540459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB3AE139A for ; Mon, 11 May 2020 11:29:49 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E42F20735 for ; Mon, 11 May 2020 11:29:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E42F20735 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jY6bs-0001fY-0i; Mon, 11 May 2020 11:28:36 +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 1jY6br-0001fN-61 for xen-devel@lists.xenproject.org; Mon, 11 May 2020 11:28:35 +0000 X-Inumbo-ID: 8c1673a4-937a-11ea-a200-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8c1673a4-937a-11ea-a200-12813bfff9fa; Mon, 11 May 2020 11:28:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D308AEC1; Mon, 11 May 2020 11:28:35 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Subject: [PATCH v2 2/3] xen/sched: don't call sync_vcpu_execstate() in sched_unit_migrate_finish() Date: Mon, 11 May 2020 13:28:28 +0200 Message-Id: <20200511112829.5500-3-jgross@suse.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200511112829.5500-1-jgross@suse.com> References: <20200511112829.5500-1-jgross@suse.com> MIME-Version: 1.0 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 , Dario Faggioli Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 only 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 --- 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_unit *unit) sched_spin_unlock_double(old_lock, new_lock, flags); if ( old_cpu != 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); - } /* Wake on new CPU. */ for_each_sched_unit_vcpu ( unit, v )