From patchwork Fri Mar 13 13:06: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: 11436871 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 DDC33921 for ; Fri, 13 Mar 2020 13:07:44 +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 C4ED320724 for ; Fri, 13 Mar 2020 13:07:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4ED320724 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 1jCk16-00018d-C0; Fri, 13 Mar 2020 13:06: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.89) (envelope-from ) id 1jCk15-00018S-86 for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 13:06:19 +0000 X-Inumbo-ID: 6cd2afee-652b-11ea-b2f0-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6cd2afee-652b-11ea-b2f0-12813bfff9fa; Fri, 13 Mar 2020 13:06:17 +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 B935AAD26; Fri, 13 Mar 2020 13:06:16 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 13 Mar 2020 14:06:10 +0100 Message-Id: <20200313130614.27265-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v6 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 , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich 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 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 (4): 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 | 97 +++++++++++++++++++++++++++++++++------------- xen/common/softirq.c | 14 ++++++- xen/include/xen/rcupdate.h | 76 +++++++++++++++++++++++++++++------- 3 files changed, 145 insertions(+), 42 deletions(-)