Skip to content

Conversation

@github-actions
Copy link
Contributor

No description provided.

sdimitro and others added 2 commits July 21, 2020 17:39
On a system with more than 1 nodes per cache:
```
sdb> addr nr_node_ids | deref
(unsigned int)2
```

Before this patch:
```
sdb> spl_kmem_caches -s active_memory | head 1 | spl_kmem_caches
name                entry_size active_objs active_memory                    source total_memory util
------------------- ---------- ----------- ------------- ------------------------- ------------ ----
arc_buf_hdr_t_full         328     8956159         2.7GB  arc_buf_hdr_t_full[SLUB]        1.3GB  203
```
In the output above the SLUB helpers are only looking at the first
node of the kmem cache and undercount the amount of active objects
in the SLUB layer and thus reporting less total_memory. As a result
the SPL that explicitly tracks the counts of those allocations shows
the correct number of active objects resulting to the above
inconsistency where active_memory is more than total_memory and util%
is more than 100%.

After this patch:
```
sdb> spl_kmem_caches -s active_memory | head 1 | spl_kmem_caches
name                entry_size active_objs active_memory                    source total_memory util
------------------- ---------- ----------- ------------- ------------------------- ------------ ----
arc_buf_hdr_t_full         328     9250638         2.8GB  arc_buf_hdr_t_full[SLUB]        2.8GB   99
```
The behavior is corrected.
Slub helpers should be aware of multi-node kmem caches
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2020

Codecov Report

Merging #234 into 6.0/stage will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           6.0/stage     #234      +/-   ##
=============================================
+ Coverage      87.29%   87.35%   +0.05%     
=============================================
  Files             60       60              
  Lines           2456     2467      +11     
=============================================
+ Hits            2144     2155      +11     
  Misses           312      312              
Impacted Files Coverage Δ
sdb/commands/linux/internal/slub_helpers.py 98.54% <100.00%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3aded5...e5c1c96. Read the comment docs.

@prakashsurya prakashsurya merged commit 4dbd336 into 6.0/stage Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants