]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "RDS: fix the sg allocation based on actual message size"
authorWei Lin Guay <wei.lin.guay@oracle.com>
Thu, 31 Aug 2017 19:52:27 +0000 (21:52 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 15 Nov 2017 06:18:12 +0000 (01:18 -0500)
This reverts commit 23f90cccfba4 ("RDS: fix the sg allocation based on
actual message size") because RDS has implemented N sge to support large
fragment size, with each sge of PAGE_SIZE.

Orabug: 26770234

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Tested-by: Shih-Yu Huang <shih-yu.huang@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
net/rds/message.c
net/rds/page.c

index 6ae9267732aaea4f09b99b76f7290163818f7d67..c305f88c05e7d6be544568d220803710b6a7b119 100644 (file)
@@ -65,10 +65,7 @@ static void rds_message_purge(struct rds_message *rm)
        for (i = 0; i < rm->data.op_nents; i++) {
                rdsdebug("putting data page %p\n", (void *)sg_page(&rm->data.op_sg[i]));
                /* XXX will have to put_page for page refs */
-               (rm->data.op_sg[i].length <= PAGE_SIZE) ?
-                       __free_page(sg_page(&rm->data.op_sg[i])) :
-                       __free_pages(sg_page(&rm->data.op_sg[i]),
-                                    get_order(rm->data.op_sg[i].length));
+               __free_page(sg_page(&rm->data.op_sg[i]));
        }
        rm->data.op_nents = 0;
 
index 1dae848832918a5de712ecea6083e681194a5db4..0451e7b67c891615a57be459ba072dd92dfd5302 100644 (file)
@@ -127,11 +127,11 @@ int rds_page_remainder_alloc(struct scatterlist *scat, unsigned long bytes,
 
        /* jump straight to allocation if we're trying for a huge page */
        if (bytes >= PAGE_SIZE) {
-               page = alloc_pages(gfp, get_order(bytes));
+               page = alloc_page(gfp);
                if (!page) {
                        ret = -ENOMEM;
                } else {
-                       sg_set_page(scat, page, bytes, 0);
+                       sg_set_page(scat, page, PAGE_SIZE, 0);
                        ret = 0;
                }
                goto out;