* [ltt-dev] [PATCH] ltt-relay: fix cpu offline problem
@ 2008-12-08 3:17 Lai Jiangshan
2008-12-09 16:23 ` Mathieu Desnoyers
0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2008-12-08 3:17 UTC (permalink / raw)
ltt_relay_open() will close allocated buffers when failed.
but if cpu offlined, some buffer will not be closed.
this patch fixed it.
Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
--- linux-2.6.27.7-lttng-0.61.orig/ltt/ltt-relay-alloc.c 2008-12-03 16:25:21.000000000 +0800
+++ linux-2.6.27.7-lttng-0.61/ltt/ltt-relay-alloc.c 2008-12-08 11:12:33.000000000 +0800
@@ -385,10 +385,9 @@ struct rchan *ltt_relay_open(const char
return chan;
free_bufs:
- for_each_online_cpu(i) {
- if (!chan->buf[i])
- break;
- relay_close_buf(chan->buf[i]);
+ for_each_possible_cpu(i) {
+ if (chan->buf[i])
+ relay_close_buf(chan->buf[i]);
}
kref_put(&chan->kref, relay_destroy_channel);
^ permalink raw reply [flat|nested] 2+ messages in thread* [ltt-dev] [PATCH] ltt-relay: fix cpu offline problem
2008-12-08 3:17 [ltt-dev] [PATCH] ltt-relay: fix cpu offline problem Lai Jiangshan
@ 2008-12-09 16:23 ` Mathieu Desnoyers
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2008-12-09 16:23 UTC (permalink / raw)
* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> ltt_relay_open() will close allocated buffers when failed.
> but if cpu offlined, some buffer will not be closed.
> this patch fixed it.
>
Hi Lai,
You are right. Thanks for the patch. I'll integrate in the the next
LTTng release.
I'll also forward this to Tom Zanussi, because kernel/relay.c also needs
to be fixed. I don't use it anymore since I forked a core part of it
into ltt-relay-alloc.c.
Regards,
Mathieu
> Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
> ---
> --- linux-2.6.27.7-lttng-0.61.orig/ltt/ltt-relay-alloc.c 2008-12-03 16:25:21.000000000 +0800
> +++ linux-2.6.27.7-lttng-0.61/ltt/ltt-relay-alloc.c 2008-12-08 11:12:33.000000000 +0800
> @@ -385,10 +385,9 @@ struct rchan *ltt_relay_open(const char
> return chan;
>
> free_bufs:
> - for_each_online_cpu(i) {
> - if (!chan->buf[i])
> - break;
> - relay_close_buf(chan->buf[i]);
> + for_each_possible_cpu(i) {
> + if (chan->buf[i])
> + relay_close_buf(chan->buf[i]);
> }
>
> kref_put(&chan->kref, relay_destroy_channel);
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-09 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 3:17 [ltt-dev] [PATCH] ltt-relay: fix cpu offline problem Lai Jiangshan
2008-12-09 16:23 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox