[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 00/13] xen/spinlock: make recursive spinlocks a dedicated type


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 19 Oct 2023 09:48:22 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AeDL6BkzpG6WN7PmKzsfB5IK1hDEhWpDLBhqUIxE+L8=; b=cK6G7JG6b2Fv3HcG1g8a5+/B9wTjY8jas2psXCeckoMSPRnTRR/Lr1A6RHYxYenXtd9p9xlRR8eFNKgW5seIZWE3hzWXS+0fUQvaTmCfdNt7RQbRW6fWRDFTJdyEAZfVbfAmBrb9/n+kvb8tkIAn6pEg2Tqd6FlkOxZpneeuvaWIA4cjcEjjiwVC9Os9TIR4J8krSAT/ulatTVkSmmx6FA7oASoSFozF+iQTq3OZm3mOXlZVTnZNxviKDGVAZtXFAUcjdXDbk0M/qfXUnrFgwn19kNi3liK8+6biZZB4nVy+r8Yi/KQwPTrjP6cbXWqKobnKijCx2+FLb00U9+WURg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FVrhXRd2s6LQiGvM6aBrUSRPqdCMnfbEepQKMUwZgygzeZc8eRb2BLIi6VoGlUeJjP4KYYdRmepxm+cbPc4mf0jekVQZ1IukdtI5Ah2bvK84uD7l88yfr3BeCBENI2mMWJmMU4EsEcvwepZi9/gHbASj97ZgfX0kq7e1ioYPouMA0OxxTeecGQk2ava3px3X64eXrjuWWVspy3OK/9q0U/KNKnEq8Iv7VTlHhaFjgrw+Pl4DYFxchW16aRJXAOEEQ4E4q9YzpfU9Fuk5DwAN1Yy219GfdT4HX4eFoFzBd5x+7FkwcfI6NIch3GcYdly3nW2Fb1awLJCKfDxhPmCaBQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: javi.merino@xxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Lukasz Hawrylko <lukasz@xxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Mateusz Mówka <mateusz.mowka@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Oct 2023 07:48:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.10.2023 11:42, Juergen Gross wrote:
> Instead of being able to use normal spinlocks as recursive ones, too,
> make recursive spinlocks a special lock type.
> 
> This will make the spinlock structure smaller in production builds and
> add type-safety.
> 
> This allows to increase the maximum number of physical cpus from 8191
> to 65535 without increasing the size of the lock structure in production
> builds (the size of recursive spinlocks in debug builds will grow to
> 12 bytes due to that change).
> 
> Changes in V2:
> - addressed comments by Jan Beulich
> - lots of additional cleanups
> - reorganized complete series
> 
> Juergen Gross (13):
>   xen/spinlock: fix coding style issues
>   xen/spinlock: reduce lock profile ifdefs
>   xen/spinlock: make spinlock initializers more readable
>   xen/spinlock: introduce new type for recursive spinlocks
>   xen/spinlock: rename recursive lock functions
>   xen/spinlock: add rspin_[un]lock_irq[save|restore]()
>   xen/spinlock: make struct lock_profile rspinlock_t aware
>   xen/spinlock: add explicit non-recursive locking functions
>   xen/spinlock: add another function level
>   xen/spinlock: add missing rspin_is_locked() and rspin_barrier()
>   xen/spinlock: split recursive spinlocks from normal ones
>   xen/spinlock: remove indirection through macros for spin_*() functions
>   xen/spinlock: support higher number of cpus

Before looking at patches 4 and onwards, I'd like us to settle on the future
of recursive locking in Xen, considering in particular Andrew's objections
to their use in the code base. If the plan was to eliminate them, I'd see
little point in reworking the infrastructure. I'd like to suggest that one
of us tries to remember to put this up as an agenda item for the next
Community Call. But of course the discussion can also happen right here; I
merely expect there might not be much of a reaction.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.