[PATCH 0/2] nfsd: use threads array as-is in netlink thread set interface

Jeff Layton posted 2 patches 6 months, 3 weeks ago
fs/nfsd/nfsctl.c              |  5 ++---
include/trace/events/sunrpc.h | 23 ++++++++++++++++++-----
net/sunrpc/svc.c              |  5 ++++-
3 files changed, 24 insertions(+), 9 deletions(-)
[PATCH 0/2] nfsd: use threads array as-is in netlink thread set interface
Posted by Jeff Layton 6 months, 3 weeks ago
The first patch is probably appropriate for stable. It should fix
problems when someone sets the pool_mode to pernode, without userland
sending down a fully-populated thread array.

The second patch just adds a couple of new tracepoints that I ended up
using to track this down.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (2):
      nfsd: use threads array as-is in netlink interface
      sunrpc: new tracepoints around svc thread wakeups

 fs/nfsd/nfsctl.c              |  5 ++---
 include/trace/events/sunrpc.h | 23 ++++++++++++++++++-----
 net/sunrpc/svc.c              |  5 ++++-
 3 files changed, 24 insertions(+), 9 deletions(-)
---
base-commit: 914873bc7df913db988284876c16257e6ab772c6
change-id: 20250527-rpc-numa-600daff3f36e

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>
Re: [PATCH 0/2] nfsd: use threads array as-is in netlink thread set interface
Posted by cel@kernel.org 6 months, 3 weeks ago
From: Chuck Lever <chuck.lever@oracle.com>

On Tue, 27 May 2025 20:12:46 -0400, Jeff Layton wrote:
> The first patch is probably appropriate for stable. It should fix
> problems when someone sets the pool_mode to pernode, without userland
> sending down a fully-populated thread array.
> 
> The second patch just adds a couple of new tracepoints that I ended up
> using to track this down.
> 
> [...]

Applied to nfsd-testing, thanks!

[1/2] nfsd: use threads array as-is in netlink interface
      commit: b2a9a114a3c7f5abfa2875b70ce9b73525a74291
[2/2] sunrpc: new tracepoints around svc thread wakeups
      commit: 65b8babe551bddf00aac69bc905f88a4e0371766

--
Chuck Lever
Re: [PATCH 0/2] nfsd: use threads array as-is in netlink thread set interface
Posted by Jeff Layton 6 months, 3 weeks ago
On Wed, 2025-05-28 at 14:11 -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> On Tue, 27 May 2025 20:12:46 -0400, Jeff Layton wrote:
> > The first patch is probably appropriate for stable. It should fix
> > problems when someone sets the pool_mode to pernode, without userland
> > sending down a fully-populated thread array.
> > 
> > The second patch just adds a couple of new tracepoints that I ended up
> > using to track this down.
> > 
> > [...]
> 
> Applied to nfsd-testing, thanks!
> 
> [1/2] nfsd: use threads array as-is in netlink interface
>       commit: b2a9a114a3c7f5abfa2875b70ce9b73525a74291
> [2/2] sunrpc: new tracepoints around svc thread wakeups
>       commit: 65b8babe551bddf00aac69bc905f88a4e0371766
> 

My apologies, Chuck. Patch #2 has a bug in it:

+       trace_svc_pool_thread_noidle(pool, rqstp->rq_task->pid);

In the call above, the rqstp will be undefined. That should be:

+       trace_svc_pool_thread_noidle(pool, 0);

You can fix that up in tree, or I can resend if you prefer.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>
Re: [PATCH 0/2] nfsd: use threads array as-is in netlink thread set interface
Posted by Chuck Lever 6 months, 3 weeks ago
On 5/28/25 2:22 PM, Jeff Layton wrote:
> On Wed, 2025-05-28 at 14:11 -0400, cel@kernel.org wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>>
>> On Tue, 27 May 2025 20:12:46 -0400, Jeff Layton wrote:
>>> The first patch is probably appropriate for stable. It should fix
>>> problems when someone sets the pool_mode to pernode, without userland
>>> sending down a fully-populated thread array.
>>>
>>> The second patch just adds a couple of new tracepoints that I ended up
>>> using to track this down.
>>>
>>> [...]
>>
>> Applied to nfsd-testing, thanks!
>>
>> [1/2] nfsd: use threads array as-is in netlink interface
>>       commit: b2a9a114a3c7f5abfa2875b70ce9b73525a74291
>> [2/2] sunrpc: new tracepoints around svc thread wakeups
>>       commit: 65b8babe551bddf00aac69bc905f88a4e0371766
>>
> 
> My apologies, Chuck. Patch #2 has a bug in it:
> 
> +       trace_svc_pool_thread_noidle(pool, rqstp->rq_task->pid);
> 
> In the call above, the rqstp will be undefined. That should be:
> 
> +       trace_svc_pool_thread_noidle(pool, 0);
> 
> You can fix that up in tree, or I can resend if you prefer.

Fixed.


-- 
Chuck Lever