From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 038392798ED for ; Tue, 16 Dec 2025 06:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765867284; cv=none; b=qaKbOJ8PkSavHhMEj3t/QBepWeYKwjKBQzmO3W43A9kzA4nF6Ni380LbqAVwbyT20VlHiVLvQ46H0bQ1mL1k9VROqVdAGmxcYJk8vy0qUWef9Yl/YifkCz9POmLcsL2gf5mmxeuE0Yhxd182hZ3jHPr+w9lquRo7O/0Gs1gWCkg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765867284; c=relaxed/simple; bh=4PEhX1VIcmn3P31EDve5NEQok3bWDI+LGvNj9DOUf2g=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=J3IT7Ox390ljI4cVMsJkhFuhyeyHALUzaHGmx+8FUwp/wIYjONXdNXd0cFhUeKl4q5NFH2F9jbpqNw7I7Ev9PsXl0a2XXrbb9OqHfR/Md1uucX58fuYkdfpnVGV1rD4kqPF962QDeKBjv7JdM28KMpluu4D305FCXkUfyYpCvuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FYpVz4RE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FYpVz4RE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4434C113D0; Tue, 16 Dec 2025 06:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765867283; bh=4PEhX1VIcmn3P31EDve5NEQok3bWDI+LGvNj9DOUf2g=; h=Date:Subject:To:References:From:In-Reply-To:From; b=FYpVz4RESVNAw2Kklw7cWUVlEwEie41YHnsmem7aqDR7zR9e2sbrEkwbwlNFuVXFA ebvf75JVQm+ZhZwwJ0nFRL1dYMbaWVialKcRyAv/zh56uLgz9DY7DqkN7cdcYaIPX/ 3x/13ltZeFK4TcumU3IRZJJdd+5Njw3SaXwAoCWqF2w6us3e2GMmJl/vdq5UVZoIqc HAbVH/wnjexjqmn4r8v/TtmNg9cHpblyEb2lsR6dI4bJ+CfrXA1s9W9olONQEwAzP3 t8DST/oLWQfOd+bdFYNIXMDgrPYYFEyoIWB7XrCEFfxspdHslP1HGHjM+VSqVBMLcH STi3Hh5OKS0vg== Message-ID: <065e3421-0ae1-4e1b-8384-2157d2c1daf9@kernel.org> Date: Tue, 16 Dec 2025 07:41:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 8/8] powerpc: Enable Generic Entry/Exit for syscalls. To: Mukesh Kumar Chaurasiya , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, oleg@redhat.com, kees@kernel.org, luto@amacapital.net, wad@chromium.org, mchauras@linux.ibm.com, thuth@redhat.com, sshegde@linux.ibm.com, charlie@rivosinc.com, macro@orcam.me.uk, akpm@linux-foundation.org, ldv@strace.io, deller@gmx.de, ankur.a.arora@oracle.com, segher@kernel.crashing.org, tglx@linutronix.de, thomas.weissschuh@linutronix.de, peterz@infradead.org, menglong8.dong@gmail.com, bigeasy@linutronix.de, namcao@linutronix.de, kan.liang@linux.intel.com, mingo@kernel.org, atrajeev@linux.vnet.ibm.com, mark.barnett@arm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20251214130245.43664-1-mkchauras@linux.ibm.com> <20251214130245.43664-9-mkchauras@linux.ibm.com> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20251214130245.43664-9-mkchauras@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 14/12/2025 à 14:02, Mukesh Kumar Chaurasiya a écrit : > From: Mukesh Kumar Chaurasiya > > Convert the PowerPC syscall entry and exit paths to use the generic > entry/exit framework by selecting GENERIC_ENTRY and integrating with > the common syscall handling routines. > > This change transitions PowerPC away from its custom syscall entry and > exit code to use the generic helpers such as: > - syscall_enter_from_user_mode() > - syscall_exit_to_user_mode() > > As part of this migration: > - The architecture now selects GENERIC_ENTRY in Kconfig. > - Old tracing, seccomp, and audit handling in ptrace.c is removed in > favor of generic entry infrastructure. > - interrupt.c and syscall.c are simplified to delegate context > management and user exit handling to the generic entry path. > - The new pt_regs field `exit_flags` introduced earlier is now used > to carry per-syscall exit state flags (e.g. _TIF_RESTOREALL). > > This aligns PowerPC with the common entry code used by other > architectures and reduces duplicated logic around syscall tracing, > context tracking, and signal handling. > > The performance benchmarks from perf bench basic syscall are below: > > perf bench syscall usec/op > > | Test | With Patch | Without Patch | % Change | > | --------------- | ---------- | ------------- | -------- | > | getppid usec/op | 0.207795 | 0.210373 | -1.22% | > | getpgid usec/op | 0.206282 | 0.211676 | -2.55% | > | fork usec/op | 833.986 | 814.809 | +2.35% | > | execve usec/op | 360.939 | 365.168 | -1.16% | > > perf bench syscall ops/sec > > | Test | With Patch | Without Patch | % Change | > | --------------- | ---------- | ------------- | -------- | > | getppid ops/sec | 48,12,433 | 47,53,459 | +1.24% | > | getpgid ops/sec | 48,47,744 | 47,24,192 | +2.61% | > | fork ops/sec | 1,199 | 1,227 | -2.28% | > | execve ops/sec | 2,770 | 2,738 | +1.16% | I get about 2% degradation on powerpc 8xx, and it is quite stable over time when repeating the test. 'perf bench syscall all' on powerpc 8xx (usec per op): | Test | With Patch | Without Patch | % Change | | --------------- | ---------- | ------------- | -------- | | getppid usec/op | 2.63 | 2.63 | ~ 0% | | getpgid usec/op | 2.26 | 2.22 | +2,80% | | fork usec/op | 15300 | 15000 | +2,00% | | execve usec/op | 45700 | 45200 | +1.10% | Christophe