public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: NeilBrown <neilb@suse.de>
Cc: Jeff Layton <jlayton@kernel.org>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 06/10] SUNRPC/svc: add light-weight queuing mechanism.
Date: Fri, 18 Aug 2023 09:38:23 -0400	[thread overview]
Message-ID: <ZN90Tz2sDLs1Lmyd@tissot.1015granger.net> (raw)
In-Reply-To: <169230997620.11967.10640869594379522024@noble.neil.brown.name>

On Fri, Aug 18, 2023 at 08:06:16AM +1000, NeilBrown wrote:
> On Fri, 18 Aug 2023, Chuck Lever wrote:
> > On Tue, Aug 15, 2023 at 11:54:22AM +1000, NeilBrown wrote:
> > > lwq is a FIFO single-linked queue that only requires a spinlock
> > > for dequeueing, which happens in process context.  Enqueueing is atomic
> > > with no spinlock and can happen in any context.
> > > 
> > > Include a unit test for basic functionality - runs a boot/module-load
> > > time.  Does not use kunit framework.
> > > 
> > > Signed-off-by: NeilBrown <neilb@suse.de>
> > > ---
> > >  include/linux/sunrpc/svc_lwq.h |  79 +++++++++++++++++++
> > 
> > I'm wondering what your longer-term intentions are for this new
> > mechanism. If it is only useful for SunRPC, then perhaps this
> > header belongs under net/sunrpc instead.
> 
> I try to avoid long-term intentions, they rarely work out :-)
> 
> I did want to put it under net/sunrpc.  But that requires moving
> structure definitions for svc_pool, svc_serv, and svc_xprt into
> net/sunrpc - which I would like to do.
> But there are a few places where svc_xprt (at least) is accessed from
> fs/nfsd/ either directly (xpt_flags, xpt_cred, xpt_local ...) or
> through inlines. (svc_xprt_get(), svc_xpt_set_local() ...).
> 
> We we would need to create APIs to replace the direct accesses, and turn
> the inlines into EXPORT_SYMBOL function.
> 
> So I don't think it is practical.

Fair enough. It doesn't look difficult to fix those issues (which
are effectively layering violations) but perhaps that's for another
day.

Meanwhile, do these new files need names that begin with "svc_" ?
I don't see anything server-specific about them. I'd prefer just
"lwq.[ch]".


-- 
Chuck Lever

  reply	other threads:[~2023-08-18 13:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  1:54 [PATCH 00/10] SUNRPC: remainder of srv queueing work NeilBrown
2023-08-15  1:54 ` [PATCH 01/10] SQUASH: SUNRPC: rename and refactor svc_get_next_xprt() NeilBrown
2023-08-15  1:54 ` [PATCH 02/10] SUNRPC: add list of idle threads NeilBrown
2023-08-15  1:54 ` [PATCH 03/10] SUNRPC: discard SP_CONGESTED NeilBrown
2023-08-15  1:54 ` [PATCH 04/10] SUNRPC: change service idle list to be an llist NeilBrown
2023-08-15 16:59   ` Chuck Lever
2023-08-15 22:44     ` NeilBrown
2023-08-16 15:56       ` Chuck Lever
2023-08-15  1:54 ` [PATCH 05/10] SUNRPC: only have one thread waking up at a time NeilBrown
2023-08-15  1:54 ` [PATCH 06/10] SUNRPC/svc: add light-weight queuing mechanism NeilBrown
2023-08-17 14:41   ` Chuck Lever
2023-08-17 22:06     ` NeilBrown
2023-08-18 13:38       ` Chuck Lever [this message]
2023-08-15  1:54 ` [PATCH 07/10] SUNRPC: use lwq for sp_sockets - renamed to sp_xprts NeilBrown
2023-08-15  1:54 ` [PATCH 08/10] SUNRPC: change sp_nrthreads to atomic_t NeilBrown
2023-08-15  1:54 ` [PATCH 09/10] SUNRPC: discard sp_lock NeilBrown
2023-08-15  1:54 ` [PATCH 10/10] SUNRPC: change the back-channel queue to lwq NeilBrown

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=ZN90Tz2sDLs1Lmyd@tissot.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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