Current codebase tests next element if it is unused(freed) when allocating
round-robin. In certain cases where an element is allocated and then
deallocated immediately it is convenient to reuse the element.
Orabug:
24761759
Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Knut Omang <knut.omang@oracle.com>
for (i = 0; i < tp->block_cnt; i++) {
struct sif_table_block *b = sif_get_block(tp, i);
- b->last_used = tp->entry_per_block - 1;
+ b->last_used = tp->entry_per_block;
}
}
return 0;
struct sif_table *table = b->table;
if (table->alloc_rr)
- next = (b->last_used + 1) & (table->entry_per_block - 1);
+ next = b->last_used & (table->entry_per_block - 1);
loc_idx = find_next_zero_bit(b->bitmap, table->entry_per_block, next);
if (table->alloc_rr && loc_idx >= table->entry_per_block)
loc_idx = find_next_zero_bit(b->bitmap, table->entry_per_block, 0);
struct sif_version sif_version = {
.git_repo = "sifdrv [origin/master]",
-.last_commit = "titan_1.0.4.0 Lift sif_verbs up to be independent of sif internal headers",
+.last_commit = "titan_1.0.5.0 Retest last allocated entry with roundrobin allocation",
.git_status = "",
-.build_git_time = "Fri, 09 Sep 2016 09:58:31 +0000",
+.build_git_time = "Mon, 03 Oct 2016 10:12:59 +0000",
.build_user = "komang",
.git_psifapi_repo = "psifapi [origin/master]",
-.last_psifapi_commit = "titan_1.0.4.0 Fix recently introduced checkpatch issues",
+.last_psifapi_commit = "titan_1.0.5.0 preparations for venus",
.git_psifapi_status = "",
};
/* Misc driver release info */
-#define BUILD_DATE "2016-09-09"
-#define BUILD_TIME "09:58:31"
-#define BUILD_EPOCH 1473415111
-#define TITAN_RELEASE "1.0.4.0"
+#define BUILD_DATE "2016-10-03"
+#define BUILD_TIME "10:12:59"
+#define BUILD_EPOCH 1475489579
+#define TITAN_RELEASE "1.0.5.0"