From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98B4B40DFC9 for ; Mon, 6 Apr 2026 00:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775436227; cv=none; b=sC/LCV5EsPw2H8l60VtfFDpxhXA0qKu9gEGO3K0W7HR29cEIUrTAXY8f90GyHeolXbJecDbnUnNAwNPtr0aNPyCrFKeWRmYvoTPEzsAzqK3+wXGsB+x2INYOfRsAle6hkLiss20/2jE/gA/BMsvLupbFyxgiEerHHNzpiIclsqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775436227; c=relaxed/simple; bh=CeQxJTRyASM8n3QBq6o+cGGqtj1rAK9+pwtoM6yq4sI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LFoJK0bu6rkBCOoEN7itQFtx+poV9UAQSMzhvUY1SZzfblx3dld3f7Jw2F4nEbdNpdS/IIWw6kvKs8y2VPjcKPr9IFHg/Mf8bJgTSr9/Q+v/SYBEKFpBgKAcAH6bU3Fz/7oiM1FSw7FleIGUctmrVXvGfnvNDwSuPX1zPnteq+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20251104.gappssmtp.com header.i=@layalina-io.20251104.gappssmtp.com header.b=mAn50e1+; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20251104.gappssmtp.com header.i=@layalina-io.20251104.gappssmtp.com header.b="mAn50e1+" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-488a4bc360bso6866875e9.0 for ; Sun, 05 Apr 2026 17:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20251104.gappssmtp.com; s=20251104; t=1775436224; x=1776041024; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7IRoUUifg2T6Dk4d+0hkO4G1TD4jhU2SCyQ5SdNu0Pg=; b=mAn50e1+9aUtFlmMh9sWP0bLlxh+xUfOvRWnCDsZcIrVsU3uq5CRW5BCH7BUQ8KkjD V+YEbAfOLbASBKLD0hErHzrsgQ0/0YRx6DrbcMflIR6jhQcLxT30Iim1UN3KbO6p5Bd5 jW+W5UFB+Z10b9uxzd2c41GxHyACp7DN1jhiGQ0DTugsMZ/H+6dyChEfYR07y5yLW4Gb tqNZ+kQQgFCqZpnJr9UjXg6wjuNTNUCiLWPMQwDV2Z0qb8IG8sZLtnG3QZcMP7mvgvRH 5a9vvnV4T2VbekxBHBJ4nx28iTYXdTYwgtGDEBijvicmF+XvEJZ15a20PZ99Pa46gqxT C83A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775436224; x=1776041024; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7IRoUUifg2T6Dk4d+0hkO4G1TD4jhU2SCyQ5SdNu0Pg=; b=SXzaB8Xg9FLwO7GM112g+4HpHegYwzmbQnh9KtfHdAD9x/qziAgS5+yqdS/suu8vAA GXP7p86Upu/o/jb+MWidcCn7Nb7V2etsffBatZhZV7oSPMhYRU6SvBKUogwy8lss/K6m SM78kMGpdl0tkiiPirW48ihM/h02mI8U3wc0SGsOxqRhP3+nvbEhdlvOEdZU7j0S58Jr Qh01aRpu1pXLP1QmrvazLb7o/le+VZs4mv3pDVfp3j7pwfDvfH9oKZ8MFDvY2NIcx/0W D7et4KtGvnTHW5ftFKWbVokAJjPs82V24ICWmVVs/CiJACgmQTpm9w5p/d9YH5/lEV8E r6Lw== X-Forwarded-Encrypted: i=1; AJvYcCWq38D2mMCcXzlTVIaEM5IZNG2clKlhzjCX3WvvZMfCLnXcksyJh4Y7UBURTd366r8mQRbRfoLnJce7AL8=@vger.kernel.org X-Gm-Message-State: AOJu0Yyxrqpd1QAzoPyWAHvcbM3Uvq6gkJR+PkBz82qFAi0MoYV4UZVc 5fA44haYUy8lOng2QERrm/QQZwn3OXGxsumSN1336VqFK2xwwyCRjsOEcMhdqG492bU= X-Gm-Gg: AeBDieslD8jOeZYIHFh4w9s9onuSn4dYCIJ9A+sBBQoNp1RMGdovbKlCJh6S9Aygi/m gL4MlY5OpIDj3QRvJWgiipgLmeQonMXcyLDeYMrL5YyPO1IiAGCXzf2JBagH4ecPZ3Nv3Y7GerE X5o0t6zKoHzcbxE53M4OVI3pmWfj3sK2UEJa+llqHwSi368oftgNlqXDA6fv/mGgHbUxMfBH48c +9yPKwr/OIlYku6BAeudq1ejXYNxaIYrWHfVXexS36E1l3lSgHJ8opoGMs8Ytq1E5yU6zDITIvH XyWyGuS8DHIesAz8olzF7GOP3PorbiMB8KRDqFxi6oXIBgRcDhrc5Mi7LgKFpphO0gHe++XEuhr 5fyCCOtxU7d2h5RlItP5NprpwPA/a9TebMYEfAmnf3UNeQisJWxqnV/PxAW9eaS+hH4hq2rR/ET 2RxFuMih3YcHpDagHI5w== X-Received: by 2002:a05:600c:358b:b0:485:4135:5c92 with SMTP id 5b1f17b1804b1-488995cb858mr195784965e9.0.1775436223503; Sun, 05 Apr 2026 17:43:43 -0700 (PDT) Received: from airbuntu ([149.50.209.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e93cf2dsm417072135e9.11.2026.04.05.17.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Apr 2026 17:43:42 -0700 (PDT) Date: Mon, 6 Apr 2026 01:43:39 +0100 From: Qais Yousef To: Peter Zijlstra Cc: Salvatore Dipietro , 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: <20260406004339.a6fssp46e2ap6li4@airbuntu> 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=utf-8 Content-Disposition: inline In-Reply-To: <20260403213207.GF2872@noisy.programming.kicks-ass.net> On 04/03/26 23:32, Peter Zijlstra wrote: > 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: Or perhaps use a longer base_slice_ns in debugfs? I think we end up just short of 4ms in most systems now. 5 or 6 ms might help re-hide it. > > 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).