Message ID | 20200513160223.7855-1-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blktrace: Report pid with note messages | expand |
> 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 >
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>
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.
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); }
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(-)