From patchwork Wed Mar 25 10:55:06 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: 11457481 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 6D5171668 for ; Wed, 25 Mar 2020 10:56:24 +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 54EEB206F6 for ; Wed, 25 Mar 2020 10:56:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54EEB206F6 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.89) (envelope-from ) id 1jH3gw-0005PL-Jn; Wed, 25 Mar 2020 10:55:22 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jH3gv-0005P9-C4 for xen-devel@lists.xenproject.org; Wed, 25 Mar 2020 10:55:21 +0000 X-Inumbo-ID: 1bca9638-6e87-11ea-a6c1-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1bca9638-6e87-11ea-a6c1-bc764e2007e4; Wed, 25 Mar 2020 10:55:15 +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 D5AC8ABD1; Wed, 25 Mar 2020 10:55:14 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 25 Mar 2020 11:55:06 +0100 Message-Id: <20200325105511.20882-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v7 0/5] 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 , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Volodymyr Babchuk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= 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 V7: - new patch 1 - added some barriers in patch 1 Changes in V6: - added memory barrier in patch 1 - drop cpu_map_lock only at the end of rcu_barrier() - re-add prempt_disable() in patch 3 Changes in V5: - dropped already committed patches 1 and 4 - fixed race - rework blocking of rcu processing with held rcu locks 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 (5): xen: introduce smp_mb__[after|before]_atomic() barriers xen/rcu: don't use stop_machine_run() for rcu_barrier() xen: don't process rcu callbacks when holding a rcu_read_lock() xen/rcu: add assertions to debug build xen/rcu: add per-lock counter in debug builds xen/common/rcupdate.c | 102 +++++++++++++++++++++++++++++++------------ xen/common/softirq.c | 14 +++++- xen/include/asm-arm/system.h | 3 ++ xen/include/asm-x86/system.h | 3 ++ xen/include/xen/rcupdate.h | 77 ++++++++++++++++++++++++++------ 5 files changed, 157 insertions(+), 42 deletions(-)