Whamcloud - gitweb
LU-13814 clio: transient page related cleanups 88/52088/23
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 23 Feb 2024 16:23:27 +0000 (11:23 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 9 Dec 2024 06:04:08 +0000 (06:04 +0000)
Add a few more asserts that transient pages are never
passed to certain functions and remove one unused
declaration.

This series has removed a decent bit of code and
bookkeeping activity from the DIO path, even without
getting to the much bigger wins related to removing
cl_page for DIO.

This gets us about a 17% improvement in DIO
performance - note this is a very different node
from the one which gave us 18 GiB/s two years ago.

ior --posix.odirect -w -r -t 256M -b 64G
Without series:
8.5 GiB/s DIO write
9.6 GiB/s DIO read

With series:
10.1 GiB/s DIO write
11 GiB/s DIO read

Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: Ic90bd349a1ded8c1484dc8be29418adb8f229026
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52088
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/cl_object.h
lustre/obdclass/cl_page.c

index 8467947..623c1a1 100644 (file)
@@ -2230,8 +2230,6 @@ void cl_page_completion(const struct lu_env *env, struct cl_page *pg,
                         enum cl_req_type crt, int ioret);
 int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg,
                       enum cl_req_type crt);
-int cl_page_cache_add(const struct lu_env *env, struct cl_io *io,
-                     struct cl_page *pg, enum cl_req_type crt);
 void cl_page_clip(const struct lu_env *env, struct cl_page *pg,
                  int from, int to);
 int cl_page_flush(const struct lu_env *env, struct cl_io *io,
index 89eaa60..92b8479 100644 (file)
@@ -541,6 +541,8 @@ void __cl_page_disown(const struct lu_env *env, struct cl_page *cp)
 
        ENTRY;
 
+       LASSERT(cp->cp_type != CPT_TRANSIENT);
+
        cl_page_owner_clear(cp);
        state = cp->cp_state;
        PINVRNT(env, cp, state == CPS_OWNED || state == CPS_FREEING);
@@ -562,10 +564,8 @@ int cl_page_is_owned(const struct cl_page *pg, const struct cl_io *io)
 
        LINVRNT(cl_object_same(pg->cp_obj, top->ci_obj));
        ENTRY;
-       if (pg->cp_type != CPT_TRANSIENT)
-               RETURN(pg->cp_state == CPS_OWNED && pg->cp_owner == top);
-       else
-               RETURN(pg->cp_owner == top);
+       LASSERT(pg->cp_type != CPT_TRANSIENT);
+       RETURN(pg->cp_state == CPS_OWNED && pg->cp_owner == top);
 }
 EXPORT_SYMBOL(cl_page_is_owned);
 
@@ -734,8 +734,6 @@ EXPORT_SYMBOL(cl_page_unassume);
 void cl_page_disown(const struct lu_env *env,
                    struct cl_io *io, struct cl_page *pg)
 {
-       LASSERT(pg->cp_type != CPT_TRANSIENT);
-
        PINVRNT(env, pg, cl_page_is_owned(pg, cl_io_top(io)) ||
                pg->cp_state == CPS_FREEING);