From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 768223D9033 for ; Fri, 3 Apr 2026 21:32:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775251935; cv=none; b=LMui+7VxwGfvr/0NwKvPv4uAb2JtpkjIzHr/iD7R4n+NnAgBUpPHJWL1dyWJ594y9P4uKK2GjMkMMjODfqfDrKyeAfOhIObZK63i7UDXvuRWl07Ay+/eUQD/CDBOgEmQSM1VTq0SXJPygH6TQFuwyZIjS422dhXqJgdejeQmygs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775251935; c=relaxed/simple; bh=jeHPVg0BmEi4EDVi2ioSPgQ5nZ/NuIieZwbwlnZ1ktU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VyVJixGOADd8EaXhfMN0jNomA52tDVchvTfkEuc4SoQADbGtOI9su7b7oXBkiluyX8fKs1pX7iI/ohFLns1+7gJVbnm+VuOWYKkOYALiU8QZqP9cxQ4o6wRn0mVA3UNuXLN6ZEb6zMdf8Dbjumeq7adBIEbptHdTj35HYHTQVJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=oXmCSD1e; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oXmCSD1e" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lZbup6XXLqnoDkshqZYsghM6JSeX/VTPmHA6cGH2v5c=; b=oXmCSD1eytHdcTB2rF2so4oyLs 0vNeHASlw1jhN7Ty0Lr6UymnErSFlYxtVIDdnUvVYSpT/RoqgKbkHHrejRdX5IBy74vMyV97g70XG 8V1FWVjTaCrboLVUGH1VeIBLd1eLdpMH/UbsXMn4L65yTFRXOB0yfTeUHMLmKnJm2Ue3qRXskqKqQ GXXsIuWnuEMtGasXRpppc4lZm2QAww+KdwVqWNFD3NpQMstsNjB3i2C49QpaQ4YB9fHtZgUpx6c49 ogf/uCxi74xerVExG/yiH/w+IY43LpHYD+FHNrCX1aNsH5DVLPpGpZTmd3N8ZBASfqeBmiKYdgpm2 42cMlb+w==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w8m7c-0000000F3rG-2Flk; Fri, 03 Apr 2026 21:32:08 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 3C671300346; Fri, 03 Apr 2026 23:32:07 +0200 (CEST) Date: Fri, 3 Apr 2026 23:32:07 +0200 From: Peter Zijlstra To: Salvatore Dipietro Cc: linux-kernel@vger.kernel.org, alisaidi@amazon.com, blakgeof@amazon.com, abuehaze@amazon.de, dipietro.salvatore@gmail.com, Thomas Gleixner , Valentin Schneider , Sebastian Andrzej Siewior , Mark Rutland Subject: Re: [PATCH 0/1] sched: Restore PREEMPT_NONE as default Message-ID: <20260403213207.GF2872@noisy.programming.kicks-ass.net> References: <20260403191942.21410-1-dipiets@amazon.it> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260403191942.21410-1-dipiets@amazon.it> On Fri, Apr 03, 2026 at 07:19:36PM +0000, Salvatore Dipietro wrote: > We are reporting a throughput and latency regression on PostgreSQL > pgbench (simple-update) on arm64 caused by commit 7dadeaa6e851 > ("sched: Further restrict the preemption modes") introduced in > v7.0-rc1. > > The regression manifests as a 0.51x throughput drop on a pgbench > simple-update workload with 1024 clients on a 96-vCPU > (AWS EC2 m8g.24xlarge) Graviton4 arm64 system. Perf profiling > shows 55% of CPU time is consumed spinning in PostgreSQL's > userspace spinlock (s_lock()) under PREEMPT_LAZY: > > |- 56.03% - StartReadBuffer > |- 55.93% - GetVictimBuffer > |- 55.93% - StrategyGetBuffer > |- 55.60% - s_lock <<<< 55% of time > | |- 0.39% - el0t_64_irq > | |- 0.10% - perform_spin_delay > |- 0.08% - LockBufHdr > |- 0.07% - hash_search_with_hash_value > |- 0.40% - WaitReadBuffers The fix here is to make PostgreSQL make use of rseq slice extension: https://lkml.kernel.org/r/20251215155615.870031952@linutronix.de That should limit the exposure to lock holder preemption (unless PostgreSQL is doing seriously egregious things).