lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250624030314.48808-1-henry.hj@antgroup.com>
Date: Tue, 24 Jun 2025 11:03:14 +0800
From: "Henry Huang" <henry.hj@...group.com>
To: tj@...nel.org
Cc:  <arighi@...dia.com>,
   <changwoo@...lia.com>,
  "Henry Huang" <henry.hj@...group.com>,
  "谈鉴锋" <henry.tjf@...group.com>,
   <linux-kernel@...r.kernel.org>,
   <sched-ext@...ts.linux.dev>,
   <void@...ifault.com>,
  "Yan Yan(cailing)" <yanyan.yan@...group.com>
Subject: Re: [PATCH v3] sched_ext: include SCX_OPS_TRACK_MIGRATION

On Mon, 23 Jun 2025 07:59:54 -1000, Tejun Heo wrote:
> It's rather odd to invoke runnable/quiescent on these transitions as the
> runnable state isn't actually changing and the events end up triggering for
> all the migration operations that SCX does internally.
>
> In the head message (BTW, if it's just a single patch, it'd be better to
> include all the context in the patch description), you said that this is
> needed to udpate percpu data structures when tasks migrate. Wouldn't you be
> able to do that by tracking whether the current CPU is different from the
> previous one from ops.running()?

We will traverse the per-CPU map information in ops.select_cpu() to select
the appropriate CPU. To reduce the competition for the rq spinlock, tasks are
likely to run on the CPU selected by ops.select_cpu().

However, I can think of two scenarios where passive migration may occur:
1. set_task_allowed_cpus
2. cpu_stop
There may also be some passive migration scenarios that we haven't thought of.
This could lead to incorrect information in the per-CPU map. Therefore,
we hope to track enqueue_task_scx and dequeue_task_scx to ensure that the
information in the per-CPU map is accurate.

-- 
Henry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ