[LU-12394] lctl get_param llite.lfs*.extents_stats only displays first two buckets Created: 05/Jun/19  Updated: 12/Sep/19  Resolved: 21/Aug/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0, Lustre 2.12.3

Type: Bug Priority: Minor
Reporter: Patrick Farrell (Inactive) Assignee: Patrick Farrell (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

ll_extent_stats is broken on recent versions, displaying on the 0-4K and 4K - 8K buckets:

lctl get_param llite.*.extents_stats
llite.[...].extents_stats=
snapshot_time:         1559766954.651554186 (secs.nsecs)
                               read       |                write
      extents            calls    % cum%  |          calls    % cum%
   0K -    4K :              0    0    0  |              0    0    0
   4K -    8K :              0    0    0  |         207590  100  100 

This was broken in:

commit adb5aca3d67380078c4bd35c74651a7b9f848f4d
Author: James Simmons <uja.ornl@yahoo.com>
Date: Sat Oct 13 15:24:46 2018 -0400

LU-8066 llite: Move all remaining procfs entries to debugfs

This moves all remaining procfs handling in llite layer to debugfs.

This is a modified version of

Linux-commit : ae7c0f4833a65b7648cceaf1a60503a89e057f0f

Change-Id: Id5c411d21a660a17a015ca9976b857e6b088c28a
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32517
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

By this change:

-        for(i = 0; (count >= (1 << LL_HIST_START << i)) &&
+       for(i = 0; (count >= BIT(LL_HIST_START << i)) && 

BIT(LL_HIST_START << i) is not actually the same as 1 << LL_HIST_START << i due to operation ordering details.

BIT(LL_HIST_START + i) gives the desired behavior.



 Comments   
Comment by Gerrit Updater [ 05/Jun/19 ]

Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35075
Subject: LU-12394 llite: Fix bit arithmetic in stats
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a31e2c798524e32836a97625e4e2f8cff7b2123e

Comment by Gerrit Updater [ 21/Aug/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35075/
Subject: LU-12394 llite: Fix extents_stats
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d31a4dad4e698c537dff3d018fd67f196b2b293f

Comment by Peter Jones [ 21/Aug/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 22/Aug/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35866
Subject: LU-12394 llite: Fix extents_stats
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 2b3ad644ac524427bbe4c52690b712c6d44ca362

Comment by Gerrit Updater [ 12/Sep/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35866/
Subject: LU-12394 llite: Fix extents_stats
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: d62644e8cb7833012c6c5b4e06c21bed6dadddd9

Generated at Sat Feb 10 02:52:12 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.