[illumos-Developer] webrev for 1107
Dan Kruchinin
dkruchinin at acm.org
Mon Jun 13 14:37:12 PDT 2011
Ok, I'll try to test this variant.
On Tue, Jun 14, 2011 at 1:26 AM, Dan Kruchinin <dkruchinin at acm.org> wrote:
> On Tue, Jun 14, 2011 at 12:45 AM, Vitaliy Gusev
> <gusev.vitaliy at nexenta.com> wrote:
>>>>
>>>> No, do_one doesn't call do_poll_cots_action. I as mentioned early,
>>>> call stack is:
>>>>
>>>> poll_for_action
>>>> do_poll_cots_action
>>>> cots_listen_event
>>>
>>> Heh, your're right, I confused poll_for_actions with add_to_poll_list,
>>> which is called by do_one.
>>> But your point point opens several questions. First of all I need to
>>> explain why we need OK_TPI_TYPE
>>> instead of checking of nc_semantics on NC_TPI_CLTS only.
>>
>>
>> I think it creates kernel thread on each connect for COTS - so we can do it
>> only on connect, whereas for udp it can be started at once.
>
> Thanks for explanation, Vitaliy, now it makes sense.
> XTI/TLI is very new thing for me, so correct me if I'm wrong trying to
> clarify everything:
> cots_listen_events catches connections from remote hosts - in case of
> nfsd - and gives
> fd corresponding to new connection to kernel space which in its turn
> acts as server for
> each new client.
> So nfsd (and all COTS related nfs_tbind code) only accepts new
> connections giving
> kernel a chance to make all other communication related work.
>
> If so, probably this way is appropriate for lockd with ticotsord
> provider, because ticotsord is
> used as direct communication channel between lockd itself and kernel space.
>
>>
>>
>>>
>>> Both nfsd and lockd calls do_one function and pass svc callback to it.
>>> In case of lockd svc callback
>>> is nlmsvc function which calls LM_SVC nfs syscall that opens in its
>>> turn makes kernel to register
>>> kRPC server handles for given protocols and devices. By some reason
>>
>> ...
>>
>>> In case of nfsd do_one function calls nfssvc callback for CLTS only.
>>> nfssvc calls NFS_SVC nfssys
>>> that in its turn creates kRPC server handle. According to the code,
>>> nfs_tbind.c will create only CLTS
>>> kRPC server handles for nfsd. Is it right?
>>
>>
>>
>> 1. For udp it will be called at once from do_one()
>>
>> 2. For tcp it delays until incoming connection arrives. For nfsd see to
>>
>>
>> *** src/cmd/fs.d/nfs/nfsd/nfsd.c:
>> int (*Mysvc)(int , struct netbuf, struct netconfig *) = nfssvc;
>>
>> *** src/cmd/fs.d/nfs/lib/nfs_tbind.c:
>> cots_listen_event[1425] ret = (*Mysvc)(new_fd, addrmask, nconf);
>>
>>
>>
>>
>
>
>
> --
> W.B.R.
> Dan Kruchinin
>
--
W.B.R.
Dan Kruchinin
More information about the Developer
mailing list