Whamcloud - gitweb
LU-13814 clio: transient page related cleanups 88/52088/11
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 24 Aug 2023 16:24:54 +0000 (12:24 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Sun, 17 Sep 2023 20:27:28 +0000 (16:27 -0400)
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

Test-Parameters: forjanitoronly
Test-Parameters: fortestonly
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ic90bd349a1ded8c1484dc8be29418adb8f229026

lustre/include/cl_object.h
lustre/obdclass/cl_page.c

index 7a7e827..c961a7f 100644 (file)
@@ -2264,8 +2264,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 14a7909..8b5ff00 100644 (file)
@@ -560,6 +560,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);
@@ -582,10 +584,8 @@ int cl_page_is_owned(const struct cl_page *pg, const struct cl_io *io)
        struct cl_io *top = cl_io_top((struct cl_io *)io);
        LINVRNT(cl_object_same(pg->cp_obj, io->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);
 
@@ -761,8 +761,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, io) ||
                pg->cp_state == CPS_FREEING);