[LU-2771] Wasted space in ldlm_lock structure Created: 06/Feb/13  Updated: 19/Jan/23  Resolved: 07/Jun/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.5.0

Type: Improvement Priority: Minor
Reporter: Bruce Korb (Inactive) Assignee: Keith Mannthey (Inactive)
Resolution: Fixed Votes: 0
Labels: locking, patch

Attachments: File l_flags.h    
Rank (Obsolete): 6713

 Description   

There is an 8 byte write only field and some separated flag bits that trigger another 8 bytes of extra alignment padding that are not necessary. There are also a couple of fields that are only used on the server side and others only used on the client side. These fields could be overlaid, with 24 bytes easily saved. This is important on systems where 100's of thousands of these structures get allocated.

My first comment will show one approach for coalescing all the flag bits into a single 64 bit flag word.



 Comments   
Comment by Bruce Korb (Inactive) [ 06/Feb/13 ]

an approximation of the new bit field code

Comment by Bruce Korb (Inactive) [ 06/Feb/13 ]

Xyratex bug id MRP-376

Comment by Andreas Dilger [ 06/Feb/13 ]

Bruce, it is easier to review changes in the form of a patch. If you are just looking for comments and not landing, please add in the commit comment:

Test-Parameters: fortestonly testlist=runtests

so that it will run only the one test. We don't have a "don't test anything" marker yet.

Comment by Bruce Korb (Inactive) [ 06/Feb/13 ]

OK, coming. That generated header was sufficiently preliminary that I was not sure it would compile even. Actually, I'd guess it would not. But the approach is visible. Another 30-60 minutes, and I should have something that compiles.

And I've removed the osc_ldlm_weigh_ast() -> ei_cb_wg -> lcs_weigh -> dead store in l_weigh_ast chain.

Comment by Bruce Korb (Inactive) [ 06/Feb/13 ]

http://review.whamcloud.com/#change,5312 – Patch Set 11: No score
trying a new review

Comment by Bruce Korb (Inactive) [ 06/Feb/13 ]

That's right - I remember: error: excess elements in struct initializer

There was more to it than just removing an assignment. There were the initializers, too.
Tomorrow.

Comment by Bruce Korb (Inactive) [ 11/Mar/13 ]

Andreas Dilger Mar 4

Patch Set 8: Looks good to me, approved

(3 inline comments)

Some minor style issues if patch is refreshed

Maloo Mar 9

Patch Set 8: Verified

Tests received by maloo, run on CentOS release 6.3/x86_64: (https://maloo.whamcloud.com/test_sessions/ce9b01e0-88ba-11e2-b643-52540035b04c). Ran 12 tests. No failures.

Comment by Bruce Korb (Inactive) [ 03/Apr/13 ]
Artem Blagodarenko		12:28 AM
Patch Set 13:
Bruce, please, re-submit the patch, because LU-2988 was submitted after your testing is failed. Thanks.

14 15 coming up. It will get installed before it gets obsolete this time, I am sure.

http://review.whamcloud.com/#change,5312 – Patch Set 14 15

Comment by Bruce Korb (Inactive) [ 11/Apr/13 ]

LU-2906 was opened to track replacing direct bit fiddling operations with accessor macros.

Comment by Keith Mannthey (Inactive) [ 11/Apr/13 ]

Thanks for link to the macro work.

Comment by Keith Mannthey (Inactive) [ 07/Jun/13 ]

5312 has been merged into Master.

Comment by Gerrit Updater [ 05/Jan/23 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49563
Subject: LU-2771 ldlm: remove obsolete LDLM_FL_SERVER_LOCK
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b045e816a75667e931af60214811c7476202a3f0

Comment by Gerrit Updater [ 19/Jan/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49563/
Subject: LU-2771 ldlm: remove obsolete LDLM_FL_SERVER_LOCK
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: cb0aa0285b32fb432fc484cfd44e6e6e789c1025

Generated at Sat Feb 10 01:28:03 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.