From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D999A3438BC; Tue, 19 May 2026 17:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779212981; cv=none; b=mG1aMF/K46gh2lBT1cCmOWIRHGJvsLEDJN9n6th7eS54yKc5fdI7wMjFOyj75ZEfQnq0hqnKFAqf5jKAnytaf9AVUPo3hRm0AQJ8m+wcJY0GB5kAbFL4IEZlmapXMwMeoDaoh0E7cNkmNU/EZhaRD87ueW/I8fb8XSPMDWeSkm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779212981; c=relaxed/simple; bh=MCFb8ajmYnerqfxj37M676JQ1A3rkKHOZQ7mKtCXqpo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KhZDIkj1hRbiF2Bp31V3NCQNxtYIqRrlLbErVP3RfhAWkQMLvxJWXQS0Ywdh5wyFwuskgetw4EFYqx+Uz41CuN/B68y+7IFFHvDBgdiHmpRs34mxBF+l6n+c08umWmN896Ii2z18VNLzSKRC9E0yOs2tYSn8nqeVFI9jr0MpvW0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LnDuKDDk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LnDuKDDk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 930D6C2BCB3; Tue, 19 May 2026 17:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779212977; bh=MCFb8ajmYnerqfxj37M676JQ1A3rkKHOZQ7mKtCXqpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LnDuKDDkFBW+V/FxozQsPiFcPx8aZYGHnTP00yAyRccWcvqBsMieueWvO5wUJn7cv juvyPyHTMUcutMWr0TvWLfDXXl5RzLWcS4PG+5LEH3g0bde029SFyYN6dZ/7ScMU3G +GcxkDXrV8pkyB9JjxVAbZ7ucRPdqtJmYZumRZMEj/MTKFUo993v1HvWgbkB5hs76X KtZ7833USoNlSwPzYHm8TR6vuudwPOpT2BqVxRIh/6eZeeSblSBc74T1oHWnrgNXEI oor5AYAcpblzY08Bez9w/3I0n6suexTpMVhqDB+prmJ6Jv35j2djFhp17QADteyOXZ DlThIwRoxYO3w== Date: Tue, 19 May 2026 07:49:36 -1000 From: Tejun Heo To: Thomas Falcon Cc: Johannes Weiner , Michal =?iso-8859-1?Q?Koutn=FD?= , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] cgroup/rstat: convert rstat lock from spinlock to rwlock Message-ID: References: <20260519173134.1486365-1-thomas.falcon@intel.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260519173134.1486365-1-thomas.falcon@intel.com> On Tue, May 19, 2026 at 12:31:34PM -0500, Thomas Falcon wrote: > Implement rstat_ss_lock and rstat_base_lock as read-write locks > instead of spinlocks. In addition, update tracing to reflect new > locking implementation. > > The benchmark below, meant to simulate a workload performing many > concurrent cgroup cpu.stat reads, completes in 134 seconds on an Intel > Xeon Platinum 8568Y with 144 cpus compared to 241 seconds when > using spinlocks. Can you try using seqlock for readers? That'd be decouple readers a lot better than rwlocks. Thanks. -- tejun