From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B8293A3E95 for ; Tue, 7 Apr 2026 11:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775560780; cv=none; b=XmH3XIdTPym4YTWnBaafHwd71AM7nTYVS5Wc7gKCh5sVlQislfNFYZPC5xF2/amr3qI03b1A29Cz+oEycpf/AJrFygR0LekdHvaSS4UEoI8S+RASLapKTc9Tde0+JuoU+qr5U3rdRaiCQwBXllM+J8ITyJJjg/dxh5yp10DBfNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775560780; c=relaxed/simple; bh=DTLGpY52U0WA/rO5TGLKAaSjOvpTeanYbs0UA1jgCMM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C5u+cpUGOpybQ3RLCS0cGH8CjFbhIlNblfVM2+awos9M3IqoyRFJyz9gGyFVa3LGeYwDtDpkGotLjyCidZYJMEuAky6fL/qBDeN4NQo6pLORfD7Uk2/i1CNARSv7mxIMi1L8sbMHrsvbgIP1MJQyp9KgZ+A4AvOvq1ymvtfSvSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=WjTUAmE5; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="WjTUAmE5" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8AA6B1AED; Tue, 7 Apr 2026 04:19:31 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 753003F7D8; Tue, 7 Apr 2026 04:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775560777; bh=DTLGpY52U0WA/rO5TGLKAaSjOvpTeanYbs0UA1jgCMM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WjTUAmE5P9+wUV1V0kOvGMGhpHjfjZtP/v6mdyKjtPL4Zr8aG0IOQQVVM9tGwdxKm jgpO8MYmgcRC8OUO4LJWYcaRfLrJuU9nk/aaHelldI3UGr7zZjZwfAAnJiikKbn41R YuhuDQp+Xmiqiv4ZTTuHV3uxIfiL1JVSx5UhaZpQ= Date: Tue, 7 Apr 2026 12:19:29 +0100 From: Mark Rutland To: Salvatore Dipietro Cc: Andres Freund , Peter Zijlstra , 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 Subject: Re: [PATCH 0/1] sched: Restore PREEMPT_NONE as default Message-ID: References: <20260403191942.21410-1-dipiets@amazon.it> <20260403213207.GF2872@noisy.programming.kicks-ass.net> 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: On Sun, Apr 05, 2026 at 12:21:55AM -0400, Andres Freund wrote: > On 2026-04-04 21:40:29 -0400, Andres Freund wrote: > > On 2026-04-04 13:42:22 -0400, Andres Freund wrote: > > The benchmark script seems to indicate that huge pages aren't in use: > > https://github.com/aws/repro-collection/blob/main/workloads/postgresql/main.sh#L15 For the benefit of those reading mail without a browser, the line in question is: ${PG_HUGE_PAGES:=off} # off, try, on Per the PostgreSQL 17 documentation: https://www.postgresql.org/docs/17/runtime-config-resource.html#GUC-HUGE-PAGES ... the default is 'try', though IIUC some additional system configuration may be necessary, to actually reserve huge pages, which is also documented: https://www.postgresql.org/docs/17/kernel-resources.html#LINUX-HUGE-PAGES > > I wonder if somehow the pages underlying the portions of postgres' shared > > memory are getting paged out for some reason, leading to page faults while > > holding the spinlock? > > Hah. I had reflexively used huge_pages=on - as that is the only sane thing to > do with 10s to 100s of GB of shared memory and thus part of all my > benchmarking infrastructure - during the benchmark runs mentioned above. Salvatore, was there a specific reason to test with PG_HUGE_PAGES=off rather than PG_HUGE_PAGES=try? Was that arbitrary (e.g. because it was the first of the possible options)? IIUC from what Andres says here (and in other mails in this thread), that's not a sensible/realistic configuration for this sort of workload, and is the root cause of the contention (which seems to be exacerbated by the scheduler model change). As Andres noted, even ignoring the scheduler model, running with PG_HUGE_PAGES=off results in a substantial performance penalty: > *regardless* the spinlock. PG 19 does have the spinlock in this path anymore, > but not using huge pages is still utterly terrible (like 1/3 of the > throughput). > > I did run some benchmarks here and I don't see a clearly reproducible > regression with huge pages. Is the PG_HUGE_PAGES=off configuration important to you for some reason? Mark.