hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAQWPQ
-----------------------------------------
The sched_steal_node_limit parameter in cmdline is used to configure the number of numa nodes to enable the steal task feature. That is, if the configured value is less than the actual number of numa nodes, the feature will not be enabled. In a system with 2 numa nodes, there is no need to configure this parameter. Now we remove the default value 2 and directly obtain the actual number of numa nodes in the system.
Signed-off-by: Cheng Yu serein.chengyu@huawei.com --- kernel/sched/topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 1df0f8e345bd..84ae8708eda4 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1894,7 +1894,6 @@ static void init_numa_topology_type(void) #ifdef CONFIG_SCHED_STEAL DEFINE_STATIC_KEY_TRUE(sched_steal_allow); static int sched_steal_node_limit; -#define SCHED_STEAL_NODE_LIMIT_DEFAULT 2
static int __init steal_node_limit_setup(char *buf) { @@ -1909,7 +1908,7 @@ static void check_node_limit(void) int n = num_possible_nodes();
if (sched_steal_node_limit == 0) - sched_steal_node_limit = SCHED_STEAL_NODE_LIMIT_DEFAULT; + sched_steal_node_limit = n; if (n > sched_steal_node_limit) { static_branch_disable(&sched_steal_allow); pr_debug("Suppressing sched STEAL. To enable, reboot with sched_steal_node_limit=%d", n);