From: "Dilger, Andreas" <andreas.dilger@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"jack@suse.cz" <jack@suse.cz>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
"ldufour@linux.vnet.ibm.com" <ldufour@linux.vnet.ibm.com>,
"mhocko@suse.com" <mhocko@suse.com>,
"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
"jsimmons@infradead.org" <jsimmons@infradead.org>,
"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
"Davidlohr Bueso" <dbueso@suse.de>
Subject: Re: [PATCH 6/6] staging/lustre: Use generic range rwlock
Date: Thu, 18 May 2017 08:30:36 +0000 [thread overview]
Message-ID: <907C3F64-C3AF-4027-98F2-58877E650368@intel.com> (raw)
In-Reply-To: <20170515090725.27055-7-dave@stgolabs.net>
On May 15, 2017, at 11:07, Davidlohr Bueso <dave@stgolabs.net> wrote:
>
> This replaces the in-house version, which is also derived
> from Jan's interval tree implementation.
>
> Cc: oleg.drokin@intel.com
> Cc: andreas.dilger@intel.com
> Cc: jsimmons@infradead.org
> Cc: lustre-devel@lists.lustre.org
> Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Repeating my request that the whole patch series should be CC'd to the linux-fsdevel list,
since I only got this last patch and this makes it difficult to review the whole series.
> ---
> diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> index 67c4b9cc6e75..bd020bdaf85d 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -1083,10 +1083,10 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
> if (((iot == CIT_WRITE) ||
> (iot == CIT_READ && (file->f_flags & O_DIRECT))) &&
> !(vio->vui_fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
> - CDEBUG(D_VFSTRACE, "Range lock [%llu, %llu]\n",
> - range.rl_node.in_extent.start,
> - range.rl_node.in_extent.end);
> - rc = range_lock(&lli->lli_write_tree, &range);
> + CDEBUG(D_VFSTRACE, "Range lock [%lu, %lu]\n",
> + range.node.start,
> + range.node.last);
> + rc = range_write_lock_interruptible(&lli->lli_write_tree, &range);
> if (rc < 0)
> goto out;
>
> @@ -1096,10 +1096,10 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
> rc = cl_io_loop(env, io);
> ll_cl_remove(file, env);
> if (range_locked) {
> - CDEBUG(D_VFSTRACE, "Range unlock [%llu, %llu]\n",
> - range.rl_node.in_extent.start,
> - range.rl_node.in_extent.end);
> - range_unlock(&lli->lli_write_tree, &range);
> + CDEBUG(D_VFSTRACE, "Range unlock [%lu, %lu]\n",
> + range.node.start,
> + range.node.last);
> + range_write_unlock(&lli->lli_write_tree, &range);
> }
> } else {
> /* cl_io_rw_init() handled IO */
I'm not against this patch, but it does expose an implementation difference between the
Lustre version of this code and the in-tree version. Preferred kernel coding style is to
have a struct-unique prefix for struct members (e.g. using "rl_" for struct range_lock,
using "in_" for struct interval_tree_node). That allows tags to work properly, instead
of trying to locate generic struct names like "start", "node" etc.
In an unexpected twist of fate, the Lustre version of this code is following preferred
coding style and the in-tree (interval_tree) and submitted (range_rwlock) code does not.
Cheers, Andreas
next prev parent reply other threads:[~2017-05-18 8:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 9:07 [PATCH v3 -tip 0/6] locking: Introduce range reader/writer lock Davidlohr Bueso
2017-05-15 9:07 ` [PATCH 1/6] interval-tree: Build unconditionally Davidlohr Bueso
2017-05-15 9:07 ` [PATCH 2/6] locking: Introduce range reader/writer lock Davidlohr Bueso
2017-05-15 13:02 ` Peter Zijlstra
2017-05-16 22:19 ` Davidlohr Bueso
2017-05-15 13:44 ` Peter Zijlstra
2017-05-16 21:17 ` Davidlohr Bueso
2017-05-15 13:59 ` Peter Zijlstra
2017-05-23 15:12 ` Laurent Dufour
2017-05-15 9:07 ` [PATCH 3/6] locking/locktorture: Fix rwsem reader_delay Davidlohr Bueso
2017-05-15 9:07 ` [PATCH 4/6] locking/locktorture: Fix num reader/writer corner cases Davidlohr Bueso
2017-05-15 9:07 ` [PATCH 5/6] locking/locktorture: Support range rwlocks Davidlohr Bueso
2017-05-15 9:07 ` [PATCH 6/6] staging/lustre: Use generic range rwlock Davidlohr Bueso
2017-05-18 8:30 ` Dilger, Andreas [this message]
2017-05-15 16:11 ` [PATCH v3 -tip 0/6] locking: Introduce range reader/writer lock Christoph Hellwig
2017-06-08 16:22 ` Davidlohr Bueso
-- strict thread matches above, loose matches on Subject: below --
2017-04-06 8:46 [PATCH v2 " Davidlohr Bueso
2017-04-06 8:46 ` [PATCH 6/6] staging/lustre: Use generic range rwlock Davidlohr Bueso
2017-04-07 10:08 ` Dilger, Andreas
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=907C3F64-C3AF-4027-98F2-58877E650368@intel.com \
--to=andreas.dilger@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=jack@suse.cz \
--cc=jsimmons@infradead.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=oleg.drokin@intel.com \
--cc=peterz@infradead.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®