linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>, jarkko.sakkinen@linux.intel.com
Cc: flihp@twobit.us, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 RESEND 2/2] tpm: add support for nonblocking operation
Date: Mon, 06 Aug 2018 17:35:45 -0700	[thread overview]
Message-ID: <1533602145.3159.23.camel@HansenPartnership.com> (raw)
In-Reply-To: <1064594c-3a3f-4d2a-5d94-e8314b330292@intel.com>

On Mon, 2018-08-06 at 17:09 -0700, Tadeusz Struk wrote:
> On 08/06/2018 04:05 PM, James Bottomley wrote:
> > For an async interface, shouldn't I be able to queue an
> > arbitrary number of commands without blocking?
> 
> That was the approach in the v1 version of this patch, but
> Jason requested this to be changed so that only one command
> at a time can be processed.

He did?  I don't remember that.  I think he told you the TPM itself can
only process one operation at once so you didn't need an elaborate
allocation scheme.

But anyway, if you're happy to limit the interface to block after one
command is issued, how is it useful as an asynchronous interface?  I
thought the whole argument for the patch was to avoid the producer-
consumer approach which is possible with the current interface and to
use a fully event driven polling interface which can be implemented
single threaded.  If you can block in submission, this latter isn't
really possible because your interface isn't really asynchronous.

James


  reply	other threads:[~2018-08-07  0:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 21:09 [PATCH v3 RESEND 0/2] tpm: add support for nonblocking operation Tadeusz Struk
2018-08-06 21:14 ` [PATCH v3 RESEND 1/2] tpm: add ptr to the tpm_space struct to file_priv Tadeusz Struk
2018-08-06 21:14 ` [PATCH v3 RESEND 2/2] tpm: add support for nonblocking operation Tadeusz Struk
2018-08-06 23:05   ` James Bottomley
2018-08-07  0:09     ` Tadeusz Struk
2018-08-07  0:35       ` James Bottomley [this message]
2018-08-07 17:54         ` Tadeusz Struk
2018-08-07 18:20     ` Jason Gunthorpe
2018-08-07 19:09       ` Tadeusz Struk

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=1533602145.3159.23.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=flihp@twobit.us \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=tadeusz.struk@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).