[LU-3494] Libcfs binary heap improvements Created: 24/Jun/13  Updated: 20/Aug/13  Resolved: 20/Aug/13

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

Type: Improvement Priority: Minor
Reporter: Li Xi (Inactive) Assignee: Bobbie Lind (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Rank (Obsolete): 8789

 Description   

Binary heap in libcfs enables NRS policies to sort requests efficiently. But the API of it is not sufficient enough for some use cases.

For example, if we want to change the values of the node in the heap, we have to remove the node from the heap, change the values and then insert the node into the heap again. However, the process of inserting into the heap might fails because of memory insufficiency. Sometimes, it is not convienient and efficient for a caller to handle such kind of failure which can be easily avioded by adding new APIs

What's more, there is no API for a caller to judge whether a node is in the heap or not, which is not convienient too.



 Comments   
Comment by Li Xi (Inactive) [ 24/Jun/13 ]

This patch adds a funtion which relocates the changed node in a heap.
http://review.whamcloud.com/#/c/6743/

Comment by Peter Jones [ 26/Jun/13 ]

Thanks for the patch Li Xi

Comment by Peter Jones [ 28/Jun/13 ]

Bobbie

Could you please take care of this one?

Thanks

Peter

Comment by Bobbie Lind (Inactive) [ 20/Aug/13 ]

Patch cherry-picked for master as 8beee9d0ff74f78fc5b072d1cf98f55d927dcdbe

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