mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
trace doc: convert trace/events-kmem.txt to rst format
This converts the plain text documentation to reStructuredText format and add it into Sphinx TOC tree. No essential content change. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Changbin Du <changbin.du@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
73d9812781
commit
3cdd868ec6
|
@ -1,22 +1,26 @@
|
||||||
Subsystem Trace Points: kmem
|
============================
|
||||||
|
Subsystem Trace Points: kmem
|
||||||
|
============================
|
||||||
|
|
||||||
The kmem tracing system captures events related to object and page allocation
|
The kmem tracing system captures events related to object and page allocation
|
||||||
within the kernel. Broadly speaking there are five major subheadings.
|
within the kernel. Broadly speaking there are five major subheadings.
|
||||||
|
|
||||||
o Slab allocation of small objects of unknown type (kmalloc)
|
- Slab allocation of small objects of unknown type (kmalloc)
|
||||||
o Slab allocation of small objects of known type
|
- Slab allocation of small objects of known type
|
||||||
o Page allocation
|
- Page allocation
|
||||||
o Per-CPU Allocator Activity
|
- Per-CPU Allocator Activity
|
||||||
o External Fragmentation
|
- External Fragmentation
|
||||||
|
|
||||||
This document describes what each of the tracepoints is and why they
|
This document describes what each of the tracepoints is and why they
|
||||||
might be useful.
|
might be useful.
|
||||||
|
|
||||||
1. Slab allocation of small objects of unknown type
|
1. Slab allocation of small objects of unknown type
|
||||||
===================================================
|
===================================================
|
||||||
kmalloc call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s
|
::
|
||||||
kmalloc_node call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d
|
|
||||||
kfree call_site=%lx ptr=%p
|
kmalloc call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s
|
||||||
|
kmalloc_node call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d
|
||||||
|
kfree call_site=%lx ptr=%p
|
||||||
|
|
||||||
Heavy activity for these events may indicate that a specific cache is
|
Heavy activity for these events may indicate that a specific cache is
|
||||||
justified, particularly if kmalloc slab pages are getting significantly
|
justified, particularly if kmalloc slab pages are getting significantly
|
||||||
|
@ -27,9 +31,11 @@ the allocation sites were.
|
||||||
|
|
||||||
2. Slab allocation of small objects of known type
|
2. Slab allocation of small objects of known type
|
||||||
=================================================
|
=================================================
|
||||||
kmem_cache_alloc call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s
|
::
|
||||||
kmem_cache_alloc_node call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d
|
|
||||||
kmem_cache_free call_site=%lx ptr=%p
|
kmem_cache_alloc call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s
|
||||||
|
kmem_cache_alloc_node call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d
|
||||||
|
kmem_cache_free call_site=%lx ptr=%p
|
||||||
|
|
||||||
These events are similar in usage to the kmalloc-related events except that
|
These events are similar in usage to the kmalloc-related events except that
|
||||||
it is likely easier to pin the event down to a specific cache. At the time
|
it is likely easier to pin the event down to a specific cache. At the time
|
||||||
|
@ -38,10 +44,12 @@ but the call_site can usually be used to extrapolate that information.
|
||||||
|
|
||||||
3. Page allocation
|
3. Page allocation
|
||||||
==================
|
==================
|
||||||
mm_page_alloc page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s
|
::
|
||||||
mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d
|
|
||||||
mm_page_free page=%p pfn=%lu order=%d
|
mm_page_alloc page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s
|
||||||
mm_page_free_batched page=%p pfn=%lu order=%d cold=%d
|
mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d
|
||||||
|
mm_page_free page=%p pfn=%lu order=%d
|
||||||
|
mm_page_free_batched page=%p pfn=%lu order=%d cold=%d
|
||||||
|
|
||||||
These four events deal with page allocation and freeing. mm_page_alloc is
|
These four events deal with page allocation and freeing. mm_page_alloc is
|
||||||
a simple indicator of page allocator activity. Pages may be allocated from
|
a simple indicator of page allocator activity. Pages may be allocated from
|
||||||
|
@ -65,8 +73,10 @@ contention on the zone->lru_lock.
|
||||||
|
|
||||||
4. Per-CPU Allocator Activity
|
4. Per-CPU Allocator Activity
|
||||||
=============================
|
=============================
|
||||||
mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d
|
::
|
||||||
mm_page_pcpu_drain page=%p pfn=%lu order=%d cpu=%d migratetype=%d
|
|
||||||
|
mm_page_alloc_zone_locked page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d
|
||||||
|
mm_page_pcpu_drain page=%p pfn=%lu order=%d cpu=%d migratetype=%d
|
||||||
|
|
||||||
In front of the page allocator is a per-cpu page allocator. It exists only
|
In front of the page allocator is a per-cpu page allocator. It exists only
|
||||||
for order-0 pages, reduces contention on the zone->lock and reduces the
|
for order-0 pages, reduces contention on the zone->lock and reduces the
|
||||||
|
@ -92,7 +102,9 @@ can be allocated and freed on the same CPU through some algorithm change.
|
||||||
|
|
||||||
5. External Fragmentation
|
5. External Fragmentation
|
||||||
=========================
|
=========================
|
||||||
mm_page_alloc_extfrag page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d
|
::
|
||||||
|
|
||||||
|
mm_page_alloc_extfrag page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d
|
||||||
|
|
||||||
External fragmentation affects whether a high-order allocation will be
|
External fragmentation affects whether a high-order allocation will be
|
||||||
successful or not. For some types of hardware, this is important although
|
successful or not. For some types of hardware, this is important although
|
|
@ -13,3 +13,4 @@ Linux Tracing Technologies
|
||||||
uprobetracer
|
uprobetracer
|
||||||
tracepoints
|
tracepoints
|
||||||
events
|
events
|
||||||
|
events-kmem
|
||||||
|
|
Loading…
Reference in New Issue
Block a user