Whamcloud - gitweb
LU-398 libcfs: Add libcfs heap, a binary heap implementation
authorNikitas Angelinas <nikitas_angelinas@xyratex.com>
Tue, 30 Oct 2012 15:46:39 +0000 (15:46 +0000)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Dec 2012 05:12:29 +0000 (00:12 -0500)
commit2070cf5996a140c7ecee3b3ec0691a6f1f02f1b8
treeca4a770a6b6db133dcf714c5693017690a18095b
parentc474bf9f9b9888f6056ea1832edb6a73a7607645
LU-398 libcfs: Add libcfs heap, a binary heap implementation

The heap can be used to build and maintain sorted arrays and lists,
and prioritized queues of large numbers of elements, with minimal
insertion and removal time. The first user for the data structure are
NRS policies, which use it to maintain prioritized queues of RPCs at
PTLRPC services.

There is no 'search' operation, but the data type aims to be useful
in cases where performing searches on the data set is not required,
and instead the lowest priority element is usually removed from the
data set for consumption.

Original-author: Eric Barton <eeb@whamcloud.com>
Original-author: Liang Zhen <liang@whamcloud.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: Ifd293d0a8201e45bd6030d7a16ce0be691f79cb9
Oracle-bug-id: b=13634
Xyratex-bug-id: MRP-73
Reviewed-on: http://review.whamcloud.com/4412
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/Makefile.am
libcfs/include/libcfs/libcfs.h
libcfs/include/libcfs/libcfs_heap.h [new file with mode: 0644]
libcfs/libcfs/Makefile.in
libcfs/libcfs/autoMakefile.am
libcfs/libcfs/heap.c [new file with mode: 0644]