From 7bfa81e07619df43f9b623f7e7c31ba62a3e0598 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Fri, 23 Feb 2024 11:23:27 -0500 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 Signed-off-by: Patrick Farrell Change-Id: Ic90bd349a1ded8c1484dc8be29418adb8f229026 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52088 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger --- 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 8467947..623c1a1 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -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, diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index 89eaa60..92b84794 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -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); -- 1.8.3.1