Re: [PATCH 1/3] ftrace: prevent freeing of all failed updates

From: Steven Rostedt
Date: Mon Jun 02 2008 - 14:02:40 EST




On Sun, 1 Jun 2008, Abhishek Sagar wrote:
5B> @@ -611,18 +612,33 @@ static int __ftrace_update_code(void *ignore)
>
> /* No locks needed, the machine is stopped! */
> for (i = 0; i < FTRACE_HASHSIZE; i++) {
> - if (hlist_empty(&ftrace_hash[i]))
> - continue;
> + /* all CPUS are stopped, we are safe to modify code */
> + hlist_for_each_entry_safe(p, t, n, &ftrace_hash[i], node) {
> + /* Skip over failed records which have not been
> + * freed. */
> + if (p->flags & FTRACE_FL_FAILED)
> + continue;
>
> - head = ftrace_hash[i];
> - INIT_HLIST_HEAD(&ftrace_hash[i]);
> + /* Unconverted records are always at the head of the
> + * hash bucket. Once we encounter a converted record,
> + * simply skip over to the next bucket. Saves ftraced
> + * some processor cycles (ftrace does its bid for
> + * global warming :-p ). */
> + if (p->flags & (FTRACE_FL_CONVERTED))
> + break;

If we unload a module and reload it, will it ever get converted again?

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/