From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,richard@nod.at,johannes@sipsolutions.net,
hch@lst.de,anton.ivanov@cambridgegreys.com,ebiggers@kernel.org,
akpm@linux-foundation.org
Subject: + um-define-kernel_fpu_begin_mask.patch added to mm-nonmm-unstable branch
Date: Thu, 12 Nov 2026 18:41:12 -0800 [thread overview]
Message-ID: <20261113024113.630971F000C4@smtp.kernel.org> (raw)
The patch titled
Subject: um: define kernel_fpu_begin_mask()
has been added to the -mm mm-nonmm-unstable branch. Its filename is
um-define-kernel_fpu_begin_mask.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/um-define-kernel_fpu_begin_mask.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Eric Biggers <ebiggers@kernel.org>
Subject: um: define kernel_fpu_begin_mask()
Date: Wed, 11 Nov 2026 12:56:02 -0800
Patch series "lib/raid: opt out of initializing MXCSR and 387 state".
This series slightly reduces the overhead of the x86 kernel-mode "FPU"
sections in the RAID code by using kernel_fpu_begin_mask(0) instead of
kernel_fpu_begin(), thus opting out of the 'ldmxcsr' (and on 32-bit
kernels, also 'fninit'). MXCSR is irrelevant for integer code.
This mirrors similar optimizations for the crypto and CRC code
(https://lore.kernel.org/linux-crypto/20261105005523.84925-1-ebiggers@kernel.org/).
It's more important there than in the RAID code, since short lengths are
common in the x86-optimized crypto and CRC functions. However, I think
it's worth updating the RAID code too for consistency.
Unlike the crypto and CRC code, the RAID code is built for user-mode
Linux. Therefore, as a prerequisite for this change, patch 1 also
defines a stub for kernel_fpu_begin_mask() on user-mode Linux.
This patch (of 3):
Define a stub for kernel_fpu_begin_mask() on user-mode Linux so that
lib/raid/ can switch from kernel_fpu_begin() to kernel_fpu_begin_mask().
Note: this causes a checkpatch error due to the macro's value not having
outer parentheses, but it's left as-is for consistency with the existing
kernel_fpu_begin() and kernel_fpu_end() definitions right next to it.
Link: https://lore.kernel.org/20261111205604.47547-1-ebiggers@kernel.org
Link: https://lore.kernel.org/20261111205604.47547-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
---
arch/um/include/asm/fpu/api.h | 1 +
1 file changed, 1 insertion(+)
--- a/arch/um/include/asm/fpu/api.h~um-define-kernel_fpu_begin_mask
+++ a/arch/um/include/asm/fpu/api.h
@@ -11,6 +11,7 @@
* UML code tree. */
#define kernel_fpu_begin() (void)0
+#define kernel_fpu_begin_mask(mask) (void)(mask)
#define kernel_fpu_end() (void)0
static inline bool irq_fpu_usable(void)
_
Patches currently in -mm which might be from ebiggers@kernel.org are
xor-remove-obsolete-mmx-optimized-code.patch
raid6-remove-obsolete-mmx-optimized-code.patch
raid6-simplify-cpu-feature-checks.patch
um-define-kernel_fpu_begin_mask.patch
xor-opt-out-of-initializing-mxcsr-and-387-state.patch
raid6-opt-out-of-initializing-mxcsr-and-387-state.patch
reply other threads:[~2026-11-13 2:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113024113.630971F000C4@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=ebiggers@kernel.org \
--cc=hch@lst.de \
--cc=johannes@sipsolutions.net \
--cc=mm-commits@vger.kernel.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.