[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] mm/vmscan.c: only adjust related kswapd cpu affinity when online cpu
On Fri 14-02-20 15:33:20, Wei Yang wrote:
> When onlining a cpu, kswapd_cpu_online() is called to adjust kswapd cpu
> affinity.
> Current routine does like this:
> a) Iterate all the numa node
> b) Adjust cpu affinity when node has an online cpu
> For a) this is not necessary, since the particular online cpu belongs to
> a particular numa node. So it is not necessary to iterate on every nodes
> on the system. This new onlined cpu just affect kswapd cpu affinity of
> this particular node.
> For b) several cpumask operation is used to check whether the node has
> an online CPU. Since at this point we are sure one of our CPU onlined,
> we can set the cpu affinity directly to current cpumask_of_node().
> This patch simplifies the logic by set cpu affinity of the affected
> kswapd.

How have you tested this patch?

Also this is an old code and quite convoluted but does it still work as
inteded? I mean, I do not see any cpu offline callback to reduce the
cpu mask as all the CPUs for the given node go offline? Wouldn't the
scheduler simply go and fallback to no affinity if that happens?
In other words what is the value of kswapd_cpu_online in the first
Michal Hocko

 \ /
  Last update: 2020-02-14 09:51    [W:0.099 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site