Skip to contentSkip to conversation

delayacct-fix-incomplete-disable-operation-when-switch-enable-to-disable.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 20, 2022

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: delayacct: fix incomplete disable operation when switch enable to disable
has been removed from the -mm tree. Its filename was
delayacct-fix-incomplete-disable-operation-when-switch-enable-to-disable.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yang Yang <[email protected]>
Subject: delayacct: fix incomplete disable operation when switch enable to disable

When a task is created after delayacct is enabled, kernel will do all the delay accountings for that task. The problems is if user disables delayacct by set /proc/sys/kernel/task_delayacct to zero, only blkio delay accounting is disabled.

Now disable all the kinds of delay accountings when /proc/sys/kernel/task_delayacct sets to zero.

---

 include/linux/delayacct.h |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
include/linux/delayacct.h renamed from include/linux/delayacct.h~delayacct-fix-incomplete-disable-operation-when-switch-enable-to-disable +18 -0
@@ -131,36 +131,54 @@ static inline __u64 delayacct_blkio_tick
 
 static inline void delayacct_freepages_start(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_freepages_start();
 }
 
 static inline void delayacct_freepages_end(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_freepages_end();
 }
 
 static inline void delayacct_thrashing_start(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_thrashing_start();
 }
 
 static inline void delayacct_thrashing_end(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_thrashing_end();
 }
 
 static inline void delayacct_swapin_start(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_swapin_start();
 }
 
 static inline void delayacct_swapin_end(void)
 {
+	if (!static_branch_unlikely(&delayacct_key))
+		return;
+
 	if (current->delays)
 		__delayacct_swapin_end();
 }

_

Patches currently in -mm which might be from [email protected] are