From nobody Fri Mar 29 12:37:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1641429693; cv=none; d=zohomail.com; s=zohoarc; b=ROI01wuLdc1NbhRpv+GIgkFhwRTlqJYVdVhd4bkMFft9FC0XWvFaq029ZkNUBCMMXCvF3dZyP8ISA5Tzcts7WzmLMB44rE+2c+7L20AAJPbWxmme9Ib0LnwybYZ07n+zt85H5ebQ0ArQwc2ht8qnMZ/i97hWuGh3vSI5bnaGAfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641429693; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=BK0VCgDZhwraIidN5adt4xiBaAvDdFibrmaxGWhBU+I=; b=huklzWQ2/ve6aTA9OBlJjU4Vn502AMGJ/RgVTg8OtA429vzicmg0TgLDxodx5oj5+uolJLFjaVafLSEMQYTf+K9EwQFYvEyKFFx/OM4as+hEmUZRxyCzBf73b3Mk9AL5QPJOI0LoNZM1f3twKFy5fO0R/JjtsfoBGFX8cBV4MME= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1641429693510882.4686063494336; Wed, 5 Jan 2022 16:41:33 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.253806.435063 (Exim 4.92) (envelope-from ) id 1n5Gpg-0001pM-6V; Thu, 06 Jan 2022 00:40:44 +0000 Received: by outflank-mailman (output) from mailman id 253806.435063; Thu, 06 Jan 2022 00:40:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n5Gpg-0001pF-3I; Thu, 06 Jan 2022 00:40:44 +0000 Received: by outflank-mailman (input) for mailman id 253806; Thu, 06 Jan 2022 00:40:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n5Gpe-0001p9-Op for xen-devel@lists.xenproject.org; Thu, 06 Jan 2022 00:40:42 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 44db545b-6e89-11ec-81c0-a30af7de8005; Thu, 06 Jan 2022 01:40:40 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4803E6198A; Thu, 6 Jan 2022 00:40:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41FC7C36AEB; Thu, 6 Jan 2022 00:40:37 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 44db545b-6e89-11ec-81c0-a30af7de8005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641429637; bh=yhjlieHsS2F1nOEoEhFP+YOyRQ6e4+0F0JnKWl3r4ng=; h=Date:From:To:cc:Subject:From; b=ehblOepZmyIBTMA4mECJVK2UHnNK0qJzrNrWcXZ1+avfqDcvxzYdHka3/VMdv6p+V UzjyyrhLPWdoK8h8N2djb0CwrEwVhyokqYselgm6kg550DNvjsuE4wVpTlMlOkWll0 2F/MjkwpwZNrwFiUfSQwk1Ro1U1QQxdAv32L7L/0SEGApYEOLfgty+ycXNAleGc71M l/DA8VGjwIab1mimdHrvTFM2x/16wJiHdZw6RX5taGuzkYC8vi/AIpCWGYgUHs02DO hScwXshBWI7bXKVlWS966FfYA0WPx51VFcDyzvQRhM5KAwEerqhsQ1nza0suAd3NUt c+Utu1TXB6yaw== Date: Wed, 5 Jan 2022 16:40:36 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: dfaggioli@suse.com, george.dunlap@citrix.com cc: sstabellini@kernel.org, julien@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com, roger.pau@citrix.com, bertrand.marquis@arm.com, Volodymyr_Babchuk@epam.com, jgross@suse.com, xen-devel@lists.xenproject.org Subject: sched=null vwfi=native and call_rcu() Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1641429695343100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi all, As you might remember, we have an outstanding issue with call_rcu() when sched=3Dnull vwfi=3Dnative are used. That is because in that configuration the CPU never goes idle so rcu_idle_enter() never gets called. The issue was caught on the field and I managed to repro the problem doing the following: xl destroy test xl create ./test.cfg Resulting in the following error: # Parsing config from ./test.cfg # (XEN) IRQ 54 is already used by domain 1 The test domain has 3 interrupts remapped to it and they don't get released before the new domain creation is requested. Just FYI, the below hacky patch seems to reliably work-around the problem in my environment. Do you have any suggestions on what would be the right way to solve this issue? Cheers, Stefano diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c index a5a27af3de..841a5cb3c9 100644 --- a/xen/common/rcupdate.c +++ b/xen/common/rcupdate.c @@ -289,6 +289,9 @@ void call_rcu(struct rcu_head *head, force_quiescent_state(rdp, &rcu_ctrlblk); } local_irq_restore(flags); + /* make sure that the CPU has a chance to check RCUs */ + set_timer(&rdp->idle_timer, NOW() + SECONDS(1)); + rdp->idle_timer_active =3D true; } =20 /*