Re: [PATCH v3 0/2] tpm: add support for nonblocking operation

Tadeusz Struk
2018-06-21T16:20:39Z

On 06/20/2018 10:26 PM, James Bottomley wrote:
>> Yes, it does polling:
>> http://docs.libuv.org/en/v1.x/design.html#the-i-o-loop
> But that's for networking. You'll be talking to the TPM RM over the
> file descriptor so that follows the thread pool model in
>
> http://docs.libuv.org/en/v1.x/design.html#file-i-o
>
> This precisely describes the current file descriptor abstraction we'd
> use for the TPM.

That is for the file IO that doesn't support non-blocking, because there
is no need for it as the operations are "fast".
Operations on the TPM would fall under the io loop model.

>
>> Regardless of how it actually might be used, I'm happy that we agree
>> on that this *is* the right thing to do.
> I didn't say that. I think using a single worker thread queue is the
> correct abstraction for the TPM. If there's a legacy use case for
> poll(), I don't see why not since the code seems to be fairly small and
> self contained, but I don't really see it as correct or necessary to do
> it that way.

This discussion starts to go around the circle. You don't agree, but you
also don't disagree? Is this what you are saying?
Thanks,
--
Tadeusz