summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-08-10ASoC: zl38060: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-25-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: wm2000: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-24-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: wm0010: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-23-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: tlv320aic31xx: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Shenghao Ding <shenghao-ding@ti.com> Cc: Kevin Lu <kevin-lu@ti.com> Cc: Baojun Xu <baojun.xu@ti.com> Cc: Sen Wang <sen@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-22-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: tas5805m: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-21-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: tas2781: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Shenghao Ding <shenghao-ding@ti.com> Cc: Kevin Lu <kevin-lu@ti.com> Cc: Baojun Xu <baojun.xu@ti.com> Cc: Sen Wang <sen@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-20-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: sma1307: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Kiseok Jo <kiseok.jo@irondevice.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-19-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: sigmadsp: se auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Nuno Sá <nuno.sa@analog.com> Acked-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-18-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: rt722-sdca: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup, as well as the firmware file name being released with __free(kfree). Only the code refactoring, no functional changes. Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-17-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: rt5677: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-16-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: rt5575: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-15-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: rt1320-sdw: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-14-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: peb2466: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Reviewed-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-13-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: pcm6240: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Since the firmware release is cleaned up automatically, we can convert the mutex call with guard() gracefully, too. Only the code refactoring, no functional changes. Reviewed-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-12-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: ntpfw: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-11-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: max98390: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-10-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: hdac_hda: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-9-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: fs-amp-lib: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Nick Li <nick.li@foursemi.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-8-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw88399: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-7-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw88395: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw88261: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-5-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw88166: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw88081: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: aw87390: Use auto-cleanup for firmware loadingTakashi Iwai
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10ASoC: qcom: sc8280xp: configure codec sysclk for QCS615Le Qi
Continuous high-amplitude noise could occur in the DA7213 microphone capture path after a Bluetooth out-of-range/reset event followed by reconnection. The noise was present in both the raw ALSA capture and PipeWire input, confirming that it originated before Bluetooth encoding. The codec already obtains and enables MCLK through its DT clock and bias-level handling. However, the machine driver did not explicitly configure the codec sysclk during hw_params(). Enable codec_sysclk_set for QCS615 so that the DA7213 clock source and rate are configured before the codec power-up sequence. Verified on QCS615 Talos with repeated Bluetooth disconnect and reconnect cycles. The noise was no longer reproducible. Signed-off-by: Le Qi <le.qi@oss.qualcomm.com> Link: https://patch.msgid.link/20260810031032.2001053-1-le.qi@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10random: vDSO: Drop custom PAGE_SIZE definitionsThomas Weißschuh
These custom definitions where added in commit 7f053812dab3 ("random: vDSO: minimize and simplify header includes") to avoid pulling in non-vDSO-safe headers from linux/page.h. vdso/page.h provides these definitions for the vDSO now. Use that instead. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724-vdso-random-page-size-v1-1-e69283d36b2f@linutronix.de
2026-08-10LoongArch: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdefferyThomas Weißschuh
Now that there is a definition of VDSO_CLOCKMODE_CPU even if no vDSO is built, the ugly ifdeffery can be removed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-7-ddbe447be860@linutronix.de
2026-08-10clocksource/drivers/timer-riscv: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdefferyThomas Weißschuh
Now that there is a definition of VDSO_CLOCKMODE_ARCHTIMER even if no vDSO is built, the ugly ifdeffery can be removed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-6-ddbe447be860@linutronix.de
2026-08-10clocksource/drivers/arm_arch_timer: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdefferyThomas Weißschuh
Now that there is a definition of VDSO_CLOCKMODE_ARCHTIMER even if no vDSO is built, the ugly ifdeffery can be removed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-5-ddbe447be860@linutronix.de
2026-08-10clocksource/drivers/mips-gic-timer: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdefferyThomas Weißschuh
Now that there is a definition of VDSO_CLOCKMODE_GIC even if no vDSO is built, the ugly ifdeffery can be removed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-4-ddbe447be860@linutronix.de
2026-08-10MIPS: csrc-r4k: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdefferyThomas Weißschuh
Now that there is a definition of VDSO_CLOCKMODE_R4K even if no vDSO is built, the ugly ifdeffery can be removed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-3-ddbe447be860@linutronix.de
2026-08-10vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAYThomas Weißschuh
Some code, for example clocksource drivers, may want to use the vDSO clockmode constants even when CONFIG_GENERIC_GETTIMEOFDAY=n. But the symbols are completely hidden in that case, making ugly ifdeffery necessary. Always provide the enum definitions. As not all architectures provide asm/vdso/clocksource.h, provide an empty stub in asm-generic for it. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-2-ddbe447be860@linutronix.de
2026-08-10kbuild: Support generated asm-headers in subdirectoriesThomas Weißschuh
Extend the asm-header stub generation to also handle subdirectories. An upcoming vdso/ header refactoring requires this. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-1-ddbe447be860@linutronix.de
2026-08-10mtd: rawnand: sunxi: fix H6/H616 controller timingsJames Hilliard
The NAND timing calculation assumes that command and address setup and hold intervals T1-T4, T7 and T11 each take one controller clock. It also uses the original A10 delay encodings for tWB, tADL, tWHR and tRHW. The H6/H616 NDFC defines the setup and hold intervals as two internal clock cycles and uses different delay encodings. Add the H616 timing characteristics and select them through the controller capability data so the clock solver and timing fields match the hardware. Fixes: 88fd4e4deae8 ("mtd: rawnand: sunxi: Add support for H616 nand controller") Cc: stable@vger.kernel.org Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2026-08-10mtd: rawnand: sunxi: describe tADL and tWHR delaysJames Hilliard
The tADL and tWHR timing fields use four encoded delays, but the driver currently derives their values with a shift. This hides the actual controller timing characteristics and lets the clock solver select a 32-cycle delay that the fields cannot encode. Describe the legacy 7, 15, 23 and 31 cycle thresholds explicitly and use the tables for both clock selection and field lookup. This prepares the driver for controllers with different encodings. Fixes: 88fd4e4deae8 ("mtd: rawnand: sunxi: Add support for H616 nand controller") Cc: stable@vger.kernel.org Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2026-08-10mtd: rawnand: sunxi: group controller delay tablesJames Hilliard
The tWB and tRHW timing field encodings are controller properties, but they currently live in standalone lookup tables. Group them in a timing descriptor selected through the controller capability data. Point every existing controller at the legacy values so this is a pure preparation change. Fixes: 88fd4e4deae8 ("mtd: rawnand: sunxi: Add support for H616 nand controller") Cc: stable@vger.kernel.org Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2026-08-10pmdomain: Merge branch fixes into nextUlf Hansson
Merge the pmdomain fixes for v7.2-rc[n] into the next branch, to allow them to get tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-08-10x86/CPU: Add a tlbi= cmdline switchRik van Riel
With the recently found INVLPGB / TLBSYNC issue, there has been some interest in disabling INVLPGB-based TLB flushing, in order to rule out that CPU issue as a cause of userspace crashes. Add a kernel command line option to control the TLB flushing behavior. If the need arises, we will add a "tlbi=broadcast" for the case when TLB invalidation broadcasts need to be explicitly selected, but this is not needed now yet. [ bp: Rewrite commit message, move to cpu/common.c, add documentation. ] Fixes: 767ae437a32d ("x86/mm: Add INVLPGB feature and Kconfig entry") Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org> Link: https://patch.msgid.link/20260729204341.3eb0b5ea@fangorn
2026-08-10pmdomain: Merge branch dt into nextUlf Hansson
Merge the immutable branch dt into next, to allow the updated DT bindings to be tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-08-10dt-bindings: power: Document Renesas R-Car X5H Module ControllerGeert Uytterhoeven
Document support for Renesas R-Car X5H Module Controllers, and add binding definitions for power domains not backed by registers. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-08-10pmdomain: arm: Fix -EINVAL from scmi_pd_set_perf_state() on state 0Praveen Talari
Currently, scmi_pd_set_perf_state() treats a performance state of 0 as invalid and returns -EINVAL. As a result, devices attached to SCMI performance domains can report failures when relinquishing their performance vote. The OPP framework use performance state 0 to indicate that no performance vote is required. For example, dev_pm_opp_set_rate(dev, 0) is commonly used (by firmware or linux) when a device is runtime suspended. A zero performance state does not require any SCMI performance request to be sent. Treat it as a no-op and return success instead of reporting an error. Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-08-10nfsd: export NFSv4 callback op stats via netlinkJeff Layton
Add a proc4cb-ops nested attribute to the server-stats netlink dump, reusing the existing server-proc-entry (op/count) layout. The dump gains a callback section that emits one entry per callback opcode (OP_CB_GETATTR..OP_CB_OFFLOAD) from the per-netns callback counters, paged across messages like the other per-operation sections. This lets nfsstat report NFSv4 backchannel operation counts over netlink, including CB_GETATTR which corresponds to the procfs wdeleg_getattr line. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-6-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10nfsd: count NFSv4 callback operations per netnsJeff Layton
The NFS server tracks per-operation call counts for the forward channel (proc4ops) but keeps no statistics for the NFSv4 backchannel (callback) operations it sends to clients. Add a per-netns array of percpu counters for callback operations, indexed by RFC 8881 callback opcode (OP_CB_GETATTR..OP_CB_OFFLOAD), and bump the relevant counter in nfsd4_run_cb(), which is hit exactly once per callback that is actually queued. CB_GETATTR is sent when a GETATTR conflicts with an outstanding write delegation, which is roughly what the dedicated wdeleg_getattr counter tracked. The two are not identical: the old counter incremented on every such conflict, whereas the CB_GETATTR counter only counts callbacks that are actually queued, so concurrent conflicts that coalesce onto an already in-flight CB_GETATTR are now counted once rather than once per conflict. Report the procfs "wdeleg_getattr" line from the CB_GETATTR counter and drop the now-redundant NFSD_STATS_WDELEG_GETATTR counter, its helper, and its increment site. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-5-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10sunrpc: remove unused svc_version vs_count fieldJeff Layton
Now that svc_seq_show() and the nfsd netlink stats handler both use the per-netns svc_stat vs_count arrays, the global per-version vs_count percpu counters are no longer read by anything. Remove the vs_count field from struct svc_version and all the associated DEFINE_PER_CPU_ALIGNED arrays and initializers across nfsd, lockd, and the NFS client callback service. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-4-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10nfsd: implement server-stats-get netlink handlerJeff Layton
Implement nfsd_nl_server_stats_get_dumpit() which exposes the NFS server statistics currently available via /proc/net/rpc/nfsd through the nfsd generic netlink family. The handler uses a dump operation to stream statistics across one or more netlink messages. The reply is divided into sections that are emitted in order: - scalar stats (reply cache, filehandle, IO, network, RPC), emitted once in the first message, then - per-version procedure counts (proc2/3/4-ops) and the NFSv4 per-operation counts (proc4ops-ops), using the per-netns vs_count arrays. cb->args[0] tracks the current section and cb->args[1] the entry index within it, so a section that does not fit in the current message is closed and resumed in the next one. This matters because the first dump message is allocated at NLMSG_GOODSIZE (a single page on most architectures) regardless of the client's receive buffer; packing every counter into one message would overflow it and fail the dump with -EMSGSIZE. Userspace merges the attributes from every message. This allows nfsstat to retrieve server statistics via netlink with a procfs fallback for older kernels. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-3-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10sunrpc: use per-net counts in svc_seq_show()Jeff Layton
Update svc_seq_show() to read from the per-netns statp->vs_count[] arrays instead of the global svc_version->vs_count[]. The only caller is nfsd, which always allocates vs_count via svc_stat_alloc_counts() in nfsd_net_init(), so the per-netns arrays are always available. This makes /proc/net/rpc/nfsd report per-network-namespace procedure call counts. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-2-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10sunrpc: add per-netns per-procedure call counts to svc_statJeff Layton
The existing per-procedure call counts live in global svc_version->vs_count[] arrays which are not network-namespace-aware. Add per-netns equivalents in struct svc_stat so the upcoming netlink stats interface can return namespace-scoped statistics. Add a vs_count pointer array to struct svc_stat, along with svc_stat_alloc_counts() and svc_stat_free_counts() helpers to manage per-version percpu call count arrays. Increment the per-net counter alongside the global one in svc_generic_init_request(). Call the alloc/free helpers from nfsd_net_init() and nfsd_net_exit(). Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260717-exportd-netlink-v7-1-b7ce17b83b60@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10NFSD: Document reply_cache_stats ABIChuck Lever
/proc/fs/nfsd/reply_cache_stats has been present since v3.10 but has no entry in Documentation/ABI/. Add one under testing/ that documents the current field set, types, and parsing expectations. This establishes a contract that parsers should match on field name rather than line position, allowing fields to be added or removed across kernel versions without breaking well-written consumers. Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260717001232.438792-6-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10NFSD: Eliminate percpu counter contention in IO byte accountingChuck Lever
nfsd_stats_io_write_add() and nfsd_stats_io_read_add() accumulate byte counts in per-net-namespace and per-export percpu_counters using percpu_counter_add(), which applies the default batch threshold of max(32, 2*nr_cpus). For a 4 KB NFS WRITE, the amount (4096) always exceeds this threshold, so percpu_counter_add_batch() acquires the counter's global spinlock on every update. Each WRITE RPC updates two counters (per-net and per-export), producing two global lock acquisitions per operation. Profiling on a 10-CPU RDMA NFS server shows 0.44% of total CPU cycles spent contending on these locks during a small random write workload. Switch to percpu_counter_add_local(), which batches with INT_MAX so that updates always remain on the per-CPU fast path regardless of the amount. All readers of these counters already use percpu_counter_sum_positive(), which sums the per-CPU deltas under the global lock, so read accuracy is unaffected. Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260717001232.438792-5-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10NFSD: Eliminate percpu counter contention in reply cache statisticsChuck Lever
Each RPC passes through nfsd_cache_lookup(), which increments one of nfsd_stats_rc_hits_inc(), nfsd_stats_rc_misses_inc(), or nfsd_stats_rc_nocache_inc(). These helpers update per-net-namespace percpu_counters with percpu_counter_inc(), which applies the default batch threshold of max(32, 2*nr_cpus). Once a CPU's local delta reaches that threshold, the update folds into the shared counter under its global spinlock. On a busy multi-CPU server this produces lock traffic on a counter cacheline shared across all CPUs, growing with the request rate. Switch to percpu_counter_add_local(fbc, 1), which batches with INT_MAX so that increments always remain on the per-CPU fast path. This matches the treatment already applied to the IO byte and DRC memory counters. All readers of these counters use percpu_counter_sum_positive(), which sums the per-CPU deltas under the global lock, so read accuracy is unaffected. Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neil@brown.name> Link: https://patch.msgid.link/20260717001232.438792-4-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>