Linux 6.18.5
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.18.5 kernel.
All users of the 6.18 kernel series must upgrade.
The updated 6.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.18.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - fs/nfs/localio.c | 12 +++---- include/linux/sched/topology.h | 3 + kernel/sched/core.c | 3 + kernel/sched/fair.c | 65 +++++++++++++++++++++++++++++++++-------- kernel/sched/features.h | 5 +++ kernel/sched/sched.h | 7 ++++ kernel/sched/topology.c | 6 +++ net/mptcp/protocol.c | 8 +++-- net/mptcp/protocol.h | 3 + 10 files changed, 91 insertions(+), 23 deletions(-)
Greg Kroah-Hartman (1):
Linux 6.18.5
Mike Snitzer (1):
nfs/localio: fix regression due to out-of-order __put_cred
Paolo Abeni (1):
mptcp: ensure context reset on disconnect()
Peter Zijlstra (3):
sched/fair: Small cleanup to sched_balance_newidle() sched/fair: Small cleanup to update_newidle_cost() sched/fair: Proportional newidle balance
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 18 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Baby Opossum Posse
fs/nfs/localio.c +6 -6
@@ -623,8 +623,6 @@ static void nfs_local_call_read(struct work_struct *work)ssize_t status;int n_iters; - save_cred =override_creds (filp->f_cred); - n_iters =atomic_read (&iocb->n_iters);for (int i =0 ; i < n_iters ; i++) {if (iocb->iter_is_dio_aligned[i]) {
@@ -637,7 +635,10 @@ static void nfs_local_call_read(struct work_struct *work) }else iocb->kiocb.ki_flags &= ~IOCB_DIRECT ; + save_cred =override_creds (filp->f_cred); status = filp->f_op->read_iter (&iocb->kiocb, &iocb->iters[i]); +revert_creds (save_cred); +if (status != -EIOCBQUEUED ) {if (unlikely (status >=0 && status < iocb->iters[i].count)) force_done = true;/* Partial read */
@@ -647,8 +648,6 @@ static void nfs_local_call_read(struct work_struct *work) } } } - -revert_creds (save_cred); } static int
@@ -830,7 +829,6 @@ static void nfs_local_call_write(struct work_struct *work)int n_iters; current->flags |=PF_LOCAL_THROTTLE |PF_MEMALLOC_NOIO ; - save_cred =override_creds (filp->f_cred);file_start_write (filp); n_iters =atomic_read (&iocb->n_iters);
@@ -845,7 +843,10 @@ static void nfs_local_call_write(struct work_struct *work) }else iocb->kiocb.ki_flags &= ~IOCB_DIRECT ; + save_cred =override_creds (filp->f_cred); status = filp->f_op->write_iter (&iocb->kiocb, &iocb->iters[i]); +revert_creds (save_cred); +if (status != -EIOCBQUEUED ) {if (unlikely (status >=0 && status < iocb->iters[i].count)) force_done = true;/* Partial write */
@@ -857,7 +858,6 @@ static void nfs_local_call_write(struct work_struct *work) }file_end_write (filp); -revert_creds (save_cred); current->flags = old_flags; }
include/linux/sched/topology.h +3 -0
@@ -92,6 +92,9 @@ struct sched_domain {unsigned int nr_balance_failed;/* initialise to 0 */ /* idle_balance() stats */ +unsigned int newidle_call; +unsigned int newidle_success; +unsigned int newidle_ratio;u64 max_newidle_lb_cost;unsigned long last_decay_max_lb_cost;
kernel/sched/core.c +3 -0
@@ -121,6 +121,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(sched_update_nr_running_tp);EXPORT_TRACEPOINT_SYMBOL_GPL (sched_compute_energy_tp); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); +DEFINE_PER_CPU(struct rnd_state, sched_rnd_state);#ifdef CONFIG_SCHED_PROXY_EXEC DEFINE_STATIC_KEY_TRUE (__sched_proxy_exec);
@@ -8591,6 +8592,8 @@ void __init sched_init_smp(void) {sched_init_numa (NUMA_NO_NODE ); +prandom_init_once (&sched_rnd_state); +/* * There's no userspace yet to cause hotplug operations; hence all the * CPU masks are stable and all blatant races in the below code cannot
kernel/sched/fair.c +53 -12
114 lines not on this page · raw message
kernel/sched/features.h +5 -0
@@ -121,3 +121,8 @@ SCHED_FEAT(WA_BIAS, true) SCHED_FEAT(UTIL_EST, true)SCHED_FEAT (LATENCY_WARN , false) + +/* +* Do newidle balancing proportional to its success rate using randomization. + */ +SCHED_FEAT (NI_RANDOM , true)
kernel/sched/sched.h +7 -0
@@ -5,6 +5,7 @@#ifndef _KERNEL_SCHED_SCHED_H#define _KERNEL_SCHED_SCHED_H +#include <linux/prandom.h> #include <linux/sched/affinity.h> #include <linux/sched/autogroup.h> #include <linux/sched/cpufreq.h>
@@ -1349,6 +1350,12 @@ static inline bool is_migration_disabled(struct task_struct *p) } DECLARE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); +DECLARE_PER_CPU(struct rnd_state, sched_rnd_state); + +static inline u32 sched_rng (void ) +{ +return prandom_u32_state (this_cpu_ptr (&sched_rnd_state)); +}#define cpu_rq (cpu) (&per_cpu(runqueues, (cpu)))#define this_rq () this_cpu_ptr(&runqueues)
kernel/sched/topology.c +6 -0
@@ -1662,6 +1662,12 @@ sd_init(struct sched_domain_topology_level *tl, .last_balance = jiffies, .balance_interval = sd_weight, + +/* 50% success rate */ + .newidle_call = 512, + .newidle_success = 256, + .newidle_ratio = 512, + .max_newidle_lb_cost = 0, .last_decay_max_lb_cost = jiffies, .child = child,
net/mptcp/protocol.c +5 -3
@@ -2421,10 +2421,10 @@ bool __mptcp_retransmit_pending_data(struct sock *sk)*/ static void __mptcp_subflow_disconnect (struct sock *ssk,struct mptcp_subflow_context *subflow, -unsigned int flags) +bool fastclosing) {if (((1 << ssk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN )) || - subflow->send_fastclose) { + fastclosing) {/* The MPTCP code never wait on the subflow sockets, TCP-level * disconnect should never fail */
@@ -2476,7 +2476,7 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, need_push = (flags &MPTCP_CF_PUSH ) &&__mptcp_retransmit_pending_data (sk);if (!dispose_it) { -__mptcp_subflow_disconnect (ssk, subflow, flags); +__mptcp_subflow_disconnect (ssk, subflow, msk->fastclosing);release_sock (ssk); goto out;
@@ -2789,6 +2789,7 @@ static void mptcp_do_fastclose(struct sock *sk)struct mptcp_sock *msk =mptcp_sk (sk);mptcp_set_state (sk,TCP_CLOSE ); + msk->fastclosing =1 ;/* Explicitly send the fastclose reset as need */ if (__mptcp_check_fallback (msk))
@@ -3299,6 +3300,7 @@ static int mptcp_disconnect(struct sock *sk, int flags) msk->bytes_sent =0 ; msk->bytes_retrans =0 ; msk->rcvspace_init =0 ; + msk->fastclosing =0 ;WRITE_ONCE (sk->sk_shutdown,0 );sk_error_report (sk);
net/mptcp/protocol.h +2 -1
@@ -321,7 +321,8 @@ struct mptcp_sock { fastopening:1, in_accept_queue:1, free_first:1, - rcvspace_init:1; + rcvspace_init:1, + fastclosing:1;u32 notsent_lowat;int keepalive_cnt;int keepalive_idle;