回复Andrea Righi2026/09/07 17:50
> >> @@ -9043,27 +9049,31 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) > >> > >> if (!has_idle_core && cpus_share_cache(prev, target)) { > >> i = select_idle_smt(p, sd, prev); > >> - if ((unsigned int)i < nr_cpumask_bits) > >> - return i; > >> + if ((unsigned int)i < nr_cpumask_bits) {...
回复K Prateek Nayak2026/09/07 17:40
>>> @@ -8720,7 +8777,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool >>> return -1; >>> idle_cpu = __select_idle_cpu(cpu, p); >>> if ((unsigned int)idle_cpu < nr_cpumask_bits) >>> - return idle_cpu; >>> + return select_idle_smt_priority(p, idle_cpu); >> >> Question for Shrikanth: On...
回复Oleg Nesterov2026/09/07 17:35
> > Introduce for_each_process_rculock(), for_each_thread_rculock() and > for_each_process_thread_rculock() macros that acquire the RCU read > lock before the iteration starts and release it when the loop is left, > so that the RCU read-side critical section is scoped to the loop body > instead of an externally managed...
回复Andrea Righi2026/09/07 17:12
> Hello Andrea, > > On 9/4/2026 2:48 PM, Andrea Righi wrote: > > +/* > > + * Return true when @cpu has a higher asymmetric-packing priority than > > + * @other in their shared SMT scheduling domain. > > + */ > > +static bool sched_smt_asym_prefer(int cpu, int other) > > +{ > > + struct sched_domain *sd = rcu_dereferenc...
RFCSebastian Andrzej Siewior2026/09/07 16:58
https://lore.kernel.org/all/6a9919ac.94649fcc.25487e.0005.GAE@google.com/ changed diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 57eff26fa646a..75b6798c1d97c 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -8,6 +8,7 @@ +#include <linux/cpuhplock.h> @@ -1044,8 +1045,9 @@ static void irq_threa...
回复K Prateek Nayak2026/09/07 16:37
> So, I've been trying to understand these bits and looking at > cpufreq_policy_init_qos(), the "policy->cpuinfo.max_freq" should be the > frequency including the boost range but I see cpufreq_update_pressure() > and it says: > > max_freq = arch_scale_freq_ref(cpu); > if (!max_freq) > max_freq = policy->cpuinfo.max_fre...
回复Lorenzo Stoakes (ARM)2026/09/07 16:36
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined > with for_each_process() loop in mm/ksm.c with for_each_process_rculock(), > which scopes the RCU read lock to the loop body via scoped_guard(rcu). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos...
回复Lorenzo Stoakes (ARM)2026/09/07 16:35
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs wrapping > for_each_process()/for_each_thread() loops with for_each_process_rculock() > and for_each_thread_rculock(), which scope the RCU read lock to the > loop body via scoped_guard(rcu). > > No functional change. > > Si...
回复Lorenzo Stoakes (ARM)2026/09/07 16:31
> From: Ye Liu <liuye@kylinos.cn> > > Introduce for_each_process_rculock(), for_each_thread_rculock() and > for_each_process_thread_rculock() macros that acquire the RCU read > lock before the iteration starts and release it when the loop is left, > so that the RCU read-side critical section is scoped to the loop body ...
回复Lorenzo Stoakes (ARM)2026/09/07 16:26
> From: Ye Liu <liuye@kylinos.cn> > > Introduce for_each_process_rculock(), for_each_thread_rculock() and > for_each_process_thread_rculock() macros that combine the existing > iteration macros with scoped_guard(rcu), so that the RCU read lock > is automatically acquired before iteration and released when the > loop ex...
回复sashiko-bot2026/09/07 16:23
> diff --git a/fs/proc/base.c b/fs/proc/base.c > index 58be389424605..2c47d838a1c76 100644 > --- a/fs/proc/base.c > +++ b/fs/proc/base.c > @@ -1161,8 +1161,7 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy) > if (mm) { > struct task_struct *p; > > - rcu_read_lock(); > - for_each_process(p) { > +...
回复sashiko-bot2026/09/07 16:22
> diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c > index 40d373d65f9b9..f797ce1192233 100644 > --- a/kernel/trace/fgraph.c > +++ b/kernel/trace/fgraph.c > @@ -1057,11 +1057,10 @@ static int alloc_retstack_tasklist(unsigned long **ret_stack_list) > } > } > > - rcu_read_lock(); > - for_each_process_thread(g, ...
PATCHYe Liu2026/09/07 16:15
changed diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c index 0b71e158c3f5..a578af640aad 100644 --- a/security/landlock/tsync.c +++ b/security/landlock/tsync.c @@ -335,9 +335,7 @@ static size_t count_additional_threads(const struct tsync_works *works) - guard(rcu)(); - - for_each_thread(caller, threa...
PATCHYe Liu2026/09/07 16:15
changed diff --git a/lib/is_single_threaded.c b/lib/is_single_threaded.c index 8c98b20bfc41..4e7fe85454ab 100644 --- a/lib/is_single_threaded.c +++ b/lib/is_single_threaded.c @@ -26,8 +26,7 @@ bool current_is_single_threaded(void) - rcu_read_lock(); - for_each_process(p) { + for_each_process_rculock(p) { @@ -48,7 +47,5...
PATCHYe Liu2026/09/07 16:15
changed diff --git a/fs/proc/base.c b/fs/proc/base.c index 6a39de424f62..3de4f4557e4c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1160,8 +1160,7 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy) - rcu_read_lock(); - for_each_process(p) { + for_each_process_rculock(p) { @@ -1177,7 +1176,6...
PATCHYe Liu2026/09/07 16:14
changed diff --git a/kernel/cpu.c b/kernel/cpu.c index b3c8553d7bd6..00638d2abc0f 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1254,8 +1254,7 @@ void clear_tasks_mm_cpumask(int cpu) - rcu_read_lock(); - for_each_process(p) { + for_each_process_rculock(p) { @@ -1268,7 +1267,6 @@ void clear_tasks_mm_cpumask(int cpu) ...
PATCHYe Liu2026/09/07 16:14
changed diff --git a/mm/memory-failure.c b/mm/memory-failure.c index a8b03e2920ba..7d93deb1f7b3 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -555,8 +555,7 @@ static void collect_procs_anon(const struct folio *folio, - rcu_read_lock(); - for_each_process(tsk) { + for_each_process_rculock(tsk) { @@ -572,...
PATCHYe Liu2026/09/07 16:14
changed diff --git a/mm/ksm.c b/mm/ksm.c index 49d48d1e0998..69d30e80a090 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -3280,8 +3280,7 @@ void collect_procs_ksm(const struct folio *folio, const struct page *page, - rcu_read_lock(); - for_each_process(tsk) { + for_each_process_rculock(tsk) { @@ -3298,7 +3297,6 @@ void collec...
PATCHYe Liu2026/09/07 16:14
changed diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5f372f6e26fa..ef2e1c423c1d 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -94,8 +94,7 @@ static bool oom_cpuset_eligible(struct task_struct *start, - rcu_read_lock(); - for_each_thread(start, tsk) { + for_each_thread_rculock(start, tsk) { @@ -114,7 +113,6 @@ s...
PATCHYe Liu2026/09/07 16:14
changed diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 584ae88b435e..110ea9f131f3 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -2,6 +2,7 @@ +#include <linux/cleanup.h> @@ -663,6 +664,30 @@ extern bool current_is_single_threaded(void); +/* + * Variants o...
PATCHYe Liu2026/09/07 16:13
https://lore.kernel.org/all/20260904083001.553587-1-ye.liu@linux.dev/ https://lore.kernel.org/all/20260813092933.562028-1-ye.liu@linux.dev/ From: Ye Liu <liuye@kylinos.cn> Introduce for_each_process_rculock(), for_each_thread_rculock() and for_each_process_thread_rculock() macros that combine the existing iteration mac...
回复K Prateek Nayak2026/09/07 16:08
> On 9/3/2026 10:04 AM, jong wu wrote: >> 在 2026/9/2 17:37, Hongyan Xia 写道: >>> On 9/2/2026 4:49 PM, jong wu wrote: >>>> 在 2026/8/25 21:05, Vincent Guittot 写道: >>>>> On Mon, 24 Aug 2026 at 15:06, Jianyong Wu <jianyong.wu@outlook.com> >>>>> wrote: >>>>>> >>>>>> Hi Vincent, Hongyan, >>>>>> >>>>>> Thanks for your comments...
PATCHHemanth Selam2026/09/07 14:57
changed diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index ebaf892a16b6..937d02732ba3 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3251,7 +3251,7 @@ static inline bool rq_order_less(struct rq *rq1, struct rq *rq2) - * In order to not have {0,2},{1,3} turn into into an AB-BA, + * In order...
PATCHHemanth Selam2026/09/07 14:54
changed diff --git a/include/linux/sched.h b/include/linux/sched.h index 8b3d47a325cc..364a7ea67d03 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -688,7 +688,7 @@ struct sched_dl_entity { - * runqueue has atleast one cfs task. + * runqueue has at least one cfs task. diff --git a/kernel/sched/core.c ...
回复K Prateek Nayak2026/09/07 11:57
> +/* > + * Return true when @cpu has a higher asymmetric-packing priority than > + * @other in their shared SMT scheduling domain. > + */ > +static bool sched_smt_asym_prefer(int cpu, int other) > +{ > + struct sched_domain *sd = rcu_dereference_all(cpu_rq(cpu)->sd); > + > + if (!sd) > + return false; > + > + if (!(sd...
回复Shrikanth Hegde2026/09/07 11:24
> On Thu, Sep 03, 2026 at 12:02:35PM +0530, Shrikanth Hegde wrote: >> Actively push out the current running task on a non-preferred CPU. Since >> the task is currently running, a stopper thread must be queued to push the >> task out. However, if the task is pinned only to non-preferred CPUs, >> it will continue running...
回复Miaohe Lin2026/09/07 11:05
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs combined > with for_each_process() loop in mm/memory-failure.c with > for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> On 2026/9/4 16:29, Ye Liu wrote: With SJ's comment address...
回复Hongyan Xia2026/09/07 10:32
> 在 2026/9/2 17:37, Hongyan Xia 写道: >> On 9/2/2026 4:49 PM, jong wu wrote: >>> 在 2026/8/25 21:05, Vincent Guittot 写道: >>>> On Mon, 24 Aug 2026 at 15:06, Jianyong Wu <jianyong.wu@outlook.com> >>>> wrote: >>>>> >>>>> Hi Vincent, Hongyan, >>>>> >>>>> Thanks for your comments. >>>>> >>>>> My original commit message did not...
回复Mete Durlu2026/09/07 03:28
> We recently removed the enum values 'preempt_dynamic_none' and > 'preempt_dynamic_voluntary', but forgot to update preempt_modes[] > accordingly. Due to this, preempt_model_str() and sched_dynamic_show() > produce incorrect output, with the wrong preemption model string in > backtraces, and empty output for /sys/kern...
回复Bradley Morgan2026/09/06 01:57
>On Sat, Sep 05, 2026 at 01:55:35PM +0100, Bradley Morgan wrote: >> On 5 September 2026 12:19:54 BST, Greg Kroah-Hartman >> <gregkh@linuxfoundation.org> wrote: >> >On Fri, Sep 04, 2026 at 10:13:32PM +0100, Bradley Morgan wrote: >> >> On 4 September 2026 22:10:32 BST, Jakub Kicinski <kuba@kernel.org> >> >wrote: >> >> >O...
回复Greg Kroah-Hartman2026/09/06 01:12
> On 5 September 2026 12:19:54 BST, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > >On Fri, Sep 04, 2026 at 10:13:32PM +0100, Bradley Morgan wrote: > >> On 4 September 2026 22:10:32 BST, Jakub Kicinski <kuba@kernel.org> > >wrote: > >> >On Fri, 04 Sep 2026 16:56:30 +0100 Bradley Morgan wrote: > >> >> On 4 Se...
回复kernel test robot2026/09/05 23:12
https://git-scm.com/docs/git-format-patch#_base_tree_information https://github.com/intel-lab-lkp/linux/commits/Bradley-Morgan/media-ivtv-convert-to-kthread_run_worker/20260904-093753 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git https://lore.kernel.org/r/c925e99c73bea9e0cdab656ba09453df7e81dcb2.178851...
回复Bradley Morgan2026/09/05 22:50
>Hi Bradley, > >kernel test robot noticed the following build errors: > >[auto build test ERROR on tty/tty-testing] >[also build test ERROR on tty/tty-next tty/tty-linus rafael-pm/linux-next >rafael-pm/bleeding-edge brauner-vfs/vfs.all linus/master v7.3-rc1 >next-20260904] https://git-scm.com/docs/git-format-patch#_bas...
回复kernel test robot2026/09/05 22:37
https://git-scm.com/docs/git-format-patch#_base_tree_information https://github.com/intel-lab-lkp/linux/commits/Bradley-Morgan/media-ivtv-convert-to-kthread_run_worker/20260904-093753 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git https://lore.kernel.org/r/c925e99c73bea9e0cdab656ba09453df7e81dcb2.178851...
回复Hui Su2026/09/05 22:00
> Yes, you have a good point. The code I proposed just look at whether > we have consumed our allotment in the current slice. > > What we should have looked at is whether the donor's total run time has > exceeded its quota when doing core scheduling. And we may happen to > hit __entity_slice_used() at the front of the ...
回复Bradley Morgan2026/09/05 20:55
>On Fri, Sep 04, 2026 at 10:13:32PM +0100, Bradley Morgan wrote: >> On 4 September 2026 22:10:32 BST, Jakub Kicinski <kuba@kernel.org> >wrote: >> >On Fri, 04 Sep 2026 16:56:30 +0100 Bradley Morgan wrote: >> >> On 4 September 2026 16:54:18 BST, Jakub Kicinski <kuba@kernel.org> >> >wrote: >> >> >On Fri, 4 Sep 2026 09:37:...
回复Greg Kroah-Hartman2026/09/05 19:21
> On 4 September 2026 22:10:32 BST, Jakub Kicinski <kuba@kernel.org> wrote: > >On Fri, 04 Sep 2026 16:56:30 +0100 Bradley Morgan wrote: > >> On 4 September 2026 16:54:18 BST, Jakub Kicinski <kuba@kernel.org> > >wrote: > >> >On Fri, 4 Sep 2026 09:37:21 +0000 Bradley Morgan wrote: > >> >> media: ivtv: convert to kthread_...
回复Bradley Morgan2026/09/05 17:54
>Thank you for your contribution! Sashiko AI review found 2 potential >issue(s) to consider: > >Pre-existing issues: >- [High] Missing state cleanup for `priv->tx_skb` in TX timeout, interface stop, and device removal paths leads to memory leaks, data races, and potential BUG() panics. >- [High] Hardware memory structu...
回复Bradley Morgan2026/09/05 17:51
>Thank you for your contribution! Sashiko AI review found 2 potential >issue(s) to consider: > >New issues: >- [High] The explicitly allocated kthread worker is destroyed before the devm-managed threaded IRQ handler is freed, causing a Use-After-Free. > >Pre-existing issues: >- [High] Closing any single port cancels th...
回复Bradley Morgan2026/09/05 17:51
>Thank you for your contribution! Sashiko AI review found 2 potential >issue(s) to consider: >- [High] kthread_queue_work() receives a double pointer instead of a pointer to kthread_worker, leading to a build error or runtime memory corruption. >- [High] kthread_destroy_worker() is called before free_irq(), creating a ...
回复Bradley Morgan2026/09/05 17:50
>Thank you for your contribution! Sashiko AI review found 1 potential >issue(s) to consider: >- [Medium] Removing the self-assignment `worker->task = current;` breaks out-of-tree (OOT) users of the old `kthread_run(kthread_worker_fn, ...)` API, causing them to permanently deadlock due to missed wakeups. >-- > >commit 4...
回复sashiko-bot2026/09/05 17:40
> diff --git a/kernel/kthread.c b/kernel/kthread.c > index 63beb59b7a3d1..643407647e79d 100644 > --- a/kernel/kthread.c > +++ b/kernel/kthread.c > @@ -987,12 +987,10 @@ int kthread_worker_fn(void *worker_ptr) > struct kthread_worker *worker = worker_ptr; > struct kthread_work *work; > > - /* > - * FIXME: Update the che...
回复sashiko-bot2026/09/05 17:40
> diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c > --- a/drivers/net/ethernet/microchip/encx24j600.c > +++ b/drivers/net/ethernet/microchip/encx24j600.c > @@ -884,7 +883,7 @@ static netdev_tx_t encx24j600_tx(struct sk_buff *skb, struct net_device *dev) > /* Rememb...
回复sashiko-bot2026/09/05 17:40
> diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c > index b9ea56ec9593f..6f0e0e46deb5b 100644 > --- a/drivers/media/pci/ivtv/ivtv-driver.c > +++ b/drivers/media/pci/ivtv/ivtv-driver.c > @@ -1372,8 +1370,8 @@ static void ivtv_remove(struct pci_dev *pdev) > timer_shutdown_sync(&it...
回复sashiko-bot2026/09/05 17:40
> Convert cpufreq_schedutil to use kthread_create_worker() instead of > the deprecated kthread_run(kthread_worker_fn) pattern. The new API > sets worker->task before the worker starts. > > Signed-off-by: Bradley Morgan <brads@mainlining.org> https://sashiko.dev/#/patchset/cover.1788513591.git.brads@mainlining.org?part=...
回复sashiko-bot2026/09/05 17:40
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c > index 7107a0fb1e7bb..2cfc1f2900091 100644 > --- a/drivers/tty/serial/sc16is7xx.c > +++ b/drivers/tty/serial/sc16is7xx.c > @@ -1186,7 +1185,7 @@ static void sc16is7xx_shutdown(struct uart_port *port) > if (s->polling) > kthread_cancel_delay...
PATCHZhan Xusheng2026/09/05 16:50
https://lore.kernel.org/all/20260810142050.3828587-1-zhanxusheng@xiaomi.com/ https://lore.kernel.org/lkml/20260810081829.3149958-1-zhanxusheng@xiaomi.com/ changed diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 72236db67983..68600b76a3fd 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -21...
回复Thomas Gleixner2026/09/05 15:27
> On Fri, 04 Sep 2026 23:17:38 +0200 > Thomas Gleixner <tglx@kernel.org> wrote: > >> No. Scopes can be left by any valid termination mechanism. >> >> The only problematic case of leaving a scoped_guard() with goto is when >> the goto is actually implemented as an ASM goto. See the comment above >> arch_unsafe_get_user(...
回复Gabriele Monaco2026/09/05 13:17
>On Fri, Sep 4, 2026 at 5:16 PM Steven Rostedt <rostedt@goodmis.org> wrote: >> >> On Fri, 4 Sep 2026 16:48:55 -0700 >> Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: >> >> > On Fri, Sep 4, 2026 at 4:45 PM Steven Rostedt <rostedt@goodmis.org> wrote: >> > > >> > > On Fri, 04 Sep 2026 16:34:00 -0700 >> > > "Alex...
PATCHYury Norov2026/09/05 11:37
changed diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f78275192036..2155bad0e1ab 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3554,34 +3554,37 @@ EXPORT_SYMBOL_GPL(kick_process); - int nid = cpu_to_node(cpu); - const struct cpumask *nodemask = NULL; + int nid = IS_ENABLED(CONFIG_NUMA) ?...
回复SJ Park2026/09/05 08:39
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs combined > with for_each_process() loop in mm/memory-failure.c with > for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > mm/memory-failure.c | 16 ++++------------ > 1 file...
回复SJ Park2026/09/05 08:33
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined > with for_each_process() loop in mm/ksm.c with for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> On Fri, 4 Sep 2026 16:29:55 +0800 Ye Liu <ye.liu@linux.dev> wrote: Looks...
回复SJ Park2026/09/05 08:32
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs wrapping > for_each_process()/for_each_thread() loops with for_each_process_rcu() > and for_each_thread_rcu(), so that the RCU read-side critical section > is scoped to the loop body. > > No functional change. > > Signed-of...
回复Yury Norov2026/09/05 08:28
> Actively push out the current running task on a non-preferred CPU. Since > the task is currently running, a stopper thread must be queued to push the > task out. However, if the task is pinned only to non-preferred CPUs, > it will continue running there. This helps to maintain userspace > affinities, unlike CPU hotpl...
回复Alexei Starovoitov2026/09/05 08:22
> > On Fri, 4 Sep 2026 16:48:55 -0700 > Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: > > > On Fri, Sep 4, 2026 at 4:45 PM Steven Rostedt <rostedt@goodmis.org> wrote: > > > > > > On Fri, 04 Sep 2026 16:34:00 -0700 > > > "Alexei Starovoitov" <alexei.starovoitov@gmail.com> wrote: > > > > > > > bpf in 2022 was ...
回复Steven Rostedt2026/09/05 08:16
> On Fri, Sep 4, 2026 at 4:45 PM Steven Rostedt <rostedt@goodmis.org> wrote: > > > > On Fri, 04 Sep 2026 16:34:00 -0700 > > "Alexei Starovoitov" <alexei.starovoitov@gmail.com> wrote: > > > > > bpf in 2022 was surely less capable then it is today. > > > It took us 2 years of bpf core development to statisfy sched-ext de...
回复Alexei Starovoitov2026/09/05 07:49
> > On Fri, 04 Sep 2026 16:34:00 -0700 > "Alexei Starovoitov" <alexei.starovoitov@gmail.com> wrote: > > > bpf in 2022 was surely less capable then it is today. > > It took us 2 years of bpf core development to statisfy sched-ext demands > > and we're still adding new features for sched-ext needs. > > If you're trully w...
回复Steven Rostedt2026/09/05 07:45
> bpf in 2022 was surely less capable then it is today. > It took us 2 years of bpf core development to statisfy sched-ext demands > and we're still adding new features for sched-ext needs. > If you're trully willing to remove 90% of kernel/trace/rv/ and refactor > it into tiny shim where all of the core pieces are bpf...
回复Alexei Starovoitov2026/09/05 07:34
> On Fri, 4 Sep 2026 12:31:08 -0400 > Steven Rostedt <rostedt@goodmis.org> wrote: > >> In the beginning, Daniel Bristot looked into doing this with BPF and found >> issues with it. I do not recall what they were and unfortunately Daniel is >> no longer around to explain it. Maybe Gabriele knows what they were. > > IIRC...
回复Steven Rostedt2026/09/05 07:06
> No. Scopes can be left by any valid termination mechanism. > > The only problematic case of leaving a scoped_guard() with goto is when > the goto is actually implemented as an ASM goto. See the comment above > arch_unsafe_get_user() in linux/uaccess.h. On Fri, 04 Sep 2026 23:17:38 +0200 Thomas Gleixner <tglx@kernel.o...
回复Thomas Gleixner2026/09/05 05:20
> [Cc Miguel, Lyude, Alice, Gary] > > On Fri, Sep 04, 2026 at 03:26:40PM +0200, Thomas Gleixner wrote: >> After reverting the spinlock conversion and a lengthy discussion it's the >> best to confine the reference counted interrupt disable/enable mechanism to >> Rust which is the only user. >> >> This should become the ...
回复Thomas Gleixner2026/09/05 05:17
> On Fri, 4 Sep 2026 16:29:53 +0800 > Ye Liu <ye.liu@linux.dev> wrote: >> +#define for_each_thread_rcu(p, t) \ >> + scoped_guard(rcu) \ >> + __for_each_thread((p)->signal, t) >> + > > I would rename it to: *_rculock() > > as there are already *_rcu() list iterators that are used to be done within > an rcu locked region...
回复Bradley Morgan2026/09/05 05:14
>On Fri, 04 Sep 2026 16:56:30 +0100 Bradley Morgan wrote: >> On 4 September 2026 16:54:18 BST, Jakub Kicinski <kuba@kernel.org> >wrote: >> >On Fri, 4 Sep 2026 09:37:21 +0000 Bradley Morgan wrote: >> >> media: ivtv: convert to kthread_run_worker >> >> net: encx24j600: convert to kthread_run_worker >> >> tty: sc16is7xx: ...
回复Jakub Kicinski2026/09/05 05:10
> On 4 September 2026 16:54:18 BST, Jakub Kicinski <kuba@kernel.org> wrote: > >On Fri, 4 Sep 2026 09:37:21 +0000 Bradley Morgan wrote: > >> media: ivtv: convert to kthread_run_worker > >> net: encx24j600: convert to kthread_run_worker > >> tty: sc16is7xx: convert to kthread_run_worker > >> cpufreq: schedutil: convert t...
回复Tim Chen2026/09/05 04:53
> On Tue, Sep 01, 2026 at 01:42:58PM -0700, Tim Chen wrote: > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 8dff37059faf..84c068f1deec 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -1549,7 +1549,13 @@ static void account_llc_enqueue(struct rq *rq, struct task_struct ...
回复Tim Chen2026/09/05 04:24
> On Thu, Sep 03, 2026 at 02:30:25PM -0700, Tim Chen wrote: > > On Thu, 2026-09-03 at 20:41 +0800, Chen, Yu C wrote: > > [ ... ] > > > > But I also see that in task_tick_core(), the sum_exec_runtime is also > > > leveraged > > > to calculate the delta "wall time" via __entity_slice_used(): > > > se->sum_exec_runtime - ...
回复Tim Chen2026/09/05 04:15
> > Hi Tim, Chen Yu, > > Thanks for pointing out this separate issue and for the prototype. > > I tested the deadline-based calculation from the prototype with the > same proxy-execution and core-scheduling reproducer. The reproducer has > a FAIR donor proxy-executing a task on an SMT CPU while the sibling is > force-i...
回复Gregory Price2026/09/05 03:31
> @@ -4302,7 +4316,7 @@ static void task_numa_work(struct callback_head *work) > * VMA can cause others to become "permanently unaccessed" if a scan > * cycle is consumed entirely by the large VMA. > */ > - vma->numab_state->slow_only = false; > + vma->numab_state->slow_only = ro_file; > if (!vma_pids_forced && !vma_is...
回复Gregory Price2026/09/05 03:10
> /* > * Do not scan the VMA if task has not accessed it, unless no other > * VMA candidate exists. > + * > + * Force-scan only slow-tier folios when in tiering mode, as a large > + * VMA can cause others to become "permanently unaccessed" if a scan > + * cycle is consumed entirely by the large VMA. > */ > + vma->numab...
PATCHGregory Price2026/09/05 02:20
changed diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 990af0e45d69..5c5c80b17649 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4075,6 +4075,11 @@ static void reset_ptenuma_scan(struct task_struct *p) +static bool vma_is_ro_file(struct vm_area_struct *vma) +{ + return vma->vm_file && (vma...
PATCHGregory Price2026/09/05 02:20
changed diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 5413bd10fff2..d986fcab9c8f 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -803,6 +803,13 @@ struct vma_numab_state { + + /* + * Set by the scanner for the duration of a scan of this VMA when only + * folios on non-to...
PATCHGregory Price2026/09/05 02:20
task_numa_work() applies a series of VMA-level filters before it will mark a VMA for hint faults. Those filters were written when the hint fault was a socket-residency signal. Skipping a VMA only cost some resolution. Under memory tiering the hint fault is not a signal, it is the mechanism. A folio on the slow tier is ...
回复Steven Rostedt2026/09/05 01:23
> In the beginning, Daniel Bristot looked into doing this with BPF and found > issues with it. I do not recall what they were and unfortunately Daniel is > no longer around to explain it. Maybe Gabriele knows what they were. On Fri, 4 Sep 2026 12:31:08 -0400 Steven Rostedt <rostedt@goodmis.org> wrote: IIRC, Daniel even...
回复Tim Chen2026/09/05 01:17
> Proxy execution separates the scheduling context in rq->donor from the > execution context in rq->curr. sched_tick() invokes task_tick() for the > donor's scheduling class. > > task_tick_numa() operates on state associated with the task actually > executing, including its mm and NUMA work state. With proxy execution,...
回复Steven Rostedt2026/09/05 00:30
> You added a whole bunch of hardcoded "monitors". None of them were > necessary. The whole RV is imo a waste of kernel code. > All of that could have been done via existing bpf tracing functionality. > One can delete kernel/trace/rv and do the same thing with bpf. > So I'm strongly against bolting bpf to RV as yet ano...
回复Steven Rostedt2026/09/05 00:24
> From: Ye Liu <liuye@kylinos.cn> > > Introduce for_each_process_rcu(), for_each_thread_rcu() and > for_each_process_thread_rcu() macros that acquire the RCU read lock > before the iteration starts and release it when the loop is left, so > that the RCU read-side critical section is scoped to the loop body > instead of...
回复Chen Yu2026/09/05 00:24
> On Thu, 2026-09-03 at 20:41 +0800, Chen, Yu C wrote: > > But I also see that in task_tick_core(), the sum_exec_runtime is also > > leveraged > > to calculate the delta "wall time" via __entity_slice_used(): > > se->sum_exec_runtime - se->prev_sum_exec_runtime > > does it mean task_tick_core() also needs to be bring o...
回复Alexei Starovoitov2026/09/05 00:16
> On Thu, 3 Sep 2026 20:30:19 -0700 > Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: > >> > > On Wed, 2026-09-02 at 18:57 -0700, Alexei Starovoitov wrote: >> > > > I don't think bpf fits here. I haven't seen active use of RV and even less >> > > > so of any request from people who want this kind of programmab...
回复Chen Yu2026/09/05 00:06
> Proxy execution separates the scheduling context in rq->donor from the > execution context in rq->curr. sched_tick() invokes task_tick() for the > donor's scheduling class. > > task_tick_numa() operates on state associated with the task actually > executing, including its mm and NUMA work state. With proxy execution,...
回复Bradley Morgan2026/09/04 23:57
>On Fri, 4 Sep 2026 09:37:21 +0000 Bradley Morgan wrote: >> media: ivtv: convert to kthread_run_worker >> net: encx24j600: convert to kthread_run_worker >> tty: sc16is7xx: convert to kthread_run_worker >> cpufreq: schedutil: convert to kthread_create_worker > >Please send these 4 to appropriate subsystems > >> kthread:...
回复Jakub Kicinski2026/09/04 23:54
> media: ivtv: convert to kthread_run_worker > net: encx24j600: convert to kthread_run_worker > tty: sc16is7xx: convert to kthread_run_worker > cpufreq: schedutil: convert to kthread_create_worker > kthread: remove worker->task self assignment On Fri, 4 Sep 2026 09:37:21 +0000 Bradley Morgan wrote: Please send these 4 ...
回复Boqun Feng2026/09/04 23:25
> After reverting the spinlock conversion and a lengthy discussion it's the > best to confine the reference counted interrupt disable/enable mechanism to > Rust which is the only user. > > This should become the new norm, but that needs more thoughts and cleaning > up the confined usage in Rust at some point is way sim...
回复Günther Noack2026/09/04 22:17
> From: Ye Liu <liuye@kylinos.cn> > > Replace guard(rcu)() + for_each_thread() with for_each_thread_rcu(), > so that the RCU read-side critical section is scoped to the loop body. > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > security/landlock/tsync.c | 8 ++------ > 1 file changed, 2 in...
回复Günther Noack2026/09/04 22:14
> diff --git a/kernel/hung_task.c b/kernel/hung_task.c > index 6fcc94ce4ca9..76871f78497f 100644 > --- a/kernel/hung_task.c > +++ b/kernel/hung_task.c > @@ -337,9 +336,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) > hung_task_info(t, timeout, this_round_count); > } > } > - unlock: > - rcu_rea...
回复Hui Su2026/09/04 22:11
> On Thu, 2026-09-03 at 20:41 +0800, Chen, Yu C wrote: > > Hi Su, > > > > On 9/3/2026 12:11 PM, Hui Su wrote: > > > Proxy execution separates the scheduling context in rq->donor from the > > > execution context in rq->curr. sched_tick() invokes task_tick() for the > > > donor's scheduling class. > > > > > > task_tick_n...
PATCHThomas Gleixner2026/09/04 21:26
changed After reverting the spinlock conversion and a lengthy discussion it's the best to confine the reference counted interrupt disable/enable mechanism to Rust which is the only user. This should become the new norm, but that needs more thoughts and cleaning up the confined usage in Rust at some point is way simpler...
回复Thomas Gleixner2026/09/04 21:19
> On Tue, Sep 01, 2026 at 03:43:47PM +0200, Thomas Gleixner wrote: > static __always_inline void raw_local_irq_disable(void) > { > + /* > + * Assuming local_irq_{en,dis}able() always paired, then > + * local_irq_disable() should not be used inside an > + * local_interrupt_disable() critical section. Because the paired ...
PATCHThomas Gleixner2026/09/04 21:14
changed After reverting the spinlock conversion and a lengthy discussion it's the best to confine the reference counted interrupt disable/enable mechanism to Rust which is the only user. This should become the new norm, but that needs more thoughts and cleaning up the confined usage in Rust at some point is way simpler...
回复Justin Suess2026/09/04 20:21
> From: Ye Liu <liuye@kylinos.cn> > > Replace guard(rcu)() + for_each_thread() with for_each_thread_rcu(), > so that the RCU read-side critical section is scoped to the loop body. > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > security/landlock/tsync.c | 8 ++------ > 1 file changed, 2 in...
回复Steven Rostedt2026/09/04 19:43
> > > On Wed, 2026-09-02 at 18:57 -0700, Alexei Starovoitov wrote: > > > > I don't think bpf fits here. I haven't seen active use of RV and even less > > > > so of any request from people who want this kind of programmability. > > > > > > > > So Nack for now. Sorry. > > > > > Ok. > Please add > Nacked-by: Alexei Starov...
回复Tomas Glozar2026/09/04 19:23
> > I don't think bpf fits here. I haven't seen active use of RV and even less > so of any request from people who want this kind of programmability. > > So Nack for now. Sorry. > https://lore.kernel.org/linux-trace-kernel/20260827072400.45734-1-tobias.schaffner@siemens.com/T/#e8a8b21136a60ad7c8f67b07c66f71de0ec0c1075 ...
回复Michal Hocko2026/09/04 19:09
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined > with for_each_process() loop in lib/ with for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > lib/is_single_threaded.c | 5 +---- > 1 file changed, 1 insertion(+),...
回复Michal Hocko2026/09/04 19:06
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs combined > with for_each_process() and for_each_process_thread() loops in fs/ > with the for_each_*_rcu() macros. > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > fs/proc/base.c | 4 +--- > fs/r...
回复Michal Hocko2026/09/04 19:06
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() and guard(rcu) > pairs combined with for_each_process(), for_each_thread() and > for_each_process_thread() loops across kernel/ with the > for_each_*_rcu() macros. > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylino...
回复Michal Hocko2026/09/04 19:05
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs combined > with for_each_process() loop in mm/memory-failure.c with > for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > mm/memory-failure.c | 16 ++++------------ > 1 file...
回复Michal Hocko2026/09/04 19:04
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined > with for_each_process() loop in mm/ksm.c with for_each_process_rcu(). > > No functional change. > > Signed-off-by: Ye Liu <liuye@kylinos.cn> > --- > mm/ksm.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(...
回复Michal Hocko2026/09/04 19:04
> From: Ye Liu <liuye@kylinos.cn> > > Replace the manual rcu_read_lock()/rcu_read_unlock() pairs wrapping > for_each_process()/for_each_thread() loops with for_each_process_rcu() > and for_each_thread_rcu(), so that the RCU read-side critical section > is scoped to the loop body. > > No functional change. > > Signed-of...
回复Michal Hocko2026/09/04 19:03
> From: Ye Liu <liuye@kylinos.cn> > > Introduce for_each_process_rcu(), for_each_thread_rcu() and > for_each_process_thread_rcu() macros that acquire the RCU read lock > before the iteration starts and release it when the loop is left, so > that the RCU read-side critical section is scoped to the loop body > instead of...
回复Bradley Morgan2026/09/04 18:44
>Convert ivtv to use kthread_run_worker() instead of the deprecated >kthread_run(kthread_worker_fn) pattern. The new API sets worker->task >before the worker starts. > >Signed-off-by: Bradley Morgan <brads@mainlining.org> >--- > drivers/media/pci/ivtv/ivtv-driver.c | 14 ++++++-------- > drivers/media/pci/ivtv/ivtv-driv...
PATCHBradley Morgan2026/09/04 17:40
changed diff --git a/kernel/kthread.c b/kernel/kthread.c index 63beb59b7a3d..643407647e79 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -987,12 +987,10 @@ int kthread_worker_fn(void *worker_ptr) - /* - * FIXME: Update the check and remove the assignment when all kthread - * worker users are created using kthr...