From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 2AF3F3EFFC8 for ; Thu, 28 May 2026 12:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779972653; cv=none; b=NmZEBU7u3EhsymUEuelYCsQiptTboQfKh5suimL9SMxQDAK8EbI7DKE1tYryE10rh10LzpaT0Bb+RHf7XQOfVGBfnywENNTiZLeJmAh2ZliE+f4GUzl8xbXe1oIuPUj1ldHYYgW5muIi33KKzTpFGrRQIfvDdUdPRXoyFadkOYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779972653; c=relaxed/simple; bh=9t7VINNG7sNMvaFcyHE4Kwvuc9V++we7k+AU5609trw=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To; b=DSrp51TkAz9x2dVdU3RWzUxKQZ31CnmidMcLTgtk+9MCZo+HWcNd1wPEwcDVABg1QLO1sz8KbU5VZ4mI86LfrdDboyQjyzndjrlwoJXUM0nj31FLLf5ikTVlWiKozstLVD9oLUJ5npRwG5PC+rs48/weIyVm0qxmG+wdvLJDIe8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MkBimMmQ; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MkBimMmQ" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-490426d72f7so60670165e9.3 for ; Thu, 28 May 2026 05:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779972650; x=1780577450; darn=vger.kernel.org; h=in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=bE2rMT/fbVsMIax+MPZw7Abzb0n2MANsTXnrhLgsZc0=; b=MkBimMmQB0vTpln2gjiGvpxBKFKaFqmqk25xdbPRKAOeo1X3OHAbdAVbujSbdix2BI 4s4Vefz54uT8D9hj1Ok1loMqiVVvo1dxg6YZnMX68wXzLdOnUa3GEWCsmfeC6IV+S/M0 1pB+X3iqx1mLxDMvhNUtuvMy3dqI3tnCuxJvebXQna74KET/TjkhrN+Gg0l79P9q4THq gtZ/YNsbhPR4F3eeVUjMd3TcNwy1fPRGhuvI603cV4YQceHpbeHYrwg9FOSRlBzTRgkB 5WZTAI+qAq+yBvVMrq23QGZYZl9J7xrvoh+aVBlPsYN9At3NgDxMvidKm/ZRibPzUZCG gynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779972650; x=1780577450; h=in-reply-to:subject:cc:to:from:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bE2rMT/fbVsMIax+MPZw7Abzb0n2MANsTXnrhLgsZc0=; b=f9uHpM49rEd7hNped8OKB+QanjeCZImWe2QZIL8Z237qVMnBtCTbOBrGVjqpDwUn6N JKel1E+BOqCur0/0+jTlyJSXm9RWIHN4BSMhmKPIC1K2BDGtiRa2lFtxRkcKpAo2L+tV Yr1Jw1pBiWvbloh060LPCOmU66kPt1Ft66EL4s+GybCqXbKXpLMi0CCdz9savDb8spwR PQZUTiWHhFEaGSR9V5qsa1E3EAhMBN5+CerT9c0YCxJjxr996iUvtMdyt2DIpz3H1P1q wLVhUWLLW8y/ooT9dKY28Rq6piqmTpY3MvjAG6JaW9QWIYhR14SH6LvbhtFGDXjOdhe5 m52g== X-Gm-Message-State: AOJu0Yw1Tr84gRFQb5uwvgy4Ake3FdbjcJMXvVkTb39MsIQFAMN1CZia dtX8twn3qEpD+dmPtUxQip5aLb+Bnql283hhpsheklacEFmnZm+acdcY X-Gm-Gg: Acq92OHe9GskBwl/cy0Xiltcw/nd6ubeMpA4PwEJ4KBBNVjstbOSKvWmkvvYp/KXBxX k9SU4yWDAy6KIWLEbrZsqlLnwWdahvQE/0DiF93p1/w3NkquoUU9EiLM3pv97ItKCZssYn6c8lb rZlX1bYiuFw9Tk6bMFeu4K3cGtVXk47Ul+WamPavulWYNhGvelIPwmp7HGvffrW11wLFEU4t/Qv vamBNdSI7i9HWLZK+DWUCju7O7Zm+BWDLx9swRE3ehFhx/9f1qhDnNWAobFC09PABhu4wfGHCFP h+CSJfeNsNSe0vaUgEplDEdp5eTwSmkQa3HfmO+2N76FLxIMS6FtbYL0Wf+hiMaTC/QmEgWAdLz 2p26egYDlzZRMtfc7//OnA8gzxdXV6/qjGXmrg/e9ffL5DbO4ZKbZMxXlqaBBP0O+fRTGfLhCEs RBY45I3X+AyNVKZXrlgILe6mZlLyKmji2elWjStvGwPGe3Q0XBCeUTpOmo0MRKPZxg950lpcYCo aTIr3LlJi3KHBc/WvW7C95gNQ/+6MwEhK+p07iz6YieWJE3Fjd80kR5ZBwdKOYGHG/W+lp91gW4 39RcBaIE0wz787CvSam2OkeB7ptopID3PxB6wEceojpH5w== X-Received: by 2002:a05:600c:1f87:b0:48a:8905:a500 with SMTP id 5b1f17b1804b1-490424ad9abmr439591955e9.12.1779972650087; Thu, 28 May 2026 05:50:50 -0700 (PDT) Received: from localhost (ip-082-212-034-085.um22.pools.vodafone-ip.de. [82.212.34.85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909298d41bsm38609145e9.11.2026.05.28.05.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 05:50:49 -0700 (PDT) Date: Thu, 28 May 2026 14:50:48 +0200 Message-ID: From: Tom Gebhardt To: Qais Yousef Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Vincent Guittot Subject: Re: [PATCH v2 00/13] sched/fair/schedutil: Better manage system response time In-Reply-To: <20260516030123.o26tbwwqeetvo5ix@airbuntu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi Qais, Thanks for the clarification on sched-analyzer -- I'll look at the perfetto approach for task placement traces. In the meantime, I ran `perf stat` and `perf record -g` across three kernels at OC (2800 MHz) with `ondemand` governor, using the same stress-ng pipe workload (4 workers, 20s). Device: Raspberry Pi 5 (8 GB, C1-stepping, Cortex-A76), Bookworm arm64. perf stat results: Metric 6.6.78 7.0 stock 7.0+ttwu+vincent ------------------ --------- ---------- ---------------- bogo ops/s 2 222 639 1 855 066 2 298 965 IPC 1.72 1.47 1.76 branch-misses 625M 1 270M 1 018M context-switches 15 145 738 22 750 121 18 905 924 cache-miss rate 1.58% 1.74% 1.38% Key observations: 1. IPC drops 14% on 7.0 stock (1.72 -> 1.47). ttwu+vincent recovers it almost completely (1.76, slightly above 6.6). This is a genuine efficiency loss in the scheduler path, not a throughput/clock artifact. 2. Branch mispredictions double on 7.0 stock (+103% vs 6.6). ttwu+vincent reduces them by ~20% vs stock, but +63% above 6.6 remains -- this likely explains the residual ~1% gap after patching. 3. Context switches increase 50% on 7.0 stock. ttwu+vincent brings this down to +25% vs 6.6. perf report (-g) highlights: On 6.6, `finish_task_switch` is barely visible in call graphs. On 7.0 (both stock and patched), it appears prominently at 5-8% of samples, alongside elevated `_raw_spin_unlock_irqrestore` time. This points to genuine overhead in the context switch completion path, not lock contention between worker tasks. Regarding the "weird contention accidentally hidden" concern: I don't see evidence for that. The branch miss explosion and IPC drop on 7.0 stock are consistent with more complex/harder-to-predict scheduler control flow (EEVDF decision tree vs. CFS), not with a workload contention pattern that happens to be masked by task placement changes. ttwu+vincent genuinely reduces branch misses and restores IPC -- it doesn't just move the problem. I'll try to get perfetto traces for the task placement / running vs. runnable time breakdown. Happy to provide the raw perf.data files if useful. Tom