From 624ecd8127e3ede28e6a70c1f4d7815658ff9752 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 17 May 2024 09:19:05 +0800 Subject: [PATCH] kernel-rt:update to 5.10.0-199.0.0.63 --- 0001-apply-preempt-RT-patch.patch | 418 +++++++++--------- ...-modify-openeuler_defconfig-for-rt62.patch | 24 +- kernel-rt.spec | 7 +- 3 files changed, 229 insertions(+), 220 deletions(-) diff --git a/0001-apply-preempt-RT-patch.patch b/0001-apply-preempt-RT-patch.patch index 8288295..19a70db 100644 --- a/0001-apply-preempt-RT-patch.patch +++ b/0001-apply-preempt-RT-patch.patch @@ -1,7 +1,7 @@ -From 20a655d3dfbc2a059d5736beec173306c912d6f2 Mon Sep 17 00:00:00 2001 +From 64abc394122dd07c1eb0bd5c6455c87149133fdc Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Wed, 17 Apr 2024 11:22:21 +0800 -Subject: [PATCH] rtpatch +Date: Thu, 16 May 2024 16:33:21 +0800 +Subject: [PATCH 1/2] zzzy1 --- .../Expedited-Grace-Periods.rst | 4 +- @@ -329,7 +329,7 @@ Subject: [PATCH] rtpatch kernel/locking/mutex-rt.c | 224 ++ kernel/locking/rtmutex-debug.c | 102 - kernel/locking/rtmutex-debug.h | 11 - - kernel/locking/rtmutex.c | 939 +++++++-- + kernel/locking/rtmutex.c | 934 +++++++-- kernel/locking/rtmutex.h | 7 - kernel/locking/rtmutex_common.h | 36 +- kernel/locking/rwlock-rt.c | 334 +++ @@ -357,6 +357,7 @@ Subject: [PATCH] rtpatch kernel/sched/rt.c | 83 +- kernel/sched/sched.h | 72 +- kernel/sched/swait.c | 1 + + kernel/sched/topology.c | 3 +- kernel/signal.c | 105 +- kernel/smp.c | 14 +- kernel/softirq.c | 431 +++- @@ -402,7 +403,7 @@ Subject: [PATCH] rtpatch net/sched/sch_generic.c | 10 + net/sunrpc/svc_xprt.c | 4 +- net/xfrm/xfrm_state.c | 3 +- - 398 files changed, 8961 insertions(+), 4849 deletions(-) + 399 files changed, 8958 insertions(+), 4850 deletions(-) delete mode 100644 arch/alpha/include/asm/kmap_types.h delete mode 100644 arch/arc/include/asm/kmap_types.h delete mode 100644 arch/arm/include/asm/kmap_types.h @@ -664,7 +665,7 @@ index fb3ff76c3..3b2b1479f 100644 read-side critical sections. It also permits spinlocks blocking while in RCU read-side critical diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index f6281e851..197c6270e 100644 +index 5ad5cd51d..7b2a88060 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4403,6 +4403,10 @@ @@ -1557,7 +1558,7 @@ index 187fab227..000000000 - return (void *)vaddr; -} diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index a1eab2b7d..baa66cd12 100644 +index 273a58b74..3a7e5d162 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -78,6 +78,7 @@ config ARM64 @@ -1568,7 +1569,7 @@ index a1eab2b7d..baa66cd12 100644 select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT -@@ -184,6 +185,7 @@ config ARM64 +@@ -186,6 +187,7 @@ config ARM64 select HAVE_PERF_EVENTS select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP @@ -1576,7 +1577,7 @@ index a1eab2b7d..baa66cd12 100644 select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_FUNCTION_ARG_ACCESS_API select HAVE_FUTEX_CMPXCHG if FUTEX -@@ -207,6 +209,7 @@ config ARM64 +@@ -209,6 +211,7 @@ config ARM64 select PCI_DOMAINS_GENERIC if PCI select PCI_ECAM if (ACPI && PCI) select PCI_SYSCALL if PCI @@ -1709,7 +1710,7 @@ index 390d96125..531420502 100644 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ _TIF_SYSCALL_EMU) diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c -index 5f59e24c9..4f522206c 100644 +index c247e1113..a15c83111 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -31,6 +31,7 @@ int main(void) @@ -1818,10 +1819,10 @@ index 7437291ff..d84d24413 100644 local_daif_restore(DAIF_PROCCTX_NOIRQ); diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c -index 718f6060b..98b4249a2 100644 +index 5372a53a6..4f4c1cd0f 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c -@@ -863,7 +863,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) +@@ -966,7 +966,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) * involves poking the GIC, which must be done in a * non-preemptible context. */ @@ -1829,8 +1830,8 @@ index 718f6060b..98b4249a2 100644 + migrate_disable(); kvm_pmu_flush_hwstate(vcpu); - -@@ -887,7 +887,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) + #ifdef CONFIG_CVM_HOST +@@ -994,7 +994,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) kvm_timer_sync_user(vcpu); kvm_vgic_sync_hwstate(vcpu); local_irq_enable(); @@ -1839,15 +1840,15 @@ index 718f6060b..98b4249a2 100644 continue; } -@@ -966,7 +966,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) - /* Exit types that need handling before we can be preempted */ - handle_exit_early(vcpu, ret); - +@@ -1082,7 +1082,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) + #ifdef CONFIG_CVM_HOST + } + #endif - preempt_enable(); + migrate_enable(); - - /* - * The ARMv8 architecture doesn't give the hypervisor + #ifdef CONFIG_CVM_HOST + if (pmu_stopped) + arm_pmu_set_phys_irq(true); diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 7bf0a617e..c9f2533cc 100644 --- a/arch/csky/Kconfig @@ -3190,7 +3191,7 @@ diff --git a/arch/powerpc/kernel/syscall_64.c b/arch/powerpc/kernel/syscall_64.c index 310bcd768..ae3212dcf 100644 --- a/arch/powerpc/kernel/syscall_64.c +++ b/arch/powerpc/kernel/syscall_64.c -@@ -193,7 +193,7 @@ again: +@@ -193,7 +193,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3, ti_flags = READ_ONCE(*ti_flagsp); while (unlikely(ti_flags & (_TIF_USER_WORK_MASK & ~_TIF_RESTORE_TM))) { local_irq_enable(); @@ -3199,7 +3200,7 @@ index 310bcd768..ae3212dcf 100644 schedule(); } else { /* -@@ -277,7 +277,7 @@ again: +@@ -277,7 +277,7 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs, unsigned ti_flags = READ_ONCE(*ti_flagsp); while (unlikely(ti_flags & (_TIF_USER_WORK_MASK & ~_TIF_RESTORE_TM))) { local_irq_enable(); /* returning to user: may enable */ @@ -4991,7 +4992,7 @@ index 33ee47670..5fcac46aa 100644 } -arch_initcall(kdump_buf_page_init); diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c -index 114e87e8d..3935532b1 100644 +index 49a56bac0..0ae1b836a 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -82,6 +82,18 @@ bool irq_fpu_usable(void) @@ -5048,10 +5049,10 @@ index 440eed558..7cfc4e6b7 100644 } +#endif diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index 12022548b..2c7338acf 100644 +index 6c78e7987..452ac8e76 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -8392,6 +8392,14 @@ int kvm_arch_init(void *opaque) +@@ -8394,6 +8394,14 @@ int kvm_arch_init(void *opaque) goto out; } @@ -5140,7 +5141,7 @@ diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 7c055259d..da31c2635 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c -@@ -394,19 +394,6 @@ repeat: +@@ -394,19 +394,6 @@ kernel_physical_mapping_init(unsigned long start, return last_map_addr; } @@ -7135,7 +7136,7 @@ diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 30afcbbe1..4ae5b8152 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c -@@ -1452,11 +1452,11 @@ err2: +@@ -1452,11 +1452,11 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) { struct fcoe_percpu_s *fps; @@ -7668,10 +7669,10 @@ index 8b49ac485..947737d0e 100644 uart_parse_options(options, &baud, &parity, &bits, &flow); else if (probe) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index c9876040c..43ade1432 100644 +index 638255a0e..7b61bd709 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2280,18 +2280,24 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2276,18 +2276,24 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) { struct uart_amba_port *uap = amba_ports[co->index]; unsigned int old_cr = 0, new_cr; @@ -7700,7 +7701,7 @@ index c9876040c..43ade1432 100644 /* * First save the CR then disable the interrupts -@@ -2317,8 +2323,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2313,8 +2319,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) pl011_write(old_cr, uap, REG_CR); if (locked) @@ -7772,7 +7773,7 @@ index dae9a57d7..9a6a0ec4d 100644 _enter("%p{%pd},%llx", dentry, dentry, vnode->fid.vnode); diff --git a/fs/aio.c b/fs/aio.c -index b2396cd4a..a8e678d29 100644 +index 00641a1ad..3bbe5e65d 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -43,7 +43,6 @@ @@ -7783,7 +7784,7 @@ index b2396cd4a..a8e678d29 100644 #include #include -@@ -1766,7 +1765,7 @@ static int aio_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, +@@ -1777,7 +1776,7 @@ static int aio_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, list_del_init(&req->wait.entry); list_del(&iocb->ki_list); iocb->ki_res.res = mangle_poll(mask); @@ -7886,7 +7887,7 @@ index cc5ba31d9..9e9b2cf26 100644 r_seq = read_seqbegin(&rename_lock); dentry = __d_lookup_rcu(parent, name, &d_seq); if (unlikely(dentry)) { -@@ -2667,7 +2672,7 @@ retry: +@@ -2667,7 +2672,7 @@ struct dentry *d_alloc_parallel(struct dentry *parent, } hlist_bl_lock(b); @@ -8045,7 +8046,7 @@ index 14e99ffa5..eb899feaf 100644 if (!o->nodeid) { /* diff --git a/fs/inode.c b/fs/inode.c -index fd1b9fddf..0d4adddba 100644 +index bec790bde..8528c6e32 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -158,7 +158,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) @@ -8188,7 +8189,7 @@ index 4e0054a37..2cb62db96 100644 if (IS_ERR(child)) goto end_instantiate; diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c -index b7629943b..d69b06862 100644 +index 1b9bc52ba..54f690765 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -684,7 +684,7 @@ static bool proc_sys_fill_cache(struct file *file, @@ -8528,10 +8529,10 @@ index c1bd4883e..842d223df 100644 static inline void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt) diff --git a/include/linux/fs.h b/include/linux/fs.h -index f66f51edd..441742081 100644 +index 382a0d4dd..a203b3347 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -724,7 +724,7 @@ struct inode { +@@ -726,7 +726,7 @@ struct inode { struct block_device *i_bdev; struct cdev *i_cdev; char *i_link; @@ -9732,7 +9733,7 @@ index 3f02b8186..1b8ae0349 100644 + +#endif diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 940b19d4a..f4f782e98 100644 +index d1c5946ad..f8099b6c1 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -13,6 +13,7 @@ @@ -11275,7 +11276,7 @@ index 3038a0610..fff1656c6 100644 /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ static inline int valid_signal(unsigned long sig) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 766f7ca57..93a7cef9b 100644 +index ce3dfed6b..e1efd8598 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -299,6 +299,7 @@ struct sk_buff_head { @@ -11286,7 +11287,7 @@ index 766f7ca57..93a7cef9b 100644 }; struct sk_buff; -@@ -1930,6 +1931,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list) +@@ -1931,6 +1932,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list) __skb_queue_head_init(list); } @@ -12276,7 +12277,7 @@ index 9144e0f09..464d14b2a 100644 spinlock_t xfrm_policy_lock; diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h -index fad29c996..88751eaa2 100644 +index efacdfee3..02871f48c 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -10,6 +10,7 @@ @@ -12308,7 +12309,7 @@ index fad29c996..88751eaa2 100644 } static inline bool qdisc_is_percpu_stats(const struct Qdisc *q) -@@ -187,17 +192,35 @@ nolock_empty: +@@ -187,17 +192,35 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) } else if (qdisc_is_running(qdisc)) { return false; } @@ -12460,7 +12461,7 @@ index e62a62303..b95f8784c 100644 This option turns the kernel into a real-time kernel by replacing various locking primitives (spinlocks, rwlocks, etc.) with diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c -index 94c166d2c..c7c03ceae 100644 +index 038efca71..dc4b7da03 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -380,7 +380,7 @@ void cpuset_unlock(void) @@ -12484,7 +12485,7 @@ index 94c166d2c..c7c03ceae 100644 return 0; } -@@ -1424,7 +1424,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, +@@ -1431,7 +1431,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, * Newly added CPUs will be removed from effective_cpus and * newly deleted ones will be added back to effective_cpus. */ @@ -12493,7 +12494,7 @@ index 94c166d2c..c7c03ceae 100644 if (adding) { cpumask_or(parent->subparts_cpus, parent->subparts_cpus, tmp->addmask); -@@ -1446,7 +1446,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, +@@ -1453,7 +1453,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd, if (cpuset->partition_root_state != new_prs) cpuset->partition_root_state = new_prs; @@ -12502,7 +12503,7 @@ index 94c166d2c..c7c03ceae 100644 return cmd == partcmd_update; } -@@ -1549,7 +1549,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp) +@@ -1556,7 +1556,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp) continue; rcu_read_unlock(); @@ -12511,7 +12512,7 @@ index 94c166d2c..c7c03ceae 100644 cpumask_copy(cp->effective_cpus, tmp->new_cpus); if (cp->nr_subparts_cpus && (new_prs != PRS_ENABLED)) { -@@ -1583,7 +1583,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp) +@@ -1590,7 +1590,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp) if (new_prs != cp->partition_root_state) cp->partition_root_state = new_prs; @@ -12520,7 +12521,7 @@ index 94c166d2c..c7c03ceae 100644 WARN_ON(!is_in_v2_mode() && !cpumask_equal(cp->cpus_allowed, cp->effective_cpus)); -@@ -1711,7 +1711,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, +@@ -1718,7 +1718,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, return -EINVAL; } @@ -12529,7 +12530,7 @@ index 94c166d2c..c7c03ceae 100644 cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed); /* -@@ -1721,7 +1721,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, +@@ -1728,7 +1728,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, cpumask_and(cs->subparts_cpus, cs->subparts_cpus, cs->cpus_allowed); cs->nr_subparts_cpus = cpumask_weight(cs->subparts_cpus); } @@ -12538,7 +12539,7 @@ index 94c166d2c..c7c03ceae 100644 update_cpumasks_hier(cs, &tmp); -@@ -1915,9 +1915,9 @@ static void update_nodemasks_hier(struct cpuset *cs, nodemask_t *new_mems) +@@ -1922,9 +1922,9 @@ static void update_nodemasks_hier(struct cpuset *cs, nodemask_t *new_mems) continue; rcu_read_unlock(); @@ -12550,7 +12551,7 @@ index 94c166d2c..c7c03ceae 100644 WARN_ON(!is_in_v2_mode() && !nodes_equal(cp->mems_allowed, cp->effective_mems)); -@@ -1985,9 +1985,9 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, +@@ -1992,9 +1992,9 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, if (retval < 0) goto done; @@ -12562,7 +12563,7 @@ index 94c166d2c..c7c03ceae 100644 /* use trialcs->mems_allowed as a temp variable */ update_nodemasks_hier(cs, &trialcs->mems_allowed); -@@ -2078,9 +2078,9 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, +@@ -2085,9 +2085,9 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, spread_flag_changed = ((is_spread_slab(cs) != is_spread_slab(trialcs)) || (is_spread_page(cs) != is_spread_page(trialcs))); @@ -12574,7 +12575,7 @@ index 94c166d2c..c7c03ceae 100644 if (!cpumask_empty(trialcs->cpus_allowed) && balance_flag_changed) rebuild_sched_domains_locked(); -@@ -2166,9 +2166,9 @@ static int update_prstate(struct cpuset *cs, int new_prs) +@@ -2173,9 +2173,9 @@ static int update_prstate(struct cpuset *cs, int new_prs) rebuild_sched_domains_locked(); out: if (!err) { @@ -12586,7 +12587,7 @@ index 94c166d2c..c7c03ceae 100644 } free_cpumasks(NULL, &tmpmask); -@@ -2650,7 +2650,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v) +@@ -2657,7 +2657,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v) cpuset_filetype_t type = seq_cft(sf)->private; int ret = 0; @@ -12595,7 +12596,7 @@ index 94c166d2c..c7c03ceae 100644 switch (type) { case FILE_CPULIST: -@@ -2677,7 +2677,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v) +@@ -2684,7 +2684,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v) ret = -EINVAL; } @@ -12604,7 +12605,7 @@ index 94c166d2c..c7c03ceae 100644 return ret; } -@@ -2998,14 +2998,14 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) +@@ -3005,14 +3005,14 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) cpuset_inc(); @@ -12621,7 +12622,7 @@ index 94c166d2c..c7c03ceae 100644 if (!test_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags)) goto out_unlock; -@@ -3032,7 +3032,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) +@@ -3039,7 +3039,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) } rcu_read_unlock(); @@ -12630,7 +12631,7 @@ index 94c166d2c..c7c03ceae 100644 cs->mems_allowed = parent->mems_allowed; cs->effective_mems = parent->mems_allowed; cpumask_copy(cs->cpus_allowed, parent->cpus_allowed); -@@ -3040,7 +3040,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) +@@ -3047,7 +3047,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY cpumask_copy(cs->prefer_cpus, parent->prefer_cpus); #endif @@ -12639,7 +12640,7 @@ index 94c166d2c..c7c03ceae 100644 out_unlock: mutex_unlock(&cpuset_mutex); put_online_cpus(); -@@ -3096,7 +3096,7 @@ static void cpuset_css_free(struct cgroup_subsys_state *css) +@@ -3103,7 +3103,7 @@ static void cpuset_css_free(struct cgroup_subsys_state *css) static void cpuset_bind(struct cgroup_subsys_state *root_css) { mutex_lock(&cpuset_mutex); @@ -12648,7 +12649,7 @@ index 94c166d2c..c7c03ceae 100644 if (is_in_v2_mode()) { cpumask_copy(top_cpuset.cpus_allowed, cpu_possible_mask); -@@ -3107,7 +3107,7 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css) +@@ -3114,7 +3114,7 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css) top_cpuset.mems_allowed = top_cpuset.effective_mems; } @@ -12657,7 +12658,7 @@ index 94c166d2c..c7c03ceae 100644 mutex_unlock(&cpuset_mutex); } -@@ -3217,12 +3217,12 @@ hotplug_update_tasks_legacy(struct cpuset *cs, +@@ -3224,12 +3224,12 @@ hotplug_update_tasks_legacy(struct cpuset *cs, #endif bool is_empty; @@ -12672,7 +12673,7 @@ index 94c166d2c..c7c03ceae 100644 /* * Don't call update_tasks_cpumask() if the cpuset becomes empty, -@@ -3266,10 +3266,10 @@ hotplug_update_tasks(struct cpuset *cs, +@@ -3273,10 +3273,10 @@ hotplug_update_tasks(struct cpuset *cs, if (nodes_empty(*new_mems)) *new_mems = parent_cs(cs)->effective_mems; @@ -12685,7 +12686,7 @@ index 94c166d2c..c7c03ceae 100644 if (cpus_updated) update_tasks_cpumask(cs); -@@ -3336,10 +3336,10 @@ retry: +@@ -3343,10 +3343,10 @@ static void cpuset_hotplug_update_tasks(struct cpuset *cs, struct tmpmasks *tmp) if (is_partition_root(cs) && (cpumask_empty(&new_cpus) || (parent->partition_root_state == PRS_ERROR))) { if (cs->nr_subparts_cpus) { @@ -12698,7 +12699,7 @@ index 94c166d2c..c7c03ceae 100644 compute_effective_cpumask(&new_cpus, cs, parent); } -@@ -3353,9 +3353,9 @@ retry: +@@ -3360,9 +3360,9 @@ static void cpuset_hotplug_update_tasks(struct cpuset *cs, struct tmpmasks *tmp) cpumask_empty(&new_cpus)) { update_parent_subparts_cpumask(cs, partcmd_disable, NULL, tmp); @@ -12710,7 +12711,7 @@ index 94c166d2c..c7c03ceae 100644 } cpuset_force_rebuild(); } -@@ -3435,7 +3435,7 @@ static void cpuset_hotplug_workfn(struct work_struct *work) +@@ -3442,7 +3442,7 @@ static void cpuset_hotplug_workfn(struct work_struct *work) /* synchronize cpus_allowed to cpu_active_mask */ if (cpus_updated) { @@ -12719,7 +12720,7 @@ index 94c166d2c..c7c03ceae 100644 if (!on_dfl) cpumask_copy(top_cpuset.cpus_allowed, &new_cpus); /* -@@ -3455,17 +3455,17 @@ static void cpuset_hotplug_workfn(struct work_struct *work) +@@ -3462,17 +3462,17 @@ static void cpuset_hotplug_workfn(struct work_struct *work) } } cpumask_copy(top_cpuset.effective_cpus, &new_cpus); @@ -12740,7 +12741,7 @@ index 94c166d2c..c7c03ceae 100644 update_tasks_nodemask(&top_cpuset); } -@@ -3569,11 +3569,11 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) +@@ -3576,11 +3576,11 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) { unsigned long flags; @@ -12754,7 +12755,7 @@ index 94c166d2c..c7c03ceae 100644 } /** -@@ -3634,11 +3634,11 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk) +@@ -3641,11 +3641,11 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk) nodemask_t mask; unsigned long flags; @@ -12768,7 +12769,7 @@ index 94c166d2c..c7c03ceae 100644 return mask; } -@@ -3730,14 +3730,14 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask) +@@ -3737,14 +3737,14 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask) return true; /* Not hardwall and node outside mems_allowed: scan up cpusets */ @@ -13041,7 +13042,7 @@ index cde0ca876..909dcd708 100644 return ret; } -@@ -2165,6 +2167,16 @@ retry_private: +@@ -2165,6 +2167,16 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, */ requeue_pi_wake_futex(this, &key2, hb2); continue; @@ -13058,7 +13059,7 @@ index cde0ca876..909dcd708 100644 } else if (ret) { /* * rt_mutex_start_proxy_lock() detected a -@@ -2857,7 +2869,7 @@ retry_private: +@@ -2857,7 +2869,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, goto no_block; } @@ -13609,10 +13610,10 @@ index 6d11cfb9b..c7fbf737e 100644 obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o obj-$(CONFIG_WW_MUTEX_SELFTEST) += test-ww_mutex.o diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 6cbd2b444..f2f5defaf 100644 +index 7471d85f5..4fb9e6301 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c -@@ -5413,6 +5413,7 @@ static noinstr void check_flags(unsigned long flags) +@@ -5414,6 +5414,7 @@ static noinstr void check_flags(unsigned long flags) } } @@ -13620,7 +13621,7 @@ index 6cbd2b444..f2f5defaf 100644 /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -5427,6 +5428,7 @@ static noinstr void check_flags(unsigned long flags) +@@ -5428,6 +5429,7 @@ static noinstr void check_flags(unsigned long flags) DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } @@ -14023,7 +14024,7 @@ index fc549713b..659e93e25 100644 - debug_rt_mutex_print_deadlock(w); -} diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index a82d1176e..8fb866216 100644 +index 9d24d2263..0f863d020 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -8,6 +8,11 @@ @@ -14046,20 +14047,19 @@ index a82d1176e..8fb866216 100644 #include "rtmutex_common.h" -@@ -136,6 +142,12 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock) - WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS); +@@ -164,6 +170,11 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock, bool acquire_lock) + WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS); + } } - +static int rt_mutex_real_waiter(struct rt_mutex_waiter *waiter) +{ + return waiter && waiter != PI_WAKEUP_INPROGRESS && + waiter != PI_REQUEUE_INPROGRESS; +} -+ + /* * We can speed up the acquire/release, if there's no debugging state to be - * set up. -@@ -227,7 +239,7 @@ static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock, +@@ -263,7 +274,7 @@ static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock, * Only use with rt_mutex_waiter_{less,equal}() */ #define task_to_waiter(p) \ @@ -14068,7 +14068,7 @@ index a82d1176e..8fb866216 100644 static inline int rt_mutex_waiter_less(struct rt_mutex_waiter *left, -@@ -275,6 +287,27 @@ static inline bool __waiter_less(struct rb_node *a, const struct rb_node *b) +@@ -311,6 +322,27 @@ static inline bool __waiter_less(struct rb_node *a, const struct rb_node *b) return rt_mutex_waiter_less(__node_2_waiter(a), __node_2_waiter(b)); } @@ -14096,7 +14096,7 @@ index a82d1176e..8fb866216 100644 static void rt_mutex_enqueue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter) { -@@ -353,6 +386,14 @@ static bool rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter *waiter, +@@ -389,6 +421,14 @@ static bool rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter *waiter, return debug_rt_mutex_detect_deadlock(waiter, chwalk); } @@ -14111,7 +14111,7 @@ index a82d1176e..8fb866216 100644 /* * Max number of times we'll walk the boosting chain: */ -@@ -360,7 +401,8 @@ int max_lock_depth = 1024; +@@ -396,7 +436,8 @@ int max_lock_depth = 1024; static inline struct rt_mutex *task_blocked_on_lock(struct task_struct *p) { @@ -14121,7 +14121,7 @@ index a82d1176e..8fb866216 100644 } /* -@@ -496,7 +538,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -532,7 +573,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, * reached or the state of the chain has changed while we * dropped the locks. */ @@ -14130,7 +14130,7 @@ index a82d1176e..8fb866216 100644 goto out_unlock_pi; /* -@@ -579,7 +621,6 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -615,7 +656,6 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, * walk, we detected a deadlock. */ if (lock == orig_lock || rt_mutex_owner(lock) == top_task) { @@ -14138,7 +14138,7 @@ index a82d1176e..8fb866216 100644 raw_spin_unlock(&lock->wait_lock); ret = -EDEADLK; goto out_unlock_pi; -@@ -676,13 +717,16 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -712,13 +752,16 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, * follow here. This is the end of the chain we are walking. */ if (!rt_mutex_owner(lock)) { @@ -14157,7 +14157,7 @@ index a82d1176e..8fb866216 100644 raw_spin_unlock_irq(&lock->wait_lock); return 0; } -@@ -783,9 +827,11 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -819,9 +862,11 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, * @task: The task which wants to acquire the lock * @waiter: The waiter that is queued to the lock's wait tree if the * callsite called task_blocked_on_lock(), otherwise NULL @@ -14171,7 +14171,7 @@ index a82d1176e..8fb866216 100644 { lockdep_assert_held(&lock->wait_lock); -@@ -821,12 +867,11 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, +@@ -857,12 +902,11 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, */ if (waiter) { /* @@ -14187,7 +14187,7 @@ index a82d1176e..8fb866216 100644 /* * We can acquire the lock. Remove the waiter from the * lock waiters tree. -@@ -844,14 +889,12 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, +@@ -880,14 +924,12 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, */ if (rt_mutex_has_waiters(lock)) { /* @@ -14206,7 +14206,7 @@ index a82d1176e..8fb866216 100644 /* * The current top waiter stays enqueued. We * don't have to change anything in the lock -@@ -898,6 +941,329 @@ takeit: +@@ -934,6 +976,329 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, return 1; } @@ -14343,7 +14343,7 @@ index a82d1176e..8fb866216 100644 + * try_to_take_rt_mutex() sets the waiter bit + * unconditionally. We might have to fix that up: + */ -+ fixup_rt_mutex_waiters(lock); ++ fixup_rt_mutex_waiters(lock, true); + + BUG_ON(rt_mutex_has_waiters(lock) && waiter == rt_mutex_top_waiter(lock)); + BUG_ON(!RB_EMPTY_NODE(&waiter->tree_entry)); @@ -14536,7 +14536,7 @@ index a82d1176e..8fb866216 100644 /* * Task blocks on lock. * -@@ -930,6 +1296,22 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, +@@ -966,6 +1331,22 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, return -EDEADLK; raw_spin_lock(&task->pi_lock); @@ -14559,7 +14559,7 @@ index a82d1176e..8fb866216 100644 waiter->task = task; waiter->lock = lock; waiter->prio = task->prio; -@@ -953,7 +1335,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, +@@ -989,7 +1370,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, rt_mutex_enqueue_pi(owner, waiter); rt_mutex_adjust_prio(owner); @@ -14568,7 +14568,7 @@ index a82d1176e..8fb866216 100644 chain_walk = 1; } else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) { chain_walk = 1; -@@ -995,6 +1377,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, +@@ -1031,6 +1412,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, * Called with lock->wait_lock held and interrupts disabled. */ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q, @@ -14576,7 +14576,7 @@ index a82d1176e..8fb866216 100644 struct rt_mutex *lock) { struct rt_mutex_waiter *waiter; -@@ -1034,7 +1417,10 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q, +@@ -1070,7 +1452,10 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q, * Pairs with preempt_enable() in rt_mutex_postunlock(); */ preempt_disable(); @@ -14588,7 +14588,7 @@ index a82d1176e..8fb866216 100644 raw_spin_unlock(¤t->pi_lock); } -@@ -1049,7 +1435,7 @@ static void remove_waiter(struct rt_mutex *lock, +@@ -1085,7 +1470,7 @@ static void remove_waiter(struct rt_mutex *lock, { bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock)); struct task_struct *owner = rt_mutex_owner(lock); @@ -14597,7 +14597,7 @@ index a82d1176e..8fb866216 100644 lockdep_assert_held(&lock->wait_lock); -@@ -1075,7 +1461,8 @@ static void remove_waiter(struct rt_mutex *lock, +@@ -1111,7 +1496,8 @@ static void remove_waiter(struct rt_mutex *lock, rt_mutex_adjust_prio(owner); /* Store the lock on which owner is blocked or NULL */ @@ -14607,7 +14607,7 @@ index a82d1176e..8fb866216 100644 raw_spin_unlock(&owner->pi_lock); -@@ -1111,26 +1498,28 @@ void rt_mutex_adjust_pi(struct task_struct *task) +@@ -1147,26 +1533,28 @@ void rt_mutex_adjust_pi(struct task_struct *task) raw_spin_lock_irqsave(&task->pi_lock, flags); waiter = task->pi_blocked_on; @@ -14639,7 +14639,7 @@ index a82d1176e..8fb866216 100644 } /** -@@ -1146,7 +1535,8 @@ void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter) +@@ -1182,7 +1570,8 @@ void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter) static int __sched __rt_mutex_slowlock(struct rt_mutex *lock, int state, struct hrtimer_sleeper *timeout, @@ -14649,7 +14649,7 @@ index a82d1176e..8fb866216 100644 { int ret = 0; -@@ -1155,24 +1545,23 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state, +@@ -1191,24 +1580,23 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state, if (try_to_take_rt_mutex(lock, current, waiter)) break; @@ -14685,7 +14685,7 @@ index a82d1176e..8fb866216 100644 schedule(); raw_spin_lock_irq(&lock->wait_lock); -@@ -1193,43 +1582,110 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock, +@@ -1229,43 +1617,110 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock, if (res != -EDEADLOCK || detect_deadlock) return; @@ -14725,15 +14725,15 @@ index a82d1176e..8fb866216 100644 + * Not quite done after calling ww_acquire_done() ? + */ + DEBUG_LOCKS_WARN_ON(ww_ctx->done_acquire); - -- rt_mutex_init_waiter(&waiter); ++ + if (ww_ctx->contending_lock) { + /* + * After -EDEADLK you tried to + * acquire a different ww_mutex? Bad! + */ + DEBUG_LOCKS_WARN_ON(ww_ctx->contending_lock != ww); -+ + +- rt_mutex_init_waiter(&waiter); + /* + * You called ww_mutex_lock after receiving -EDEADLK, + * but 'forgot' to unlock everything else first? @@ -14819,7 +14819,7 @@ index a82d1176e..8fb866216 100644 return 0; } -@@ -1239,16 +1695,26 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, +@@ -1275,16 +1730,26 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, if (unlikely(timeout)) hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS); @@ -14851,13 +14851,13 @@ index a82d1176e..8fb866216 100644 } /* -@@ -1256,6 +1722,36 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, +@@ -1292,7 +1757,36 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, * unconditionally. We might have to fix that up. */ - fixup_rt_mutex_waiters(lock); + fixup_rt_mutex_waiters(lock, true); + return ret; +} -+ + +/* + * Slow path lock function: + */ @@ -14885,10 +14885,10 @@ index a82d1176e..8fb866216 100644 + + ret = rt_mutex_slowlock_locked(lock, state, timeout, chwalk, ww_ctx, + &waiter); - raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -@@ -1316,7 +1812,8 @@ static inline int rt_mutex_slowtrylock(struct rt_mutex *lock) + /* Remove pending timer: */ +@@ -1352,7 +1846,8 @@ static inline int rt_mutex_slowtrylock(struct rt_mutex *lock) * Return whether the current task needs to call rt_mutex_postunlock(). */ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, @@ -14898,7 +14898,7 @@ index a82d1176e..8fb866216 100644 { unsigned long flags; -@@ -1370,7 +1867,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, +@@ -1406,7 +1901,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, * * Queue the next waiter for wakeup once we release the wait_lock. */ @@ -14907,7 +14907,7 @@ index a82d1176e..8fb866216 100644 raw_spin_unlock_irqrestore(&lock->wait_lock, flags); return true; /* call rt_mutex_postunlock() */ -@@ -1384,29 +1881,16 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, +@@ -1420,29 +1915,16 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, */ static inline int rt_mutex_fastlock(struct rt_mutex *lock, int state, @@ -14941,7 +14941,7 @@ index a82d1176e..8fb866216 100644 } static inline int -@@ -1422,9 +1906,11 @@ rt_mutex_fasttrylock(struct rt_mutex *lock, +@@ -1458,9 +1940,11 @@ rt_mutex_fasttrylock(struct rt_mutex *lock, /* * Performs the wakeup of the top-waiter and re-enables preemption. */ @@ -14954,7 +14954,7 @@ index a82d1176e..8fb866216 100644 /* Pairs with preempt_disable() in rt_mutex_slowunlock() */ preempt_enable(); -@@ -1433,23 +1919,46 @@ void rt_mutex_postunlock(struct wake_q_head *wake_q) +@@ -1469,23 +1953,46 @@ void rt_mutex_postunlock(struct wake_q_head *wake_q) static inline void rt_mutex_fastunlock(struct rt_mutex *lock, bool (*slowfn)(struct rt_mutex *lock, @@ -15006,7 +15006,7 @@ index a82d1176e..8fb866216 100644 } #ifdef CONFIG_DEBUG_LOCK_ALLOC -@@ -1490,16 +1999,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); +@@ -1526,16 +2033,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); */ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) { @@ -15024,7 +15024,7 @@ index a82d1176e..8fb866216 100644 } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); -@@ -1516,36 +2016,17 @@ int __sched __rt_mutex_futex_trylock(struct rt_mutex *lock) +@@ -1552,36 +2050,17 @@ int __sched __rt_mutex_futex_trylock(struct rt_mutex *lock) return __rt_mutex_slowtrylock(lock); } @@ -15069,7 +15069,7 @@ index a82d1176e..8fb866216 100644 /** * rt_mutex_trylock - try to lock a rt_mutex -@@ -1562,10 +2043,7 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock) +@@ -1598,10 +2077,7 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock) { int ret; @@ -15081,7 +15081,7 @@ index a82d1176e..8fb866216 100644 if (ret) mutex_acquire(&lock->dep_map, 0, 1, _RET_IP_); -@@ -1573,6 +2051,11 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock) +@@ -1609,6 +2085,11 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock) } EXPORT_SYMBOL_GPL(rt_mutex_trylock); @@ -15093,7 +15093,7 @@ index a82d1176e..8fb866216 100644 /** * rt_mutex_unlock - unlock a rt_mutex * -@@ -1581,16 +2064,13 @@ EXPORT_SYMBOL_GPL(rt_mutex_trylock); +@@ -1617,16 +2098,13 @@ EXPORT_SYMBOL_GPL(rt_mutex_trylock); void __sched rt_mutex_unlock(struct rt_mutex *lock) { mutex_release(&lock->dep_map, _RET_IP_); @@ -15114,7 +15114,7 @@ index a82d1176e..8fb866216 100644 { lockdep_assert_held(&lock->wait_lock); -@@ -1607,23 +2087,35 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock, +@@ -1643,23 +2121,35 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock, * avoid inversion prior to the wakeup. preempt_disable() * therein pairs with rt_mutex_postunlock(). */ @@ -15153,7 +15153,7 @@ index a82d1176e..8fb866216 100644 } /** -@@ -1637,9 +2129,6 @@ void __sched rt_mutex_futex_unlock(struct rt_mutex *lock) +@@ -1673,9 +2163,6 @@ void __sched rt_mutex_futex_unlock(struct rt_mutex *lock) void rt_mutex_destroy(struct rt_mutex *lock) { WARN_ON(rt_mutex_is_locked(lock)); @@ -15163,7 +15163,7 @@ index a82d1176e..8fb866216 100644 } EXPORT_SYMBOL_GPL(rt_mutex_destroy); -@@ -1662,7 +2151,7 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name, +@@ -1698,7 +2185,7 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name, if (name && key) debug_rt_mutex_init(lock, name, key); } @@ -15172,7 +15172,7 @@ index a82d1176e..8fb866216 100644 /** * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a -@@ -1682,6 +2171,14 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, +@@ -1718,6 +2205,14 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) { __rt_mutex_init(lock, NULL, NULL); @@ -15187,8 +15187,8 @@ index a82d1176e..8fb866216 100644 debug_rt_mutex_proxy_lock(lock, proxy_owner); rt_mutex_set_owner(lock, proxy_owner); } -@@ -1704,6 +2201,26 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock) - rt_mutex_set_owner(lock, NULL); +@@ -1740,6 +2235,26 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock) + rt_mutex_clear_owner(lock); } +static void fixup_rt_mutex_blocked(struct rt_mutex *lock) @@ -15214,7 +15214,7 @@ index a82d1176e..8fb866216 100644 /** * __rt_mutex_start_proxy_lock() - Start lock acquisition for another task * @lock: the rt_mutex to take -@@ -1734,6 +2251,34 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, +@@ -1770,6 +2285,34 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, if (try_to_take_rt_mutex(lock, task, NULL)) return 1; @@ -15249,7 +15249,7 @@ index a82d1176e..8fb866216 100644 /* We enforce deadlock detection for futexes */ ret = task_blocks_on_rt_mutex(lock, waiter, task, RT_MUTEX_FULL_CHAINWALK); -@@ -1748,7 +2293,8 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, +@@ -1784,7 +2327,8 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, ret = 0; } @@ -15259,7 +15259,7 @@ index a82d1176e..8fb866216 100644 return ret; } -@@ -1833,12 +2379,15 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock, +@@ -1869,7 +2413,7 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock, raw_spin_lock_irq(&lock->wait_lock); /* sleep on the mutex */ set_current_state(TASK_INTERRUPTIBLE); @@ -15268,15 +15268,7 @@ index a82d1176e..8fb866216 100644 /* * try_to_take_rt_mutex() sets the waiter bit unconditionally. We might * have to fix that up. - */ - fixup_rt_mutex_waiters(lock); -+ if (ret) -+ fixup_rt_mutex_blocked(lock); -+ - raw_spin_unlock_irq(&lock->wait_lock); - - return ret; -@@ -1900,3 +2449,97 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock, +@@ -1936,3 +2480,97 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock, return cleanup; } @@ -16653,7 +16645,7 @@ index ffd7f90b8..80c97bc3e 100644 int dmesg_restrict = IS_ENABLED(CONFIG_SECURITY_DMESG_RESTRICT); static int syslog_action_restricted(int type) -@@ -680,7 +622,7 @@ out: +@@ -680,7 +622,7 @@ static ssize_t msg_print_ext_body(char *buf, size_t size, /* /dev/kmsg - userspace message inject/listen interface */ struct devkmsg_user { @@ -19265,10 +19257,10 @@ index b1d7aef10..5e11e30f4 100644 This option boosts the priority of preempted RCU readers that block the current preemptible RCU grace period for too long. diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c -index 66bc1af18..76815894b 100644 +index 81e3550ea..6b47b4627 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c -@@ -100,8 +100,10 @@ static struct rcu_state rcu_state = { +@@ -101,8 +101,10 @@ static struct rcu_state rcu_state = { static bool dump_tree; module_param(dump_tree, bool, 0444); /* By default, use RCU_SOFTIRQ instead of rcuc kthreads. */ @@ -20061,7 +20053,7 @@ index fa71c7c51..24c390638 100644 out: task_rq_unlock(rq, p, &rf); -@@ -2320,7 +2817,7 @@ out: +@@ -2320,7 +2817,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) { @@ -20079,7 +20071,7 @@ index fa71c7c51..24c390638 100644 #endif trace_sched_migrate_task(p, new_cpu); -@@ -2493,6 +2992,18 @@ out: +@@ -2493,6 +2992,18 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p, } #endif /* CONFIG_NUMA_BALANCING */ @@ -20778,7 +20770,7 @@ index fa71c7c51..24c390638 100644 struct rq_flags rf; int reset_on_fork; int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK; -@@ -6571,6 +7248,7 @@ change: +@@ -6571,6 +7248,7 @@ static int __sched_setscheduler(struct task_struct *p, /* Avoid rq from going away on us: */ preempt_disable(); @@ -20786,7 +20778,7 @@ index fa71c7c51..24c390638 100644 task_rq_unlock(rq, p, &rf); if (pi) { -@@ -6580,7 +7258,7 @@ change: +@@ -6580,7 +7258,7 @@ static int __sched_setscheduler(struct task_struct *p, } /* Run balance callbacks after we've adjusted the PI chain: */ @@ -21658,7 +21650,7 @@ index 52062b910..7488bcf38 100644 if (WARN_ON(next_task == rq->curr)) return 0; -@@ -1949,12 +1982,10 @@ retry: +@@ -1949,12 +1982,10 @@ static int push_rt_task(struct rq *rq) deactivate_task(rq, next_task, 0); set_task_cpu(next_task, lowest_rq->cpu); activate_task(lowest_rq, next_task, 0); @@ -21672,7 +21664,7 @@ index 52062b910..7488bcf38 100644 out: put_task_struct(next_task); -@@ -1964,7 +1995,7 @@ out: +@@ -1964,7 +1995,7 @@ static int push_rt_task(struct rq *rq) static void push_rt_tasks(struct rq *rq) { /* push_rt_task will return true if it moved an RT */ @@ -21754,7 +21746,7 @@ index 52062b910..7488bcf38 100644 .task_tick = task_tick_rt, diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index e6f934af7..cb210196b 100644 +index e6f934af7..eefb192ec 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1095,6 +1095,7 @@ struct rq { @@ -21932,6 +21924,20 @@ index e1c655f92..f230b1ac7 100644 raw_spin_lock_irq(&q->lock); list_splice_init(&q->task_list, &tmp); while (!list_empty(&tmp)) { +diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c +index e7413d6dd..9e877e033 100644 +--- a/kernel/sched/topology.c ++++ b/kernel/sched/topology.c +@@ -528,7 +528,8 @@ static int init_rootdomain(struct root_domain *rd) + #ifdef HAVE_RT_PUSH_IPI + rd->rto_cpu = -1; + raw_spin_lock_init(&rd->rto_lock); +- init_irq_work(&rd->rto_push_work, rto_push_irq_work_func); ++// init_irq_work(&rd->rto_push_work, rto_push_irq_work_func); ++ rd->rto_push_work = IRQ_WORK_INIT_HARD(rto_push_irq_work_func); + #endif + + init_dl_bw(&rd->dl_bw); diff --git a/kernel/signal.c b/kernel/signal.c index eed7a3a38..9769b462e 100644 --- a/kernel/signal.c @@ -22046,7 +22052,7 @@ index eed7a3a38..9769b462e 100644 /* * Flush all pending signals for this kthread. */ -@@ -596,7 +654,7 @@ still_pending: +@@ -596,7 +654,7 @@ static void collect_signal(int sig, struct sigpending *list, kernel_siginfo_t *i (info->si_code == SI_TIMER) && (info->si_sys_private); @@ -22487,7 +22493,7 @@ index 4196b9f84..aebf2d468 100644 restart: /* Reset the pending bitmask before enabling irqs */ -@@ -307,8 +566,10 @@ restart: +@@ -307,8 +566,10 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) pending >>= softirq_bit; } @@ -22499,7 +22505,7 @@ index 4196b9f84..aebf2d468 100644 local_irq_disable(); pending = local_softirq_pending(); -@@ -320,29 +581,10 @@ restart: +@@ -320,29 +581,10 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) wakeup_softirqd(); } @@ -22784,7 +22790,7 @@ index d0bf6da49..7a74b501a 100644 return cpu_stop_queue_work(cpu, work_buf); } -@@ -500,6 +517,8 @@ repeat: +@@ -500,6 +517,8 @@ static void cpu_stopper_thread(unsigned int cpu) int ret; /* cpu stop callbacks must not sleep, make in_atomic() == T */ @@ -22793,7 +22799,7 @@ index d0bf6da49..7a74b501a 100644 preempt_count_inc(); ret = fn(arg); if (done) { -@@ -508,6 +527,8 @@ repeat: +@@ -508,6 +527,8 @@ static void cpu_stopper_thread(unsigned int cpu) cpu_stop_signal_done(done); } preempt_count_dec(); @@ -22883,10 +22889,10 @@ index c1b52dab3..101a73eea 100644 do { ret = __try_to_del_timer_sync(timer, shutdown); diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 32fd702b1..e030ed39a 100644 +index 689c8a0f7..74383d48d 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -2617,60 +2617,43 @@ enum print_line_t trace_handle_return(struct trace_seq *s) +@@ -2589,60 +2589,43 @@ enum print_line_t trace_handle_return(struct trace_seq *s) } EXPORT_SYMBOL_GPL(trace_handle_return); @@ -22966,7 +22972,7 @@ index 32fd702b1..e030ed39a 100644 } struct ring_buffer_event * -@@ -3873,14 +3856,17 @@ unsigned long trace_total_entries(struct trace_array *tr) +@@ -3844,14 +3827,17 @@ unsigned long trace_total_entries(struct trace_array *tr) static void print_lat_help_header(struct seq_file *m) { @@ -22992,7 +22998,7 @@ index 32fd702b1..e030ed39a 100644 } static void print_event_info(struct array_buffer *buf, struct seq_file *m) -@@ -3914,13 +3900,16 @@ static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file +@@ -3885,13 +3871,16 @@ static void print_func_help_header_irq(struct array_buffer *buf, struct seq_file print_event_info(buf, m); @@ -23016,7 +23022,7 @@ index 32fd702b1..e030ed39a 100644 } void -@@ -9568,7 +9557,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) +@@ -9545,7 +9534,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) tracing_off(); local_irq_save(flags); @@ -23024,7 +23030,7 @@ index 32fd702b1..e030ed39a 100644 /* Simulate the iterator */ trace_init_global_iter(&iter); -@@ -9648,7 +9636,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) +@@ -9625,7 +9613,6 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) atomic_dec(&per_cpu_ptr(iter.array_buffer->data, cpu)->disabled); } atomic_dec(&dump_running); @@ -23126,10 +23132,10 @@ index 4778cecee..0c4cc486c 100644 } diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 67a776faf..ca834c96e 100644 +index 687c4e61d..b3eda5091 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -4850,9 +4850,7 @@ void show_workqueue_state(void) +@@ -4859,9 +4859,7 @@ void show_workqueue_state(void) * drivers that queue work while holding locks * also taken in their write paths. */ @@ -23139,7 +23145,7 @@ index 67a776faf..ca834c96e 100644 } raw_spin_unlock_irqrestore(&pwq->pool->lock, flags); /* -@@ -4882,7 +4880,6 @@ void show_workqueue_state(void) +@@ -4891,7 +4889,6 @@ void show_workqueue_state(void) * queue work while holding locks also taken in their write * paths. */ @@ -23147,7 +23153,7 @@ index 67a776faf..ca834c96e 100644 pr_info("pool %d:", pool->id); pr_cont_pool_info(pool); pr_cont(" hung=%lus workers=%d", hung, pool->nr_workers); -@@ -4895,7 +4892,6 @@ void show_workqueue_state(void) +@@ -4904,7 +4901,6 @@ void show_workqueue_state(void) first = false; } pr_cont("\n"); @@ -23155,7 +23161,7 @@ index 67a776faf..ca834c96e 100644 next_pool: raw_spin_unlock_irqrestore(&pool->lock, flags); /* -@@ -4987,6 +4983,10 @@ static void unbind_workers(int cpu) +@@ -4996,6 +4992,10 @@ static void unbind_workers(int cpu) pool->flags |= POOL_DISASSOCIATED; raw_spin_unlock_irq(&pool->lock); @@ -23861,7 +23867,7 @@ index efe38ab47..ad72e587c 100644 #if defined(HASHED_PAGE_VIRTUAL) diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 91159d30a..1e7c49b81 100644 +index db44ade93..5ebc66382 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -67,6 +67,7 @@ @@ -23982,7 +23988,7 @@ index 91159d30a..1e7c49b81 100644 mutex_unlock(&percpu_charge_mutex); } -@@ -3160,7 +3172,7 @@ static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) +@@ -3161,7 +3173,7 @@ static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) unsigned long flags; bool ret = false; @@ -23991,7 +23997,7 @@ index 91159d30a..1e7c49b81 100644 stock = this_cpu_ptr(&memcg_stock); if (objcg == stock->cached_objcg && stock->nr_bytes >= nr_bytes) { -@@ -3168,7 +3180,7 @@ static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) +@@ -3169,7 +3181,7 @@ static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) ret = true; } @@ -24000,7 +24006,7 @@ index 91159d30a..1e7c49b81 100644 return ret; } -@@ -3224,7 +3236,7 @@ static void refill_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) +@@ -3225,7 +3237,7 @@ static void refill_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) struct memcg_stock_pcp *stock; unsigned long flags; @@ -24009,7 +24015,7 @@ index 91159d30a..1e7c49b81 100644 stock = this_cpu_ptr(&memcg_stock); if (stock->cached_objcg != objcg) { /* reset if necessary */ -@@ -3238,7 +3250,7 @@ static void refill_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) +@@ -3239,7 +3251,7 @@ static void refill_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes) if (stock->nr_bytes > PAGE_SIZE) drain_obj_stock(stock); @@ -24018,7 +24024,7 @@ index 91159d30a..1e7c49b81 100644 } int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size) -@@ -6853,12 +6865,12 @@ static int mem_cgroup_move_account(struct page *page, +@@ -6873,12 +6885,12 @@ static int mem_cgroup_move_account(struct page *page, ret = 0; @@ -24033,7 +24039,7 @@ index 91159d30a..1e7c49b81 100644 out_unlock: unlock_page(page); out: -@@ -7837,10 +7849,10 @@ int mem_cgroup_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask) +@@ -7857,10 +7869,10 @@ int mem_cgroup_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask) css_get(&memcg->css); commit_charge(page, memcg); @@ -24046,7 +24052,7 @@ index 91159d30a..1e7c49b81 100644 /* * Cgroup1's unified memory+swap counter has been charged with the -@@ -7896,11 +7908,11 @@ static void uncharge_batch(const struct uncharge_gather *ug) +@@ -7916,11 +7928,11 @@ static void uncharge_batch(const struct uncharge_gather *ug) memcg_oom_recover(ug->memcg); } @@ -24060,7 +24066,7 @@ index 91159d30a..1e7c49b81 100644 /* drop reference from uncharge_page */ css_put(&ug->memcg->css); -@@ -8072,10 +8084,10 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage) +@@ -8092,10 +8104,10 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage) css_get(&memcg->css); commit_charge(newpage, memcg); @@ -24073,7 +24079,7 @@ index 91159d30a..1e7c49b81 100644 } DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); -@@ -8205,9 +8217,13 @@ static int __init mem_cgroup_init(void) +@@ -8225,9 +8237,13 @@ static int __init mem_cgroup_init(void) cpuhp_setup_state_nocalls(CPUHP_MM_MEMCQ_DEAD, "mm/memctrl:dead", NULL, memcg_hotplug_cpu_dead); @@ -24090,7 +24096,7 @@ index 91159d30a..1e7c49b81 100644 for_each_node(node) { struct mem_cgroup_tree_per_node *rtpn; -@@ -8257,6 +8273,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) +@@ -8277,6 +8293,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) struct mem_cgroup *memcg, *swap_memcg; unsigned int nr_entries; unsigned short oldid; @@ -24098,7 +24104,7 @@ index 91159d30a..1e7c49b81 100644 VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -8302,9 +8319,13 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) +@@ -8322,9 +8339,13 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) * important here to have the interrupts disabled because it is the * only synchronisation we have for updating the per-CPU variables. */ @@ -24113,7 +24119,7 @@ index 91159d30a..1e7c49b81 100644 css_put(&memcg->css); } diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 2d33f1aa9..6ae3584ea 100644 +index 1ba392f11..1eccb26ea 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -61,6 +61,7 @@ @@ -24460,7 +24466,7 @@ index 2d33f1aa9..6ae3584ea 100644 out: /* Separate test+clear to avoid unnecessary atomics */ -@@ -3522,7 +3592,7 @@ out: +@@ -3522,7 +3592,7 @@ struct page *rmqueue(struct zone *preferred_zone, return page; failed: @@ -24469,7 +24475,7 @@ index 2d33f1aa9..6ae3584ea 100644 return NULL; } -@@ -9410,7 +9480,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -9411,7 +9481,7 @@ void zone_pcp_reset(struct zone *zone) struct per_cpu_pageset *pset; /* avoid races with drain_pages() */ @@ -24478,7 +24484,7 @@ index 2d33f1aa9..6ae3584ea 100644 if (zone->pageset != &boot_pageset) { for_each_online_cpu(cpu) { pset = per_cpu_ptr(zone->pageset, cpu); -@@ -9419,7 +9489,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -9420,7 +9490,7 @@ void zone_pcp_reset(struct zone *zone) free_percpu(zone->pageset); zone->pageset = &boot_pageset; } @@ -24895,7 +24901,7 @@ index ae84578f3..a65a5f169 100644 if (n->shared) { struct array_cache *shared_array = n->shared; int max = shared_array->limit - shared_array->avail; -@@ -3413,7 +3413,7 @@ free_done: +@@ -3413,7 +3413,7 @@ static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac) STATS_SET_FREEABLE(cachep, i); } #endif @@ -24999,7 +25005,7 @@ index ec1c3a376..559fcc2a3 100644 slab_lock(page); if (s->flags & SLAB_CONSISTENCY_CHECKS) { -@@ -1273,7 +1273,7 @@ out: +@@ -1273,7 +1273,7 @@ static noinline int free_debug_processing( bulk_cnt, cnt); slab_unlock(page); @@ -25097,7 +25103,7 @@ index ec1c3a376..559fcc2a3 100644 return object; } -@@ -2267,7 +2297,7 @@ redo: +@@ -2267,7 +2297,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page, * that acquire_slab() will see a slab page that * is frozen */ @@ -25106,7 +25112,7 @@ index ec1c3a376..559fcc2a3 100644 } } else { m = M_FULL; -@@ -2279,7 +2309,7 @@ redo: +@@ -2279,7 +2309,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page, * slabs from diagnostic functions will not see * any frozen slabs. */ @@ -25115,7 +25121,7 @@ index ec1c3a376..559fcc2a3 100644 } #endif } -@@ -2304,7 +2334,7 @@ redo: +@@ -2304,7 +2334,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page, goto redo; if (lock) @@ -25213,7 +25219,7 @@ index ec1c3a376..559fcc2a3 100644 void *freelist; struct page *page; -@@ -2753,6 +2804,13 @@ load_freelist: +@@ -2753,6 +2804,13 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, VM_BUG_ON(!c->page->frozen); c->freelist = get_freepointer(s, freelist); c->tid = next_tid(c->tid); @@ -25227,7 +25233,7 @@ index ec1c3a376..559fcc2a3 100644 return freelist; new_slab: -@@ -2768,7 +2826,7 @@ new_slab: +@@ -2768,7 +2826,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, if (unlikely(!freelist)) { slab_out_of_memory(s, gfpflags, node); @@ -25236,7 +25242,7 @@ index ec1c3a376..559fcc2a3 100644 } page = c->page; -@@ -2781,7 +2839,7 @@ new_slab: +@@ -2781,7 +2839,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, goto new_slab; /* Slab failed checks. Next slab needed */ deactivate_slab(s, page, get_freepointer(s, freelist), c); @@ -25302,7 +25308,7 @@ index ec1c3a376..559fcc2a3 100644 return; slab_empty: -@@ -3102,7 +3166,7 @@ slab_empty: +@@ -3102,7 +3166,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page, remove_full(s, n, page); } @@ -25665,7 +25671,7 @@ index f75c638c6..6fdf4774f 100644 for_each_unbuddied_list(i, chunks) { struct list_head *l = &unbuddied[i]; -@@ -899,7 +902,7 @@ lookup: +@@ -899,7 +902,7 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, !z3fold_page_trylock(zhdr)) { spin_unlock(&pool->lock); zhdr = NULL; @@ -25674,7 +25680,7 @@ index f75c638c6..6fdf4774f 100644 if (can_sleep) cond_resched(); goto lookup; -@@ -913,7 +916,7 @@ lookup: +@@ -913,7 +916,7 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, test_bit(PAGE_CLAIMED, &page->private)) { z3fold_page_unlock(zhdr); zhdr = NULL; @@ -25683,7 +25689,7 @@ index f75c638c6..6fdf4774f 100644 if (can_sleep) cond_resched(); goto lookup; -@@ -928,7 +931,7 @@ lookup: +@@ -928,7 +931,7 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, kref_get(&zhdr->refcount); break; } @@ -25897,7 +25903,7 @@ index 232075ae1..4221c79b7 100644 config BQL bool diff --git a/net/core/dev.c b/net/core/dev.c -index 73e3192d6..9d2d4bdb9 100644 +index 1f1f93aad..0c2d4beda 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -221,14 +221,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) @@ -25933,7 +25939,7 @@ index 73e3192d6..9d2d4bdb9 100644 } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -3795,7 +3797,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, +@@ -3807,7 +3809,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. */ @@ -25945,7 +25951,7 @@ index 73e3192d6..9d2d4bdb9 100644 if (unlikely(contended)) spin_lock(&q->busylock); -@@ -4597,6 +4603,7 @@ drop: +@@ -4611,6 +4617,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu, rps_unlock(sd); local_irq_restore(flags); @@ -25953,7 +25959,7 @@ index 73e3192d6..9d2d4bdb9 100644 atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -4816,7 +4823,7 @@ static int netif_rx_internal(struct sk_buff *skb) +@@ -4830,7 +4837,7 @@ static int netif_rx_internal(struct sk_buff *skb) struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -25962,7 +25968,7 @@ index 73e3192d6..9d2d4bdb9 100644 rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -4826,14 +4833,14 @@ static int netif_rx_internal(struct sk_buff *skb) +@@ -4840,14 +4847,14 @@ static int netif_rx_internal(struct sk_buff *skb) ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); @@ -25980,7 +25986,7 @@ index 73e3192d6..9d2d4bdb9 100644 } return ret; } -@@ -4872,11 +4879,9 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -4886,11 +4893,9 @@ int netif_rx_ni(struct sk_buff *skb) trace_netif_rx_ni_entry(skb); @@ -25994,7 +26000,7 @@ index 73e3192d6..9d2d4bdb9 100644 trace_netif_rx_ni_exit(err); return err; -@@ -6353,12 +6358,14 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd) +@@ -6367,12 +6372,14 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd) sd->rps_ipi_list = NULL; local_irq_enable(); @@ -26009,7 +26015,7 @@ index 73e3192d6..9d2d4bdb9 100644 } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -6436,6 +6443,7 @@ void __napi_schedule(struct napi_struct *n) +@@ -6450,6 +6457,7 @@ void __napi_schedule(struct napi_struct *n) local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -26017,7 +26023,7 @@ index 73e3192d6..9d2d4bdb9 100644 } EXPORT_SYMBOL(__napi_schedule); -@@ -10986,6 +10994,7 @@ static int dev_cpu_dead(unsigned int oldcpu) +@@ -11000,6 +11008,7 @@ static int dev_cpu_dead(unsigned int oldcpu) raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -26025,7 +26031,7 @@ index 73e3192d6..9d2d4bdb9 100644 #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; -@@ -10999,7 +11008,7 @@ static int dev_cpu_dead(unsigned int oldcpu) +@@ -11013,7 +11022,7 @@ static int dev_cpu_dead(unsigned int oldcpu) netif_rx_ni(skb); input_queue_head_incr(oldsd); } @@ -26034,7 +26040,7 @@ index 73e3192d6..9d2d4bdb9 100644 netif_rx_ni(skb); input_queue_head_incr(oldsd); } -@@ -11315,7 +11324,7 @@ static int __init net_dev_init(void) +@@ -11329,7 +11338,7 @@ static int __init net_dev_init(void) INIT_WORK(flush, flush_backlog); @@ -26125,7 +26131,7 @@ index e491b083b..ef432cea2 100644 struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b) diff --git a/net/core/sock.c b/net/core/sock.c -index 15625bae7..b023dd637 100644 +index a15e984bd..18d65a4fb 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3087,12 +3087,11 @@ void lock_sock_nested(struct sock *sk, int subclass) @@ -26170,7 +26176,7 @@ index cfb4904ee..260c6ae49 100644 err = -EOPNOTSUPP; if (sch->flags & TCQ_F_MQROOT) { diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c -index ecdd9e83f..73b5aa797 100644 +index a3e9dd348..1a3b93750 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -578,7 +578,11 @@ struct Qdisc noop_qdisc = { diff --git a/0001-modify-openeuler_defconfig-for-rt62.patch b/0001-modify-openeuler_defconfig-for-rt62.patch index 4774174..36a9af6 100644 --- a/0001-modify-openeuler_defconfig-for-rt62.patch +++ b/0001-modify-openeuler_defconfig-for-rt62.patch @@ -1,7 +1,7 @@ -From 744a4eb5a8241919999033f304b48cf801918fd4 Mon Sep 17 00:00:00 2001 +From d59dd9d1db2cbc2171e5dd22b522d2c1e8f5e4ae Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Thu, 14 Dec 2023 11:38:19 +0800 -Subject: [PATCH] modify-openeuler_defconfig-for-rt62.patch +Date: Thu, 16 May 2024 16:33:51 +0800 +Subject: [PATCH 2/2] zzzy2 --- arch/arm64/configs/openeuler_defconfig | 6 +++--- @@ -13,7 +13,7 @@ Subject: [PATCH] modify-openeuler_defconfig-for-rt62.patch 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig -index 12e4828c9..7edb9923f 100644 +index 34061d75a..58ece1076 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -87,7 +87,7 @@ CONFIG_HIGH_RES_TIMERS=y @@ -30,11 +30,11 @@ index 12e4828c9..7edb9923f 100644 # CONFIG_PMIC_OPREGION is not set CONFIG_IRQ_BYPASS_MANAGER=y -CONFIG_VIRTUALIZATION=y -+#CONFIG_VIRTUALIZATION=y ++#CONFIG_VIRTUALIZATION is not set CONFIG_KVM=y - CONFIG_HAVE_KVM_IRQCHIP=y - CONFIG_HAVE_KVM_IRQFD=y -@@ -1156,7 +1156,7 @@ CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y + CONFIG_CVM_HOST=y + CONFIG_CVM_GUEST=y +@@ -1159,7 +1159,7 @@ CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y # CONFIG_GUP_BENCHMARK is not set # CONFIG_READ_ONLY_THP_FOR_FS is not set CONFIG_ARCH_HAS_PTE_SPECIAL=y @@ -66,7 +66,7 @@ index 131b2dda3..992c11f2c 100644 static bool have_cpu_fpsimd_context(void) diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig -index 3db754e79..14cf52af1 100644 +index 91c85e1c2..ca197fcaf 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -89,10 +89,10 @@ CONFIG_HIGH_RES_TIMERS=y @@ -91,7 +91,7 @@ index 3db754e79..14cf52af1 100644 CONFIG_UID16=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y -@@ -748,7 +748,7 @@ CONFIG_KVM_COMPAT=y +@@ -749,7 +749,7 @@ CONFIG_KVM_COMPAT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_HAVE_KVM_NO_POLL=y CONFIG_KVM_XFER_TO_GUEST_WORK=y @@ -147,7 +147,7 @@ index 26c70fd11..c82c971e8 100644 #else static inline void zap_locks(void) { } diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c -index 45239dcfb..0f9b88d38 100644 +index 80c97bc3e..86380c37f 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1826,7 +1826,7 @@ static void print_sync_until(struct console *con, u64 seq) @@ -160,5 +160,5 @@ index 45239dcfb..0f9b88d38 100644 { // if (raw_spin_is_locked(&logbuf_lock)) { -- -2.33.0 +2.41.0 diff --git a/kernel-rt.spec b/kernel-rt.spec index 722ca75..10ea2b3 100644 --- a/kernel-rt.spec +++ b/kernel-rt.spec @@ -10,9 +10,9 @@ %global upstream_version 5.10 %global upstream_sublevel 0 -%global devel_release 195 +%global devel_release 199 %global maintenance_release .0.0 -%global pkg_release .62 +%global pkg_release .63 %global rt_release .rt62 %define with_debuginfo 1 @@ -891,6 +891,9 @@ fi %endif %changelog +* Thu May 16 2024 zhangyu - 5.10.0-199.0.0.63 +- update kernel-rt version to 5.10.0-199.0.0 + * Wed May 17 2024 zhangyu - 5.10.0-195.0.0.62 - update kernel-rt version to 5.10.0-195.0.0