forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/…
…git/tj/percpu Pull percpu updates from Tejun Heo: "These are the percpu changes for the v4.13-rc1 merge window. There are a couple visibility related changes - tracepoints and allocator stats through debugfs, along with __ro_after_init markings and a cosmetic rename in percpu_counter. Please note that the simple O(#elements_in_the_chunk) area allocator used by percpu allocator is again showing scalability issues, primarily with bpf allocating and freeing large number of counters. Dennis is working on the replacement allocator and the percpu allocator will be seeing increased churns in the coming cycles" * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix static checker warnings in pcpu_destroy_chunk percpu: fix early calls for spinlock in pcpu_stats percpu: resolve err may not be initialized in pcpu_alloc percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch percpu: add tracepoint support for percpu memory percpu: expose statistics about percpu memory via debugfs percpu: migrate percpu data structures to internal header percpu: add missing lockdep_assert_held to func pcpu_free_area mark most percpu globals as __ro_after_init
- Loading branch information
Showing
19 changed files
with
621 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM percpu | ||
|
||
#if !defined(_TRACE_PERCPU_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_PERCPU_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
TRACE_EVENT(percpu_alloc_percpu, | ||
|
||
TP_PROTO(bool reserved, bool is_atomic, size_t size, | ||
size_t align, void *base_addr, int off, void __percpu *ptr), | ||
|
||
TP_ARGS(reserved, is_atomic, size, align, base_addr, off, ptr), | ||
|
||
TP_STRUCT__entry( | ||
__field( bool, reserved ) | ||
__field( bool, is_atomic ) | ||
__field( size_t, size ) | ||
__field( size_t, align ) | ||
__field( void *, base_addr ) | ||
__field( int, off ) | ||
__field( void __percpu *, ptr ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->reserved = reserved; | ||
__entry->is_atomic = is_atomic; | ||
__entry->size = size; | ||
__entry->align = align; | ||
__entry->base_addr = base_addr; | ||
__entry->off = off; | ||
__entry->ptr = ptr; | ||
), | ||
|
||
TP_printk("reserved=%d is_atomic=%d size=%zu align=%zu base_addr=%p off=%d ptr=%p", | ||
__entry->reserved, __entry->is_atomic, | ||
__entry->size, __entry->align, | ||
__entry->base_addr, __entry->off, __entry->ptr) | ||
); | ||
|
||
TRACE_EVENT(percpu_free_percpu, | ||
|
||
TP_PROTO(void *base_addr, int off, void __percpu *ptr), | ||
|
||
TP_ARGS(base_addr, off, ptr), | ||
|
||
TP_STRUCT__entry( | ||
__field( void *, base_addr ) | ||
__field( int, off ) | ||
__field( void __percpu *, ptr ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->base_addr = base_addr; | ||
__entry->off = off; | ||
__entry->ptr = ptr; | ||
), | ||
|
||
TP_printk("base_addr=%p off=%d ptr=%p", | ||
__entry->base_addr, __entry->off, __entry->ptr) | ||
); | ||
|
||
TRACE_EVENT(percpu_alloc_percpu_fail, | ||
|
||
TP_PROTO(bool reserved, bool is_atomic, size_t size, size_t align), | ||
|
||
TP_ARGS(reserved, is_atomic, size, align), | ||
|
||
TP_STRUCT__entry( | ||
__field( bool, reserved ) | ||
__field( bool, is_atomic ) | ||
__field( size_t, size ) | ||
__field( size_t, align ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->reserved = reserved; | ||
__entry->is_atomic = is_atomic; | ||
__entry->size = size; | ||
__entry->align = align; | ||
), | ||
|
||
TP_printk("reserved=%d is_atomic=%d size=%zu align=%zu", | ||
__entry->reserved, __entry->is_atomic, | ||
__entry->size, __entry->align) | ||
); | ||
|
||
TRACE_EVENT(percpu_create_chunk, | ||
|
||
TP_PROTO(void *base_addr), | ||
|
||
TP_ARGS(base_addr), | ||
|
||
TP_STRUCT__entry( | ||
__field( void *, base_addr ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->base_addr = base_addr; | ||
), | ||
|
||
TP_printk("base_addr=%p", __entry->base_addr) | ||
); | ||
|
||
TRACE_EVENT(percpu_destroy_chunk, | ||
|
||
TP_PROTO(void *base_addr), | ||
|
||
TP_ARGS(base_addr), | ||
|
||
TP_STRUCT__entry( | ||
__field( void *, base_addr ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->base_addr = base_addr; | ||
), | ||
|
||
TP_printk("base_addr=%p", __entry->base_addr) | ||
); | ||
|
||
#endif /* _TRACE_PERCPU_H */ | ||
|
||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.