From patchwork Thu Feb 24 10:54:34 2022 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: 12758329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7F9FFC433FE for ; Thu, 24 Feb 2022 10:55:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.278151.475293 (Exim 4.92) (envelope-from ) id 1nNBll-0000h0-Bx; Thu, 24 Feb 2022 10:54:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 278151.475293; Thu, 24 Feb 2022 10:54:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNBll-0000gt-8v; Thu, 24 Feb 2022 10:54:45 +0000 Received: by outflank-mailman (input) for mailman id 278151; Thu, 24 Feb 2022 10:54:44 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNBlk-0000gJ-2G for xen-devel@lists.xenproject.org; Thu, 24 Feb 2022 10:54:44 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2bebbe0e-9560-11ec-8eb8-a37418f5ba1a; Thu, 24 Feb 2022 11:54:43 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 62AAF1F37F; Thu, 24 Feb 2022 10:54:42 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2258E13A79; Thu, 24 Feb 2022 10:54:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LvENB/JjF2L2SQAAMHmgww (envelope-from ); Thu, 24 Feb 2022 10:54:42 +0000 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: 2bebbe0e-9560-11ec-8eb8-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1645700082; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NoMWvYoXeFUJUeVEWMst2TYHSjWrHZfKY2PIDx5QSCo=; b=RSKAWO1sYuGsWqAc/ZFWYVq9vG+99/SGIh9NsJ31sT2wFbkSqY/0B4W5KsRBHc1aKPgVpj H4ewfp/OJnVaUQoYYHxxEfZ+1q/JPw3niwvwyNvAmwKbsRC2Sbf/Pyj2OQm0qNsiB8U4/N 5Da3R3Zt9Z/NxWnOLD+lX3TmZuG7bI4= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 0/2] xen/spinlock: cleanup struct spinlock Date: Thu, 24 Feb 2022 11:54:34 +0100 Message-Id: <20220224105436.1480-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 The spinlock data structure contains two cpu fields for storing the cpu number of the lock holder (one for debug purposes and one for recursive spinlocks). Merging them removes a build time limitation for supporting higher cpu numbers than today. This series is NOT using more bits for storing the cpu number, but doing that would now be possible. Taking rwlocks into account it would be possible now to use 14 bits for the cpu, allowing up to 16383 cpus without growing the lock related data types. Juergen Gross (2): xen/spinlock: use lock address for lock debug functions xen/spinlock: merge recurse_cpu and debug.cpu fields in struct spinlock xen/arch/x86/mm/mm-locks.h | 6 ++-- xen/common/spinlock.c | 70 ++++++++++++++++++++------------------ xen/include/xen/rwlock.h | 10 +++--- xen/include/xen/spinlock.h | 53 +++++++++++++++++------------ 4 files changed, 76 insertions(+), 63 deletions(-)