Skip to content

Commit

Permalink
Update ABD stats for linear page Linux
Browse files Browse the repository at this point in the history
a10e552 updated abd_free_linear_page() to no longer call
abd_update_scatter_stat(). This meant that linear pages that were not
attached to Direct I/O requests were not doing waste accounting for the
ARC. This led to performance issues due to incorrect ARC accounting that
resulted in 100% of CPU time being spent in arc_evict() during prolonged
I/O workloads with the ARC.

The call to abd_update_scatter_stats() is now conditionally called in
abd_free_linear_page() when the ABD is not from a Direct I/O request.

Reviewed-by: Mark Maybee <[email protected]>
Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Brian Atkinson <[email protected]>
Closes #16729
  • Loading branch information
bwatkinson authored Nov 7, 2024
1 parent 5945676 commit 187f931
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/os/linux/zfs/abd_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ abd_free_linear_page(abd_t *abd)
/* When backed by user page unmap it */
if (abd_is_from_pages(abd))
zfs_kunmap(sg_page(sg));
else
abd_update_scatter_stats(abd, ABDSTAT_DECR);

abd->abd_flags &= ~ABD_FLAG_LINEAR;
abd->abd_flags &= ~ABD_FLAG_LINEAR_PAGE;
Expand Down

0 comments on commit 187f931

Please sign in to comment.