perf/core: Make sysctl_perf_cpu_time_max_percent conform to documentation
Markus reported that 0 should also disable the throttling we per
Documentation/sysctl/kernel.txt.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 91a612eea9 ("perf/core: Fix dynamic interrupt throttle")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									e1089602a3
								
							
						
					
					
						commit
						b303e7c15d
					
				| @ -412,7 +412,8 @@ int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, | ||||
| 	if (ret || !write) | ||||
| 		return ret; | ||||
| 
 | ||||
| 	if (sysctl_perf_cpu_time_max_percent == 100) { | ||||
| 	if (sysctl_perf_cpu_time_max_percent == 100 || | ||||
| 	    sysctl_perf_cpu_time_max_percent == 0) { | ||||
| 		printk(KERN_WARNING | ||||
| 		       "perf: Dynamic interrupt throttling disabled, can hang your system!\n"); | ||||
| 		WRITE_ONCE(perf_sample_allowed_ns, 0); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user