[PATCH] mm: optimize memory allocation

2021-04-12 Thread ultrachin
From: Chen Xiaoguang Check memory cgroup limit before allocating real memory. This may improve performance especially in slow path when memory allocation exceeds cgroup limitation. Signed-off-by: Chen Xiaoguang Signed-off-by: Chen He --- include/linux/memcontrol.h | 30 ++-

[PATCH V2] sched: pull tasks when CPU is about to run SCHED_IDLE tasks

2021-02-22 Thread ultrachin
From: Chen Xiaoguang In order to use the computer efficiently we usually deploy online tasks and offline tasks in the same computer. The online tasks are more important than the offline tasks and are latency sensitive we should make sure the online tasks preempt the offline tasks as soon as poss

[PATCH] sched: pull tasks when CPU is about to run SCHED_IDLE tasks

2020-12-23 Thread ultrachin
From: Chen Xiaoguang Before a CPU switches from running SCHED_NORMAL task to SCHED_IDLE task, trying to pull SCHED_NORMAL tasks from other CPU by doing load_balance first. Signed-off-by: Chen Xiaoguang Signed-off-by: Chen He --- kernel/sched/fair.c | 5 + 1 file changed, 5 insertions(+)