[LU-15058] replace critical vmalloc allocations with genradix Created: 04/Oct/21 Updated: 14/Nov/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | James A Simmons | Assignee: | James A Simmons |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Any client or server running Lustre. |
||
| Issue Links: |
|
||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||
| Description |
|
When memory allocation grow top large the method of allocation moves from kmalloc to vmalloc. Using vmalloc() uses global locking which greatly degrades performance. For ORNL we ended up preventing users form creating files stripped greater than 512. This problem impact very large RPC and other components of Lustre. The solution is to use the generic_radix work present in newer kernel developed for this very issue. |
| Comments |
| Comment by Patrick Farrell [ 04/Oct/21 ] |
|
Can you provide more references on how genradix trees are used to solve this memory allocation problem? The description in the kernel docs doesn't suggest they're for this sort of problem: Very simple and minimalistic, supporting arbitrary size entries up to PAGE_SIZE."[ |
| Comment by James A Simmons [ 04/Oct/21 ] |
|
See Linux commit ba20ba2e3743bac786dff777954c11930256075e. Reading the commit you will see generic radix trees is a direct replacement of flex_array. The link - https://www.kernel.org/doc/html/v4.14/core-api/flexible-arrays.html states the purpose of flexible arrays was to handle the described issue. Currently the only user is procfs. flexible arrays never had that many users. |
| Comment by Patrick Farrell [ 04/Oct/21 ] |
|
Ah, OK - thanks. |
| Comment by Gerrit Updater [ 15/Oct/22 ] |
|
"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/48883 |
| Comment by Gerrit Updater [ 14/Nov/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/45890/ |