Whamcloud - gitweb
LU-13799 llite: Remove transient page counting
authorPatrick Farrell <farr0186@gmail.com>
Sat, 29 May 2021 01:32:43 +0000 (21:32 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 13 Aug 2021 17:09:05 +0000 (17:09 +0000)
Transient page counting is not used for anything, as
already noted in the commit message, but costs something
like 4% of the time in DIO page submission.

Remove it.

mpirun -np 1  $IOR -w -r -t 64M -b 64G -o ./iorfile --posix.odirect

This patch reduces i/o time in ms/GiB by:
Write: 6 ms/GiB
Read: 11 ms/GiB

Totals:
Write: 174 ms/GiB
Read: 167 ms/GiB

With previous patches in series:
write     5703 MiB/s
read      5756 MiB/s

Plus this patch:
write     5900 MiB/s
read      6136 MiB/s

Lustre-change: https://review.whamcloud.com/39441
Lustre-commit: 587e5aa8342980f761930235714add1cca80686b

Signed-off-by: Patrick Farrell <farr0186@gmail.com>
Change-Id: I825de4f1b5d1dd1476a4a711bfa51e7d24b5027a
Reviewed-on: https://review.whamcloud.com/44444
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/vvp_internal.h
lustre/llite/vvp_object.c
lustre/llite/vvp_page.c

index 6fbffa2..4ff59b7 100644 (file)
@@ -189,12 +189,6 @@ struct vvp_object {
        struct inode           *vob_inode;
 
        /**
-        * Number of transient pages.  This is no longer protected by i_sem,
-        * and needs to be atomic.  This is not actually used for anything,
-        * and can probably be removed.
-        */
-       atomic_t                vob_transient_pages;
-       /**
         * Number of outstanding mmaps on this file.
         *
         * \see ll_vm_open(), ll_vm_close().
index 8f6e82b..95f5e89 100644 (file)
@@ -67,8 +67,7 @@ static int vvp_object_print(const struct lu_env *env, void *cookie,
        struct inode         *inode = obj->vob_inode;
        struct ll_inode_info *lli;
 
-       (*p)(env, cookie, "(%d %d) inode: %p ",
-            atomic_read(&obj->vob_transient_pages),
+       (*p)(env, cookie, "(%d) inode: %p ",
             atomic_read(&obj->vob_mmap_cnt),
             inode);
        if (inode) {
@@ -241,7 +240,6 @@ static int vvp_object_init0(const struct lu_env *env,
                            const struct cl_object_conf *conf)
 {
        vob->vob_inode = conf->coc_inode;
-       atomic_set(&vob->vob_transient_pages, 0);
        cl_object_page_init(&vob->vob_cl, sizeof(struct vvp_page));
        return 0;
 }
index 831e432..529244f 100644 (file)
@@ -457,10 +457,8 @@ static void vvp_transient_page_fini(const struct lu_env *env,
                                    struct pagevec *pvec)
 {
        struct vvp_page *vpg = cl2vvp_page(slice);
-       struct vvp_object *clobj = cl2vvp(slice->cpl_obj);
 
        vvp_page_fini_common(vpg, pvec);
-       atomic_dec(&clobj->vob_transient_pages);
 }
 
 static const struct cl_page_operations vvp_transient_page_ops = {
@@ -489,11 +487,8 @@ int vvp_page_init(const struct lu_env *env, struct cl_object *obj,
                cl_page_slice_add(page, &vpg->vpg_cl, obj,
                                &vvp_page_ops);
        } else {
-               struct vvp_object *clobj = cl2vvp(obj);
-
                cl_page_slice_add(page, &vpg->vpg_cl, obj,
-                               &vvp_transient_page_ops);
-               atomic_inc(&clobj->vob_transient_pages);
+                                 &vvp_transient_page_ops);
        }
        return 0;
 }