Re: [RFC PATCH 0/2] tracing: Teach FETCH_MTD_symbol to handle per-cpudata

From: Namhyung Kim
Date: Tue Nov 26 2013 - 19:37:31 EST


Hi Oleg,

(Please use my korg email address, otherwise I might not see - at least in time - the messages.)

2013-11-27 AM 2:43, Oleg Nesterov wrote:
On 11/26, Masami Hiramatsu wrote:
If the symbol is
percpu, it should be automatically translated to something like
FETCH_percpu, instead of such additional expression.

OK. Probably yes, it should be automatically translated, please
see the patches.

This doesn't allow to read the data from other CPUs, but at least
the changes are simple and this_cpu_ is better than the reading
from the obviously wrong address.

Agreed. I also like the automatic translation.


For the dynamic allocated per-cpu things, it is also good to give
a straight operation, like +10(percpu(%rdi)).

Probably yes, but this needs more changes and I am still not sure
this is really useful. And if we do this, we probably also need
to allow to read from other CPUs...

Right. This should be another story.

Do we also need something similar to user-space TLS?


Also, please do not be afraid to add fetch operation,

Well, this is what I am trying to avoid ;)

Well, it looks like a trade-off between code-size (or performance) and readability (or modularity). For this specific case, I don't have any preference though.

Thanks,
Namhyung
--
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/