From 259d702003ab44e60cb4d90e196418466d786901 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Thu, 24 Aug 2023 12:24:54 -0400 Subject: [PATCH] LU-13814 clio: transient page related cleanups 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 Change-Id: Ic90bd349a1ded8c1484dc8be29418adb8f229026 --- lustre/include/cl_object.h | 2 -- lustre/obdclass/cl_page.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index 7a7e827..c961a7f 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -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, diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index 14a7909..8b5ff00 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -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); -- 1.8.3.1