[GIT PULL] ring-buffer: Fix for module parameter of producer in ring_buffer_benchmark

From: Steven Rostedt
Date: Thu Jun 11 2015 - 10:12:56 EST



Linus,

Wang Long fixed a minor bug in the module parameter for the
ring buffer benchmark, where the produce_fifo was being ignored
and the producer thread's priority was being set with the consumer_fifo
parameter.

Note, this commit is in my queue for the 4.2 merge window. I realized
that I had marked this fix for stable, and I know you prefer to have
stable fixes sent to you even if it's late in the rc releases. This is
a minor fix but a fix that should go to stable anyway. It's just the
ring_buffer_benchmark module uses the consumer_fifo parameter to decide
the producer's priority, and the producer_fifo parameter is ignored.
This isn't a major bug as I've always had the two priorities the same
and that's why I never noticed it.

Feel free to pull this, or if you want, you can wait till it goes in
via the merge window. It's currently the last patch of my queue, so I
can still take it out if you decide to pull it in now.


Please pull the latest trace-rb-bm-fix-4.1-rc7 tree, which can be found at:


git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-rb-bm-fix-4.1-rc7

Tag SHA1: 29ac96b409bd93b15bb00bf4063f9bf573f6b3b7
Head SHA1: 108029323910c5dd1ef8fa2d10da1ce5fbce6e12


Wang Long (1):
ring-buffer-benchmark: Fix the wrong sched_priority of producer

----
kernel/trace/ring_buffer_benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 108029323910c5dd1ef8fa2d10da1ce5fbce6e12
Author: Wang Long <long.wanglong@xxxxxxxxxx>
Date: Wed Jun 10 08:12:37 2015 +0000

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

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

Link: http://lkml.kernel.org/r/1433923957-67842-1-git-send-email-long.wanglong@xxxxxxxxxx

Cc: stable@xxxxxxxxxxxxxxx # 2.6.33+
Signed-off-by: Wang Long <long.wanglong@xxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 13d945c0d03f..1b28df2d9104 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/