]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: Retest last allocated entry with roundrobin allocation
authorHans Westgaard Ry <hans.westgaard.ry@oracle.com>
Fri, 30 Sep 2016 08:36:49 +0000 (10:36 +0200)
committerKnut Omang <knut.omang@oracle.com>
Mon, 3 Oct 2016 12:02:27 +0000 (14:02 +0200)
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>
drivers/infiniband/hw/sif/sif_base.c
drivers/infiniband/hw/sif/sif_pd.c
drivers/infiniband/hw/sif/version.c
drivers/infiniband/hw/sif/versioninfo.h

index ac1944245dac9e7ad379c816ae2fd91696ad6562..b912d82c4fe89abd96a889a87cc878b7f75781d7 100644 (file)
@@ -472,7 +472,7 @@ static int init_blocks(struct sif_dev *sdev, enum sif_tab_type type)
                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;
index 7fa0db1078f073f565153c6ccedb23f8918403c1..53d37016fddfb30c9278031333ddbc4a2fa4ead6 100644 (file)
@@ -400,7 +400,7 @@ static int alloc_from_block(struct sif_table_block *b, enum sif_tab_type type)
        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);
index 4b94c7fdccd515577bbd714529511c4f7ffbe87b..dfc3a07fc9afdaec1543bf0786b997096651877b 100644 (file)
@@ -4,12 +4,12 @@
 
 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 = "",
 };
index 7cffd353a7938264cfd6157d7d8e40f8b49b0697..36cdafaff1f482e66c9385515e156caa03c2d7e9 100644 (file)
@@ -1,6 +1,6 @@
 /* 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"