From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Wang Di <di.wang@intel.com>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH 03/15] staging: lustre: obdclass: add LCT_SERVER_SESSION for server session
Date: Wed, 27 Apr 2016 18:20:55 -0400 [thread overview]
Message-ID: <1461795667-29035-4-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1461795667-29035-1-git-send-email-jsimmons@infradead.org>
From: Wang Di <di.wang@intel.com>
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: Wang 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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lustre/include/lu_object.h | 4 ++++
drivers/staging/lustre/lustre/include/obd_class.h | 2 +-
drivers/staging/lustre/lustre/ptlrpc/service.c | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h
index b5b0c81..a27e76f 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -1006,6 +1006,10 @@ enum lu_context_tag {
*/
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
* optimize lu_context_exit() call.
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
index 40f7a23..32863bc 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -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);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 1bbd1d3..fc2632f 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -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;
--
1.7.1
next prev parent reply other threads:[~2016-04-27 22:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 22:20 [PATCH 00/15] patches missing from lustre 2.5.51 James Simmons
2016-04-27 22:20 ` [PATCH 01/15] staging: lustre: llite: reset writeback index in ll_writepages James Simmons
2016-04-27 22:20 ` [PATCH 02/15] staging: lustre: llite: NFS reexport issue James Simmons
2016-04-27 22:20 ` James Simmons [this message]
2016-04-27 22:20 ` [PATCH 04/15] staging: lustre: lmv: kernel crash due to misconfigured MDT James Simmons
2016-04-27 22:20 ` [PATCH 05/15] staging: lustre: ldlm: use accessor macros for l_flags James Simmons
2016-04-27 22:51 ` Bruce Korb
2016-04-28 8:19 ` Dan Carpenter
2016-04-27 22:20 ` [PATCH 06/15] staging: lustre: ldlm: clean up l_flags James Simmons
2016-04-27 22:20 ` [PATCH 07/15] staging: lustre: ldlm: remove code wireshark handling James Simmons
2016-04-27 22:21 ` [PATCH 08/15] staging: lustre: ldlm: update comments about ldlm l_flags James Simmons
2016-04-27 22:21 ` [PATCH 09/15] staging: lustre: llite: Replace printing of i_ino with ll_inode2fid() James Simmons
2016-04-27 22:21 ` [PATCH 10/15] staging: lustre: clio: add debug message in osc_completion() James Simmons
2016-04-27 22:21 ` [PATCH 11/15] staging: lustre: mgc: fix 'error handling' issues James Simmons
2016-04-27 22:21 ` [PATCH 12/15] staging: lustre: osc: Track and limit "unstable" pages James Simmons
2016-04-27 22:21 ` [PATCH 13/15] staging: lustre: osc: Track number of "unstable" pages per osc James Simmons
2016-04-27 22:21 ` [PATCH 14/15] staging: lustre: osc: Use SOFT_SYNC to urge server commit James Simmons
2016-04-27 22:21 ` [PATCH 15/15] staging: lustre: ptlrpc: quiet warning for 2.1/2.5 connections James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461795667-29035-4-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=di.wang@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®