* [for-next][PATCH 0/3] ring-buffer: Some minor fixes
@ 2015-06-11 13:26 Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 1/3] ring-buffer-benchmark: Fix the wrong param in module_param Steven Rostedt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-06-11 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: 1240db6538c008ede745895272ddfe95efab0425
Wang Long (3):
ring-buffer-benchmark: Fix the wrong param in module_param
ring-buffer-benchmark: Fix the wrong type
ring-buffer-benchmark: Fix the wrong sched_priority of producer
----
kernel/trace/ring_buffer_benchmark.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [for-next][PATCH 1/3] ring-buffer-benchmark: Fix the wrong param in module_param
2015-06-11 13:26 [for-next][PATCH 0/3] ring-buffer: Some minor fixes Steven Rostedt
@ 2015-06-11 13:26 ` Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 2/3] ring-buffer-benchmark: Fix the wrong type Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 3/3] ring-buffer-benchmark: Fix the wrong sched_priority of producer Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-06-11 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Wang Long
[-- Attachment #1: 0001-ring-buffer-benchmark-Fix-the-wrong-param-in-module_.patch --]
[-- Type: text/plain, Size: 1699 bytes --]
From: Wang Long <long.wanglong@huawei.com>
The {producer|consumer}_{nice|fifo} parameters are integer
type, we should use 'int' as the second param in module_param.
For example(consumer_fifo):
the default value of consumer_fifo is -1.
Without this patch:
# cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo
4294967295
With this patch:
# cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo
-1
Link: http://lkml.kernel.org/r/1433923873-67712-1-git-send-email-long.wanglong@huawei.com
Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer_benchmark.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 13d945c0d03f..cdff7d3df902 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -46,16 +46,16 @@ static int consumer_nice = MAX_NICE;
static int producer_fifo = -1;
static int consumer_fifo = -1;
-module_param(producer_nice, uint, 0644);
+module_param(producer_nice, int, 0644);
MODULE_PARM_DESC(producer_nice, "nice prio for producer");
-module_param(consumer_nice, uint, 0644);
+module_param(consumer_nice, int, 0644);
MODULE_PARM_DESC(consumer_nice, "nice prio for consumer");
-module_param(producer_fifo, uint, 0644);
+module_param(producer_fifo, int, 0644);
MODULE_PARM_DESC(producer_fifo, "fifo prio for producer");
-module_param(consumer_fifo, uint, 0644);
+module_param(consumer_fifo, int, 0644);
MODULE_PARM_DESC(consumer_fifo, "fifo prio for consumer");
static int read_events;
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [for-next][PATCH 2/3] ring-buffer-benchmark: Fix the wrong type
2015-06-11 13:26 [for-next][PATCH 0/3] ring-buffer: Some minor fixes Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 1/3] ring-buffer-benchmark: Fix the wrong param in module_param Steven Rostedt
@ 2015-06-11 13:26 ` Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 3/3] ring-buffer-benchmark: Fix the wrong sched_priority of producer Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-06-11 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Wang Long
[-- Attachment #1: 0002-ring-buffer-benchmark-Fix-the-wrong-type.patch --]
[-- Type: text/plain, Size: 1228 bytes --]
From: Wang Long <long.wanglong@huawei.com>
The macro 'module_param' shows that the type of the
variable disable_reader and write_iteration is unsigned
integer. so, we change their type form int to unsigned int.
Link: http://lkml.kernel.org/r/1433923927-67782-1-git-send-email-long.wanglong@huawei.com
Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer_benchmark.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index cdff7d3df902..2430563cf2bc 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -32,11 +32,11 @@ static struct task_struct *producer;
static struct task_struct *consumer;
static unsigned long read;
-static int disable_reader;
+static unsigned int disable_reader;
module_param(disable_reader, uint, 0644);
MODULE_PARM_DESC(disable_reader, "only run producer");
-static int write_iteration = 50;
+static unsigned int write_iteration = 50;
module_param(write_iteration, uint, 0644);
MODULE_PARM_DESC(write_iteration, "# of writes between timestamp readings");
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [for-next][PATCH 3/3] ring-buffer-benchmark: Fix the wrong sched_priority of producer
2015-06-11 13:26 [for-next][PATCH 0/3] ring-buffer: Some minor fixes Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 1/3] ring-buffer-benchmark: Fix the wrong param in module_param Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 2/3] ring-buffer-benchmark: Fix the wrong type Steven Rostedt
@ 2015-06-11 13:26 ` Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-06-11 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, stable, Wang Long
[-- Attachment #1: 0003-ring-buffer-benchmark-Fix-the-wrong-sched_priority-o.patch --]
[-- Type: text/plain, Size: 954 bytes --]
From: Wang Long <long.wanglong@huawei.com>
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@huawei.com
Cc: stable@vger.kernel.org # 2.6.33+
Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer_benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 2430563cf2bc..61b933bfd2b8 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, ¶m);
} else
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-11 13:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 13:26 [for-next][PATCH 0/3] ring-buffer: Some minor fixes Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 1/3] ring-buffer-benchmark: Fix the wrong param in module_param Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 2/3] ring-buffer-benchmark: Fix the wrong type Steven Rostedt
2015-06-11 13:26 ` [for-next][PATCH 3/3] ring-buffer-benchmark: Fix the wrong sched_priority of producer Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®