Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f937beb authored by Wang Di's avatar Wang Di Committed by Greg Kroah-Hartman
Browse files

staging: lustre: obdclass: add LCT_SERVER_SESSION for server session



Add LCT_SERVER_SESSION for server session, and separate the
server session flag from LCT_SESSION, so to avoid allocating
session info for client stack for each server request, if
client and server are on the same node.

Signed-off-by: default avatarWang Di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3806
Reviewed-on: http://review.whamcloud.com/7412


Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ac7af34e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1005,6 +1005,10 @@ enum lu_context_tag {
	 * Context for local operations
	 */
	LCT_LOCAL = 1 << 7,
	/**
	 * session for server thread
	 **/
	LCT_SERVER_SESSION = BIT(8),
	/**
	 * Set when at least one of keys, having values in this context has
	 * non-NULL lu_context_key::lct_exit() method. This is used to
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
		struct lu_context  session_ctx;
		struct lu_env env;

		lu_context_init(&session_ctx, LCT_SESSION);
		lu_context_init(&session_ctx, LCT_SESSION | LCT_SERVER_SESSION);
		session_ctx.lc_thread = NULL;
		lu_context_enter(&session_ctx);

+2 −1
Original line number Diff line number Diff line
@@ -1649,7 +1649,8 @@ ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
				    at_get(&svcpt->scp_at_estimate));
	}

	rc = lu_context_init(&request->rq_session, LCT_SESSION | LCT_NOREF);
	rc = lu_context_init(&request->rq_session, LCT_SERVER_SESSION |
						   LCT_NOREF);
	if (rc) {
		CERROR("Failure to initialize session: %d\n", rc);
		goto out_req;