From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (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 432C317085C for ; Mon, 9 Sep 2024 21:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725916530; cv=none; b=f6kANfriwmDm0dngdW79phknldxW0uutGOO8WTVg9Ol46tQacxmJYgQ8gohgrrbu+Fmfl0PIVQPAb25L2WDonJim/j0UwWU0sKIAnD61hyjkXMAgZZ1qaHJF5b0KeWbZVwZJimW6CX56aOepxOdvZx17XDAlKPCM/vG/zfBERww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725916530; c=relaxed/simple; bh=CTMpg23m6EnAzEar4/tnxuxdSKdScELZnFfMCgrFyWg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bfbc7x5HwiBaTgpP+hWK6ni5FLcXoqUO/mVM3ye2vYL/frTWlC6+QFwVY+wD5SeNUx4yFrhRDx7uQhGqtAwk+tq/IpPjAJTOHhf/V/RjLGAaHbrD9DYIswBU9MLDHmO1YjprSVeVDYZ6CLXDYqo6/aXfe2t3Aikb+krcjuMGfds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=Zn0wfo0j; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="Zn0wfo0j" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1725916527; bh=CTMpg23m6EnAzEar4/tnxuxdSKdScELZnFfMCgrFyWg=; h=From:To:Cc:Subject:Date:From; b=Zn0wfo0jDKdficN0LbM3OV5KFiaQIqijSMqRZ20Nmq87zRlrA25DDMm2KmpPVDQxY OjTplyoHO76CfyOouLsN+ZENjJmyMPHOYDSlKCUfolmzy3SxxJ1X2pFij4dKYmrtAl B1St1lZ1cJSkUcj/TIsOdcCRbjkqqzNrioh0fT1JbbEx5K/lphd7l/1AJ3+Jue+9cP iYXZvI3KZXc387v/oMZLKYs2vmztMP7ekkQl7KW4cPKAy/wY84n9IM8GERMR8Yfc/6 /gEAGZ4Xs6oeblWZFmZvNwJJNKaKzvBl+oBU7dXgea4XS7rwI3G9a/fW2Oto09AIkG ZOg2OFrkLHziQ== Received: from thinkos.internal.efficios.com (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4X2fkQ62hwz1Kqk; Mon, 9 Sep 2024 17:15:26 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Valentin Schneider , Mel Gorman , Steven Rostedt , Vincent Guittot , Dietmar Eggemann , Ben Segall , Yury Norov , Rasmus Villemoes Subject: [PATCH v2 0/1] sched: Improve cache locality of RSEQ concurrency IDs Date: Mon, 9 Sep 2024 17:15:05 -0400 Message-Id: <20240909211506.326648-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Intermittent workloads behaving in bursts spaced by more than 100ms on each CPU exhibit bad cache locality and degraded performance compared to purely per-cpu data indexing, because concurrency IDs are allocated over various CPUs and cores, therefore losing cache locality of the associated data. This series addresses this shortcoming. I observed speedups up to 16.7x compared to plain mm_cid indexing in benchmarks. It applies on top of v6.10.6. This deprecates the prior "sched: NUMA-aware per-memory-map concurrency IDs" patch series with a simpler and more general approach. Feedback is welcome! Thanks, Mathieu Cc: Valentin Schneider Cc: Mel Gorman Cc: Steven Rostedt Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Ben Segall Cc: Yury Norov Cc: Rasmus Villemoes Mathieu Desnoyers (1): sched: Improve cache locality of RSEQ concurrency IDs for intermittent workloads fs/exec.c | 2 +- include/linux/mm_types.h | 72 +++++++++++++++++++++++++++++++++++----- kernel/fork.c | 2 +- kernel/sched/core.c | 7 ++-- kernel/sched/sched.h | 47 ++++++++++++++++++-------- 5 files changed, 103 insertions(+), 27 deletions(-) -- 2.39.2