All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blktrace: Report pid with note messages
@ 2020-05-13 16:02 Jan Kara
  2020-05-13 22:04 ` Paolo Valente
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jan Kara @ 2020-05-13 16:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Paolo Valente, Jan Kara

Currently informational messages within block trace do not have PID
information of the process reporting the message included. With BFQ it
is sometimes useful to have the information and there's no good reason
to omit the information from the trace. So just fill in pid information
when generating note message.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 kernel/trace/blktrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index ca39dc3230cb..ea47f2084087 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -170,10 +170,10 @@ void __trace_note_message(struct blk_trace *bt, struct blkcg *blkcg,
 	if (!(blk_tracer_flags.val & TRACE_BLK_OPT_CGROUP))
 		blkcg = NULL;
 #ifdef CONFIG_BLK_CGROUP
-	trace_note(bt, 0, BLK_TN_MESSAGE, buf, n,
+	trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n,
 		   blkcg ? cgroup_id(blkcg->css.cgroup) : 1);
 #else
-	trace_note(bt, 0, BLK_TN_MESSAGE, buf, n, 0);
+	trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n, 0);
 #endif
 	local_irq_restore(flags);
 }
-- 
2.16.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktrace: Report pid with note messages
  2020-05-13 16:02 [PATCH] blktrace: Report pid with note messages Jan Kara
@ 2020-05-13 22:04 ` Paolo Valente
  2020-05-16  4:10 ` Chaitanya Kulkarni
  2020-05-16 20:30 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Valente @ 2020-05-13 22:04 UTC (permalink / raw)
  To: Jan Kara; +Cc: Jens Axboe, linux-block



> Il giorno 13 mag 2020, alle ore 18:02, Jan Kara <jack@suse.cz> ha scritto:
> 
> Currently informational messages within block trace do not have PID
> information of the process reporting the message included. With BFQ it
> is sometimes useful to have the information and there's no good reason
> to omit the information from the trace. So just fill in pid information
> when generating note message.
> 

Acked-by: Paolo Valente <paolo.valente@linaro.org>

Thank you!
Paolo

> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> kernel/trace/blktrace.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index ca39dc3230cb..ea47f2084087 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -170,10 +170,10 @@ void __trace_note_message(struct blk_trace *bt, struct blkcg *blkcg,
> 	if (!(blk_tracer_flags.val & TRACE_BLK_OPT_CGROUP))
> 		blkcg = NULL;
> #ifdef CONFIG_BLK_CGROUP
> -	trace_note(bt, 0, BLK_TN_MESSAGE, buf, n,
> +	trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n,
> 		   blkcg ? cgroup_id(blkcg->css.cgroup) : 1);
> #else
> -	trace_note(bt, 0, BLK_TN_MESSAGE, buf, n, 0);
> +	trace_note(bt, current->pid, BLK_TN_MESSAGE, buf, n, 0);
> #endif
> 	local_irq_restore(flags);
> }
> -- 
> 2.16.4
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktrace: Report pid with note messages
  2020-05-13 16:02 [PATCH] blktrace: Report pid with note messages Jan Kara
  2020-05-13 22:04 ` Paolo Valente
@ 2020-05-16  4:10 ` Chaitanya Kulkarni
  2020-05-16 20:30 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2020-05-16  4:10 UTC (permalink / raw)
  To: Jan Kara, Jens Axboe; +Cc: linux-block, Paolo Valente

On 05/13/2020 09:02 AM, Jan Kara wrote:
> Currently informational messages within block trace do not have PID
> information of the process reporting the message included. With BFQ it
> is sometimes useful to have the information and there's no good reason
> to omit the information from the trace. So just fill in pid information
> when generating note message.
>
> Signed-off-by: Jan Kara<jack@suse.cz>

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktrace: Report pid with note messages
  2020-05-13 16:02 [PATCH] blktrace: Report pid with note messages Jan Kara
  2020-05-13 22:04 ` Paolo Valente
  2020-05-16  4:10 ` Chaitanya Kulkarni
@ 2020-05-16 20:30 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-05-16 20:30 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-block, Paolo Valente

On 5/13/20 10:02 AM, Jan Kara wrote:
> Currently informational messages within block trace do not have PID
> information of the process reporting the message included. With BFQ it
> is sometimes useful to have the information and there's no good reason
> to omit the information from the trace. So just fill in pid information
> when generating note message.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-16 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 16:02 [PATCH] blktrace: Report pid with note messages Jan Kara
2020-05-13 22:04 ` Paolo Valente
2020-05-16  4:10 ` Chaitanya Kulkarni
2020-05-16 20:30 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.