From patchwork Tue Mar 10 07:28:47 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: 11428591 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 50CF41731 for ; Tue, 10 Mar 2020 07:30:05 +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 28DAF24655 for ; Tue, 10 Mar 2020 07:30:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28DAF24655 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 1jBZKC-0001bO-W9; Tue, 10 Mar 2020 07:29:12 +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.89) (envelope-from ) id 1jBZKA-0001ao-PT for xen-devel@lists.xenproject.org; Tue, 10 Mar 2020 07:29:10 +0000 X-Inumbo-ID: ceac9eed-62a0-11ea-ad1e-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ceac9eed-62a0-11ea-ad1e-12813bfff9fa; Tue, 10 Mar 2020 07:28:59 +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 7C872ABDE; Tue, 10 Mar 2020 07:28:58 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Tue, 10 Mar 2020 08:28:47 +0100 Message-Id: <20200310072853.27567-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v4 0/6] 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 , Andrew Cooper , Ian Jackson , George Dunlap , 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. This includes making rcu locking functions type safe. Changes in V4: - patch 5: use barrier() Changes in V3: - type safe locking functions (functions instead of macros) - per-lock debug additions - new patches 4 and 6 - fixed races Changes in V2: - use get_cpu_maps() in rcu_barrier() handling - avoid recursion in rcu_barrier() handling - new patches 3 and 4 Juergen Gross (6): 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: fix rcu_lock_domain() xen/rcu: add assertions to debug build xen/rcu: add per-lock counter in debug builds xen/arch/x86/mm/p2m-ept.c | 2 +- xen/arch/x86/numa.c | 4 +- xen/common/domain.c | 1 + xen/common/keyhandler.c | 6 +- xen/common/multicall.c | 1 + xen/common/preempt.c | 5 +- xen/common/rcupdate.c | 109 ++++++++++++++++++++-------- 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 | 76 +++++++++++++++---- xen/include/xen/sched.h | 6 +- xen/include/xen/softirq.h | 2 + 15 files changed, 180 insertions(+), 60 deletions(-)