]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, trace: fetch current cpu only once
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Jun 2016 10:18:24 +0000 (12:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jun 2016 09:54:40 +0000 (05:54 -0400)
commit31798bab91f7ca4f2d8857910d3c80cb5773536f
tree275cae8d173c2fdec0c95b9a797cb1ddad62f266
parent7552b4a4eaf407579b0604c20ecc211f0bf52ab2
bpf, trace: fetch current cpu only once

We currently have two invocations, which is unnecessary. Fetch it only
once and use the smp_processor_id() variant, so we also get preemption
checks along with it when DEBUG_PREEMPT is set.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/trace/bpf_trace.c