Skip to content

Commit c6202ad

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
mm/vmscan: Adjust system_state checks
To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state check in kswapd_run() to handle the extra states. Tested-by: Mark Rutland <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Steven Rostedt (VMware) <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent ff48cd2 commit c6202ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/vmscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3652,7 +3652,7 @@ int kswapd_run(int nid)
36523652
pgdat->kswapd = kthread_run(kswapd, pgdat, "kswapd%d", nid);
36533653
if (IS_ERR(pgdat->kswapd)) {
36543654
/* failure at boot is fatal */
3655-
BUG_ON(system_state == SYSTEM_BOOTING);
3655+
BUG_ON(system_state < SYSTEM_RUNNING);
36563656
pr_err("Failed to start kswapd on node %d\n", nid);
36573657
ret = PTR_ERR(pgdat->kswapd);
36583658
pgdat->kswapd = NULL;

0 commit comments

Comments
 (0)