[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: |
|
| 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 ] |
| 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. 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 |
| 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. |
| 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.
http://review.whamcloud.com/#change,5312 – Patch Set |
| Comment by Bruce Korb (Inactive) [ 11/Apr/13 ] |
|
|
| 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 |
| Comment by Gerrit Updater [ 19/Jan/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49563/ |