From: James Simmons <jsimmons@infradead.org>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Hongchao Zhang <hongchao.zhang@intel.com>
Subject: Re: [PATCH 08/14] staging/lustre/ldlm: engage ELC for all ldlm enqueue req
Date: Mon, 7 Nov 2016 01:55:21 +0000 (GMT) [thread overview]
Message-ID: <alpine.LFD.2.20.1611070155090.21293@casper.infradead.org> (raw)
In-Reply-To: <1478136304-867780-9-git-send-email-green@linuxhacker.ru>
> From: Hongchao Zhang <hongchao.zhang@intel.com>
>
> If there is no request passed into ldlm_cli_enqueue, the enqueue
> request will not engage ELC to drop unneeded locks. currently,
> this kind of request is mainly related to EXTENT locks enqueue
> requests (except for glimpse EXTENT lock for it has an intent).
Reviewed-by: James Simmons <jsimmons@infradead.org>
> Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
> Reviewed-on: http://review.whamcloud.com/21739
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8209
> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
> Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
> drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 21 ++++-----------------
> 1 file changed, 4 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> index 1b9ae77..c5d00d1 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> @@ -748,17 +748,14 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
> lock->l_last_activity = ktime_get_real_seconds();
>
> /* lock not sent to server yet */
> -
> if (!reqp || !*reqp) {
> - req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
> - &RQF_LDLM_ENQUEUE,
> - LUSTRE_DLM_VERSION,
> - LDLM_ENQUEUE);
> - if (!req) {
> + req = ldlm_enqueue_pack(exp, lvb_len);
> + if (IS_ERR(req)) {
> failed_lock_cleanup(ns, lock, einfo->ei_mode);
> LDLM_LOCK_RELEASE(lock);
> - return -ENOMEM;
> + return PTR_ERR(req);
> }
> +
> req_passed_in = 0;
> if (reqp)
> *reqp = req;
> @@ -778,16 +775,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
> body->lock_flags = ldlm_flags_to_wire(*flags);
> body->lock_handle[0] = *lockh;
>
> - /* Continue as normal. */
> - if (!req_passed_in) {
> - if (lvb_len > 0)
> - req_capsule_extend(&req->rq_pill,
> - &RQF_LDLM_ENQUEUE_LVB);
> - req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER,
> - lvb_len);
> - ptlrpc_request_set_replen(req);
> - }
> -
> /*
> * Liblustre client doesn't get extent locks, except for O_APPEND case
> * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2016-11-07 1:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 1:24 [PATCH 00/14] Lustre fixes Oleg Drokin
2016-11-03 1:24 ` [PATCH 01/14] staging/lustre/ldlm: Drop unused blocking_refs flock field Oleg Drokin
2016-11-07 1:38 ` James Simmons
2016-11-03 1:24 ` [PATCH 02/14] staging/lustre/ldlm: fix export reference problem Oleg Drokin
2016-11-07 1:37 ` James Simmons
2016-11-03 1:24 ` [PATCH 03/14] staging/lustre: conflicting PW & PR extent locks on a client Oleg Drokin
2016-11-07 1:52 ` James Simmons
2016-11-03 1:24 ` [PATCH 04/14] staging/lustre/llite: clear inode timestamps after losing UPDATE lock Oleg Drokin
2016-11-07 1:38 ` James Simmons
2016-11-03 1:24 ` [PATCH 05/14] staging/lustre: Get rid of cl_env hash table Oleg Drokin
2016-11-07 1:53 ` James Simmons
2016-11-03 1:24 ` [PATCH 06/14] staging/lustre/llite: drop_caches hangs in cl_inode_fini() Oleg Drokin
2016-11-07 1:54 ` James Simmons
2016-11-03 1:24 ` [PATCH 07/14] staging/lustre/ldlm: Reinstate ldlm_enqueue_pack() Oleg Drokin
2016-11-07 1:53 ` James Simmons
2016-11-03 1:24 ` [PATCH 08/14] staging/lustre/ldlm: engage ELC for all ldlm enqueue req Oleg Drokin
2016-11-07 1:55 ` James Simmons [this message]
2016-11-03 1:24 ` [PATCH 09/14] staging/lustre/ptlrpc: Suppress error for flock requests Oleg Drokin
2016-11-07 1:57 ` James Simmons
2016-11-03 1:25 ` [PATCH 10/14] staging/lustre/llite: protect from accessing NULL lli_clob Oleg Drokin
2016-11-07 1:55 ` James Simmons
2016-11-03 1:25 ` [PATCH 11/14] staging/lustre/ptlrpc: Correctly calculate hrp->hrp_nthrs Oleg Drokin
2016-11-07 1:58 ` James Simmons
2016-11-03 1:25 ` [PATCH 12/14] staging/lustre/llite: update ras window correctly Oleg Drokin
2016-11-07 1:57 ` James Simmons
2016-11-03 1:25 ` [PATCH 13/14] staging/lustre/llite: do not clear uptodate bit in page delete Oleg Drokin
2016-11-07 1:56 ` James Simmons
2016-11-03 1:25 ` [PATCH 14/14] staging/lustre: Get rid of LIBLUSTRE_CLIENT and its users Oleg Drokin
2016-11-07 1:56 ` 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=alpine.LFD.2.20.1611070155090.21293@casper.infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=green@linuxhacker.ru \
--cc=gregkh@linuxfoundation.org \
--cc=hongchao.zhang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
/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®