Skip to contentSkip to conversation

ring-buffer-benchmark: Fix the wrong sched_priority of producer

PATCH Applied Wang Long 2 participants 2 messages Jun 10, 2015

Subsystems (2)
lore
Share & tools
lore

Wang Long

author
#0 lore raw

PATCH 1/1 ring-buffer-benchmark: Fix the wrong sched_priority of producer

The producer should be used producer_fifo as its sched_priority, so correct it.

---
 kernel/trace/ring_buffer_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer_benchmark.c +1 -1
index 13d945c..1b28df2 100644
@@ -450,7 +450,7 @@ static int __init ring_buffer_benchmark_init(void)
 
 	if (producer_fifo >= 0) {
 		struct sched_param param = {
-			.sched_priority = consumer_fifo
+			.sched_priority = producer_fifo
 		};
 		sched_setscheduler(producer, SCHED_FIFO, &param);
 	} else
Signature · 1 line
1.8.3.4
maintainer Applied
#1 lore raw
Quoted 4 lines · On Wed, 10 Jun 2015 08:12:37 +0000 Wang Long <[email protected]> wrote:

The producer should be used producer_fifo as its sched_priority, so correct it.

I also add this for stable 2.6.33+

Thanks, applied.

-- Steve

Quoted 17 lines
---
 kernel/trace/ring_buffer_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer_benchmark.c +1 -1
index 13d945c..1b28df2 100644
@@ -450,7 +450,7 @@ static int __init ring_buffer_benchmark_init(void)
 
 	if (producer_fifo >= 0) {
 		struct sched_param param = {
-			.sched_priority = consumer_fifo
+			.sched_priority = producer_fifo
 		};
 		sched_setscheduler(producer, SCHED_FIFO, &param);
 	} else