Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#6446 closed enhancement (fixed)

kmemtrace userspace tool package

Reported by: acoul <alex at> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version:
Keywords: Cc:


kmemtrace helps kernel developers figure out two things:

1) how different allocators (SLAB, SLUB etc.) perform
2) how kernel code allocates memory and how much

To do this, we trace every allocation and export information to the userspace through the relay interface. We export things such as the umber of requested bytes, the number of bytes actually allocated i.e. including internal fragmentation), whether this is a slab llocation or a plain kmalloc() and so on.

The actual analysis is performed by a userspace tool (see section II for details on where to get it from). It logs the data exported y the kernel, processes it and (as of writing this) can provide the following information:

- the total amount of memory allocated and fragmentation per all-site

- the amount of memory allocated and fragmentation per allocation 

- total memory allocated and fragmentation in the collected dataset 

- number of cross-CPU allocation and frees (makes sense in NUMA environments)

Moreover, it can potentially find inconsistent and erroneous behavior in kernel code, such as using slab free functions on malloc'ed memory or allocating less memory than requested (but not truly failed allocations).

kmemtrace also makes provisions for tracing on some arch and analyzing the data on another.

Attachments (1)

kmemtrace-user.patch (1.9 KB) - added by acoul <alex at> 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by acoul <alex at>

comment:1 Changed 8 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Added in r19024, thanks!

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.