Re: [PATCH v2 00/27] NFSD operation monitoring tracepoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Sep 25, 2020, at 2:37 PM, Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
> 
> On Fri, Sep 25, 2020 at 01:04:55PM -0400, Chuck Lever wrote:
>>> On Sep 25, 2020, at 11:05 AM, Chuck Lever <chuck.lever@xxxxxxxxxx> wrote:
>>>> On Sep 25, 2020, at 11:00 AM, Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
>>>> On Fri, Sep 25, 2020 at 10:36:42AM -0400, Chuck Lever wrote:
>>>>>> One thing I was wondering about: how would you limit tracing to a single
>>>>>> client, say if you wanted to see all DELEGRETURNs from a single client?
>>>>>> I guess you'd probably turn on a tracepoint in the receive code, look
>>>>>> for your client's IP address, then mask the task id to match later
>>>>>> nfs-level tracepoints.  Is there enough information in those tracepoints
>>>>>> (including network namespace) to uniquely identify a client?
>>>>> 
>>>>> Client IP address information is in the RPC layer trace data. The
>>>>> DELEGRETURN trace record includes client ID. So maybe not as
>>>>> straightforward as it could be.
>>>> 
>>>> I guess what I meant was "limit tracing to a single network endpoint",
>>>> not exactly limt to a single NFSv4 client....  So, we can do that as
>>>> long as all the relevant information is in rpc-layer tracepoints, and as
>>>> long as task id is a reliable way to match up trace points.
>>>> 
>>>> Is the network namespace in there anywhere?  It looks like there'd be no
>>>> way to distinguish clients in different namespaces if they had the same
>>>> address.
>>> 
>>> The client ID has the boot verifier for the net namespace.
>>> 
>>> None of this helps NFSv3, though.
>> 
>> It probably wouldn't be difficult to stuff the client IP address
>> and the boot verifier in the trace record for each procedure.
>> 
>> Do you think that would be sufficient?
> 
> Despite using 64 bits the boot verifier isn't even guaranteed to
> uniquely identify a network namespace.  There should be something
> better.  Digging around....  ns->inum, I think?

Could use that, but NFSD already uses the boot verifier everywhere.
I'll have a look.


> I don't know if it (or ports or addresses) needs to be in every trace
> record.  Maybe just once somewhere in one of the rpc layer tracepoints,
> and then we can use the nfsd task id to connect it with other
> tracepoints if necessary.  Does that make sense?

If you want to do filtering during capture, you want to have this
kind of information available in each record so the generic trace
utilities can find it.

We don't have to display it in every record that is output by
trace-cmd report, though.


--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux