From patchwork Tue Feb 18 12:21:10 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: 11388325 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 A14A913A4 for ; Tue, 18 Feb 2020 12:23:01 +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 8783D207FD for ; Tue, 18 Feb 2020 12:23:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8783D207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none 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.89) (envelope-from ) id 1j41se-0006hQ-1G; Tue, 18 Feb 2020 12:21:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j41sc-0006h9-R6 for xen-devel@lists.xenproject.org; Tue, 18 Feb 2020 12:21:34 +0000 X-Inumbo-ID: 29ec8956-5249-11ea-bc8e-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 29ec8956-5249-11ea-bc8e-bc764e2007e4; Tue, 18 Feb 2020 12:21:18 +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 49E18B366; Tue, 18 Feb 2020 12:21:17 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Tue, 18 Feb 2020 13:21:10 +0100 Message-Id: <20200218122114.17596-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v2 0/4] xen/rcu: let rcu work better with core scheduling X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Kevin Tian , Stefano Stabellini , Julien Grall , Jun Nakajima , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Today the RCU handling in Xen is affecting scheduling in several ways. It is raising sched softirqs without any real need and it requires tasklets for rcu_barrier(), which interacts badly with core scheduling. This small series repairs those issues. Additionally some ASSERT()s are added for verification of sane rcu handling. In order to avoid those triggering right away the obvious violations are fixed. Changes in V2: - use get_cpu_maps() in rcu_barrier() handling - avoid recursion in rcu_barrier() handling - new patches 3 and 4 Juergen Gross (4): xen/rcu: use rcu softirq for forcing quiescent state xen/rcu: don't use stop_machine_run() for rcu_barrier() xen: add process_pending_softirqs_norcu() for keyhandlers xen/rcu: add assertions to debug build xen/arch/x86/mm/p2m-ept.c | 2 +- xen/arch/x86/numa.c | 4 +- xen/common/keyhandler.c | 6 +- xen/common/multicall.c | 1 + xen/common/rcupdate.c | 96 +++++++++++++++++++++-------- xen/common/softirq.c | 19 ++++-- xen/common/wait.c | 1 + xen/drivers/passthrough/amd/pci_amd_iommu.c | 2 +- xen/drivers/passthrough/vtd/iommu.c | 2 +- xen/drivers/vpci/msi.c | 4 +- xen/include/xen/rcupdate.h | 23 +++++-- xen/include/xen/softirq.h | 2 + 12 files changed, 118 insertions(+), 44 deletions(-) Tested-by: Igor Druzhinin