Skip to content

sched,numa: cap pte scanning overhead to 3% of run time

[email protected] lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched,numa: fix math underflow in task_tick_numakernel/sched/fair.c+1 -10 replies
2/2sched,numa: cap pte scanning overhead to 3% of run timekernel/sched/fair.c+12 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchJan Stancek
1/2Reported-and-tested-by
2/2Reported-and-tested-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] sched,numa: cap pte scanning overhead to 3% of run time

Jan Stancek identified an LTP stress test causing trouble with the NUMA balancing code. The test forks off enough 3GB sized tasks to fill up 80% of system memory on a system with 12TB RAM. That results in over 2000 tasks allocating and touching memory simultaneously.

The NUMA balancing code causes each task to scan a certain number of PTEs every 10ms. Due to the large number of tasks on the system, and the large amount of memory in each process, it may take 10ms for each task to finish its PTE scan.

Meanwhile, the NUMA code only tries to ensure each task has used a few (2-3) ms of CPU time in-between invocations of task_numa_work.

On a system that overloaded, we end up spending essentially all of our CPU time in task_numa_work, and the tasks make very little progress.

Allocating all the memory can take several hours.

With these patches, the CPU time spent in task_numa_work is limited to around 3% of run time, and the test case completes in minutes.