Whamcloud - gitweb
LU-13180 osc: disable ext merging for rdma only pages and non-rdma 67/37567/2
authorWang Shilong <wshilong@ddn.com>
Fri, 14 Feb 2020 06:50:11 +0000 (14:50 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 28 Jun 2020 02:47:39 +0000 (02:47 +0000)
This patch try to add logic to prevent CPU memory pages and RDMA
memory pages from merging into one RPC, codes which set OBD_BRW_RDMA_ONLY
will be added whenever RDMA only codes added later.

Change-Id: I11e8beda52cc533f17b2a40c34713f441e93d5b6
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37567
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
lustre/include/lustre_osc.h
lustre/osc/osc_cache.c

index b8cadb7..bd2bcff 100644 (file)
@@ -922,7 +922,9 @@ struct osc_extent {
        /** Non-delay RPC should be used for this extent. */
                                oe_ndelay:1,
        /** direct IO pages */
-                               oe_dio:1;
+                               oe_dio:1,
+       /** this extent consists of RDMA only pages */
+                               oe_is_rdma_only;
        /** how many grants allocated for this extent.
         *  Grant allocated for this extent. There is no grant allocated
         *  for reading extents and sync write extents. */
index e0c9901..e2b971d 100644 (file)
@@ -1851,6 +1851,9 @@ can_merge(const struct osc_extent *ext, const struct osc_extent *in_rpc)
        if (in_rpc->oe_dio && overlapped(ext, in_rpc))
                return false;
 
+       if (ext->oe_is_rdma_only != in_rpc->oe_is_rdma_only)
+               return false;
+
        return true;
 }
 
@@ -2606,6 +2609,7 @@ int osc_queue_sync_pages(const struct lu_env *env, const struct cl_io *io,
        ext->oe_srvlock = !!(brw_flags & OBD_BRW_SRVLOCK);
        ext->oe_ndelay = !!(brw_flags & OBD_BRW_NDELAY);
        ext->oe_dio = !!(brw_flags & OBD_BRW_NOCACHE);
+       ext->oe_is_rdma_only = !!(brw_flags & OBD_BRW_RDMA_ONLY);
        ext->oe_nr_pages = page_count;
        ext->oe_mppr = mppr;
        list_splice_init(list, &ext->oe_pages);