[PATCH bpf-next] bpf: align struct bpf_prog_stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not risk spanning these small structures on two cache lines.

Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
---
 include/linux/bpf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 5b9d2233860654512da6ff5ec8bf56f2343ed722..282e28bf41ec627cad63c6b5bc3f439dc5f58f56 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -363,7 +363,7 @@ struct bpf_prog_stats {
 	u64 cnt;
 	u64 nsecs;
 	struct u64_stats_sync syncp;
-};
+} __aligned(2 * sizeof(u64));
 
 struct bpf_prog_aux {
 	atomic_t refcnt;
-- 
2.23.0.700.g56cf767bdb-goog




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux