[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x4938ovzo6n.fsf@segfault.boston.devel.redhat.com>
Date: Mon, 23 Sep 2013 09:02:08 -0400
From: Jeff Moyer <jmoyer@...hat.com>
To: Jan Kara <jack@...e.cz>
Cc: Jens Axboe <axboe@...nel.dk>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] blktrace: Send BLK_TN_PROCESS events to all running traces
Jan Kara <jack@...e.cz> writes:
> Currently each task sends BLK_TN_PROCESS event to the first traced
> device it interacts with after a new trace is started. When there are
> several traced devices and the task accesses more devices, this logic
> can result in BLK_TN_PROCESS being sent several times to some devices
> while it is never sent to other devices. Thus blkparse doesn't display
> command name when parsing some blktrace files.
>
> Fix the problem by sending BLK_TN_PROCESS event to all traced devices
> when a task interacts with any of them.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
[snip]
> @@ -229,16 +241,15 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
> goto record_it;
> }
>
> + if (unlikely(tsk->btrace_seq != blktrace_seq))
> + trace_note_tsk(tsk);
> +
> /*
> * A word about the locking here - we disable interrupts to reserve
> * some space in the relay per-cpu buffer, to prevent an irq
> * from coming in and stepping on our toes.
> */
> local_irq_save(flags);
> -
> - if (unlikely(tsk->btrace_seq != blktrace_seq))
> - trace_note_tsk(bt, tsk);
> -
> t = relay_reserve(bt->rchan, sizeof(*t) + pdu_len);
> if (t) {
> sequence = per_cpu_ptr(bt->sequence, cpu);
I don't think moving the call site was strictly necessary. That
wouldn't really change anything, though. I also think that this
simplistic approach is good enough.
Reviewed-by: Jeff Moyer <jmoyer@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists