diff mbox series

[18/24] lustre: osc: Remove submit time

Message ID 1663478534-19917-19-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to 2.15.52 | expand

Commit Message

James Simmons Sept. 18, 2022, 5:22 a.m. UTC
From: Patrick Farrell <pfarrell@whamcloud.com>

The osc page submit time is an unused bit of debugging
information, but it's allocated for every page.  Let's
just remove it to save memory.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15619
Lustre-commit: 28a7bbdb81cfd8359 ("LU-15619 osc: Remove submit time")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46712
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_osc.h |  6 +-----
 fs/lustre/osc/osc_cache.c      |  9 +--------
 fs/lustre/osc/osc_io.c         |  3 +--
 fs/lustre/osc/osc_page.c       | 15 +++------------
 4 files changed, 6 insertions(+), 27 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/include/lustre_osc.h b/fs/lustre/include/lustre_osc.h
index d630169..89f02c5 100644
--- a/fs/lustre/include/lustre_osc.h
+++ b/fs/lustre/include/lustre_osc.h
@@ -542,10 +542,6 @@  struct osc_page {
 	 * lru page list. See osc_lru_{del|use}() in osc_page.c for usage.
 	 */
 	struct list_head	ops_lru;
-	/*
-	 * Submit time - the time when the page is starting RPC. For debugging.
-	 */
-	ktime_t			ops_submit_time;
 };
 
 struct osc_brw_async_args {
@@ -582,7 +578,7 @@  void osc_index2policy(union ldlm_policy_data *policy,
 		      pgoff_t start, pgoff_t end);
 void osc_lru_add_batch(struct client_obd *cli, struct list_head *list);
 void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
-		     enum cl_req_type crt, int brw_flags, ktime_t submit_time);
+		     enum cl_req_type crt, int brw_flags);
 int lru_queue_work(const struct lu_env *env, void *data);
 long osc_lru_shrink(const struct lu_env *env, struct client_obd *cli,
 		    long target, bool force);
diff --git a/fs/lustre/osc/osc_cache.c b/fs/lustre/osc/osc_cache.c
index 29d13f5..b6f0cdb 100644
--- a/fs/lustre/osc/osc_cache.c
+++ b/fs/lustre/osc/osc_cache.c
@@ -1310,17 +1310,11 @@  static inline int osc_is_ready(struct osc_object *osc)
 static int osc_make_ready(const struct lu_env *env, struct osc_async_page *oap,
 			  int cmd)
 {
-	struct osc_page *opg = oap2osc_page(oap);
 	struct cl_page *page = oap2cl_page(oap);
-	int result;
 
 	LASSERT(cmd == OBD_BRW_WRITE); /* no cached reads */
 
-	result = cl_page_make_ready(env, page, CRT_WRITE);
-	if (result == 0)
-		opg->ops_submit_time = ktime_get();
-
-	return result;
+	return cl_page_make_ready(env, page, CRT_WRITE);
 }
 
 static int osc_refresh_count(const struct lu_env *env,
@@ -1372,7 +1366,6 @@  static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
 	/* Clear opg->ops_transfer_pinned before VM lock is released. */
 	opg->ops_transfer_pinned = 0;
 
-	opg->ops_submit_time = ktime_set(0, 0);
 	srvlock = oap->oap_brw_flags & OBD_BRW_SRVLOCK;
 
 	/* statistic */
diff --git a/fs/lustre/osc/osc_io.c b/fs/lustre/osc/osc_io.c
index 1361d7f..655c7c6 100644
--- a/fs/lustre/osc/osc_io.c
+++ b/fs/lustre/osc/osc_io.c
@@ -132,7 +132,6 @@  int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,
 	unsigned int max_pages;
 	unsigned int ppc_bits; /* pages per chunk bits */
 	unsigned int ppc;
-	ktime_t submit_time = ktime_get();
 	bool sync_queue = false;
 
 	LASSERT(qin->pl_nr > 0);
@@ -200,7 +199,7 @@  int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,
 			spin_unlock(&oap->oap_lock);
 		}
 
-		osc_page_submit(env, opg, crt, brw_flags, submit_time);
+		osc_page_submit(env, opg, crt, brw_flags);
 		list_add_tail(&oap->oap_pending_item, &list);
 
 		if (page->cp_sync_io)
diff --git a/fs/lustre/osc/osc_page.c b/fs/lustre/osc/osc_page.c
index 5300ac9..12ba108 100644
--- a/fs/lustre/osc/osc_page.c
+++ b/fs/lustre/osc/osc_page.c
@@ -115,14 +115,6 @@  void osc_index2policy(union ldlm_policy_data *policy,
 	policy->l_extent.end = cl_offset(obj, end + 1) - 1;
 }
 
-static inline s64 osc_submit_duration(struct osc_page *opg)
-{
-	if (ktime_to_ns(opg->ops_submit_time) == 0)
-		return 0;
-
-	return ktime_ms_delta(ktime_get(), opg->ops_submit_time);
-}
-
 static int osc_page_print(const struct lu_env *env,
 			  const struct cl_page_slice *slice,
 			  void *cookie, lu_printer_t printer)
@@ -133,7 +125,7 @@  static int osc_page_print(const struct lu_env *env,
 	struct client_obd *cli = &osc_export(obj)->exp_obd->u.cli;
 
 	return (*printer)(env, cookie, LUSTRE_OSC_NAME
-			  "-page@%p %lu: 1< %#x %d %c %c > 2< %llu %u %u %#x %#x | %p %p %p > 3< %d %lld %d > 4< %d %d %d %lu %c | %c %c %c %c > 5< %c %c %c %c | %d %c | %d %c %c>\n",
+			  "-page@%p %lu: 1< %#x %d %c %c > 2< %llu %u %u %#x %#x | %p %p %p > 3< %d %d > 4< %d %d %d %lu %c | %c %c %c %c > 5< %c %c %c %c | %d %c | %d %c %c>\n",
 			  opg, osc_index(opg),
 			  /* 1 */
 			  oap->oap_magic, oap->oap_cmd,
@@ -145,7 +137,7 @@  static int osc_page_print(const struct lu_env *env,
 			  oap->oap_request, cli, obj,
 			  /* 3 */
 			  opg->ops_transfer_pinned,
-			  osc_submit_duration(opg), opg->ops_srvlock,
+			  opg->ops_srvlock,
 			  /* 4 */
 			  cli->cl_r_in_flight, cli->cl_w_in_flight,
 			  cli->cl_max_rpcs_in_flight,
@@ -296,7 +288,7 @@  int osc_page_init(const struct lu_env *env, struct cl_object *obj,
  * transfer (i.e., transferred synchronously).
  */
 void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
-		     enum cl_req_type crt, int brw_flags, ktime_t submit_time)
+		     enum cl_req_type crt, int brw_flags)
 {
 	struct osc_io *oio = osc_env_io(env);
 	struct osc_async_page *oap = &opg->ops_oap;
@@ -317,7 +309,6 @@  void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
 		oap->oap_cmd |= OBD_BRW_SYS_RESOURCE;
 	}
 
-	opg->ops_submit_time = submit_time;
 	osc_page_transfer_get(opg, "transfer\0imm");
 	osc_page_transfer_add(env, opg, crt);
 }