Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710818 > unrolled thread
| Started by | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| First post | 2017-08-14 13:00 +0200 |
| Last post | 2017-08-15 08:10 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-08-14 13:00 +0200
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-08-14 13:00 +0200
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-08-14 14:10 +0200
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-08-15 08:10 +0200
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-08-14 14:20 +0200
Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-08-15 08:10 +0200
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-08-14 13:00 +0200 |
| Subject | Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount |
| Message-ID | <uelgd-389-17@gated-at.bofh.it> |
On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > Hi Ken, > > > (again speaking only on my behalf, not my employer) > > > > > > > Does anyone know of platforms where this occurs? > > > > I suspect (but not sure) that the days of SuperIO connecting floppy > > > > drives, printer ports, and PS/2 mouse ports on the LPC bus are over, and > > > > such legacy systems will not have a TPM. Would SuperIO even support the > > > > special TPM LPC bus cycles? > > > > > > Since we are the linux kernel, we do have to care for legacy devices. > > > And a system with LPC, PS2Mouse on SuperIO and a TPM are not that uncommon. > > > > > > And heck, we even have support for 1.1b TPM devices.... > > > > > > > > > >> One more viewpoint: TCG must added the burst count for a reason (might > > > >> be very well related what Peter said). Is ignoring it something that TCG > > > >> recommends? Not following standard exactly in the driver code sometimes > > > >> makes sense on *small details* but I would not say that this a small > > > >> detail... > > > > > > > I checked with the TCG's device driver work group (DDWG). Both the spec > > > > editor and 3 TPM vendors - Infineon, Nuvoton, and ST Micro - agreed that > > > > ignoring burst count may incur wait states but nothing more. Operations > > > > will still be successful. > > > > > > Interesting - let me check with Georg tomorrow. > > > Unfortunately I do not have access to my tcg mails from home (since I'm not working :), > > > but did you _explicitly_ talk about LPC and the system? > > > I'm sure the TPM does not care about the waitstates... > > > > > > If my memory does not betray me, > > > it is actually possible to "freeze up" a system completly by flooding the lpc bus. > > > Let me double check tomorrow... > > > > > > > > > In anycase - I really would like to see a much more performant tpm subsystem - > > > however it will be quite an effort with a lot of legacy testing. > > > (which I unfortunately cannot spend on my private time ... and also of course lacking test systems). > > > > > > Thanks, > > > Peter > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > usage across the subsystem before considering this. I.e. wrapper that > > internally uses usleep_range(). This way we can mechanically convert > > everything to a more low latency option. > > Fine. I assume you meant tpm_sleep(), not tpm_msleep(). I think it would sense to have a function that takes msecs because msecs are mostly used everywhere in the subsystem. This way we don't have to change any of the existing constants. > > This should have been done already for patch that Mini and Nayna > > provided instead of open coding stuff. > > At that time, we had no idea what caused the major change in TPM > performance. We only knew that the change occurred somewhere between > linux-4.7 and linux-4.8. Even after figuring out it was the change to > msleep(), we were hoping that msleep() would be fixed. So your > comment, that we should have done it differently back then, is > unwarranted. I wasn't trying to point the blame to you at all. I didn't bring this to table back then myself. I agree what you are saying. I was mainly trying to explain why I think it should be done this way now while I didn't suggest it back then :-) > > That change is something that can be applied right now. On the other > > hand, this is a very controversial change. > > Since the main concern about this change is breaking old systems that > might potentially have other peripherals hanging off the LPC bus, can > we define a new Kconfig option, with the default as 'N'? > > Mimi I guess that could make sense but I would like to hear feedback first. /Jarkko
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-08-14 13:00 +0200 |
| Message-ID | <uelge-389-23@gated-at.bofh.it> |
| In reply to | #1710818 |
On Mon, Aug 14, 2017 at 01:51:30PM +0300, Jarkko Sakkinen wrote: > On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > > Hi Ken, > > > > (again speaking only on my behalf, not my employer) > > > > > > > > > Does anyone know of platforms where this occurs? > > > > > I suspect (but not sure) that the days of SuperIO connecting floppy > > > > > drives, printer ports, and PS/2 mouse ports on the LPC bus are over, and > > > > > such legacy systems will not have a TPM. Would SuperIO even support the > > > > > special TPM LPC bus cycles? > > > > > > > > Since we are the linux kernel, we do have to care for legacy devices. > > > > And a system with LPC, PS2Mouse on SuperIO and a TPM are not that uncommon. > > > > > > > > And heck, we even have support for 1.1b TPM devices.... > > > > > > > > > > > > >> One more viewpoint: TCG must added the burst count for a reason (might > > > > >> be very well related what Peter said). Is ignoring it something that TCG > > > > >> recommends? Not following standard exactly in the driver code sometimes > > > > >> makes sense on *small details* but I would not say that this a small > > > > >> detail... > > > > > > > > > I checked with the TCG's device driver work group (DDWG). Both the spec > > > > > editor and 3 TPM vendors - Infineon, Nuvoton, and ST Micro - agreed that > > > > > ignoring burst count may incur wait states but nothing more. Operations > > > > > will still be successful. > > > > > > > > Interesting - let me check with Georg tomorrow. > > > > Unfortunately I do not have access to my tcg mails from home (since I'm not working :), > > > > but did you _explicitly_ talk about LPC and the system? > > > > I'm sure the TPM does not care about the waitstates... > > > > > > > > If my memory does not betray me, > > > > it is actually possible to "freeze up" a system completly by flooding the lpc bus. > > > > Let me double check tomorrow... > > > > > > > > > > > > In anycase - I really would like to see a much more performant tpm subsystem - > > > > however it will be quite an effort with a lot of legacy testing. > > > > (which I unfortunately cannot spend on my private time ... and also of course lacking test systems). > > > > > > > > Thanks, > > > > Peter > > > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > usage across the subsystem before considering this. I.e. wrapper that > > > internally uses usleep_range(). This way we can mechanically convert > > > everything to a more low latency option. > > > > Fine. I assume you meant tpm_sleep(), not tpm_msleep(). > > I think it would sense to have a function that takes msecs because msecs > are mostly used everywhere in the subsystem. This way we don't have to > change any of the existing constants. > > > > This should have been done already for patch that Mini and Nayna > > > provided instead of open coding stuff. > > > > At that time, we had no idea what caused the major change in TPM > > performance. We only knew that the change occurred somewhere between > > linux-4.7 and linux-4.8. Even after figuring out it was the change to > > msleep(), we were hoping that msleep() would be fixed. So your > > comment, that we should have done it differently back then, is > > unwarranted. > > I wasn't trying to point the blame to you at all. I didn't bring this to > table back then myself. I agree what you are saying. > > I was mainly trying to explain why I think it should be done this way > now while I didn't suggest it back then :-) > > > > That change is something that can be applied right now. On the other > > > hand, this is a very controversial change. > > > > Since the main concern about this change is breaking old systems that > > might potentially have other peripherals hanging off the LPC bus, can > > we define a new Kconfig option, with the default as 'N'? > > > > Mimi > > I guess that could make sense but I would like to hear feedback first. > > /Jarkko And I'm worried would that it'd be left for many years to come as an option. I do not have any metrics what portion of hardware in the field would break if this is turned on. It would slow down kernel testing as I would have to run tests for the driver with that option turned on and off because it is a major shift from how driver functions. And I have zero idea how long I would go on doing this. One maybe a little bit better option would be to have a sysfs attribute for this functionality (disable_burst_count). What do you think about that? /Jarkko
[toc] | [prev] | [next] | [standalone]
| From | Mimi Zohar <zohar@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-08-14 14:10 +0200 |
| Message-ID | <uemlX-3Zn-7@gated-at.bofh.it> |
| In reply to | #1710820 |
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > internally uses usleep_range(). This way we can mechanically convert > > > > everything to a more low latency option. > > > > > > Fine. I assume you meant tpm_sleep(), not tpm_msleep(). > > > > I think it would sense to have a function that takes msecs because msecs > > are mostly used everywhere in the subsystem. This way we don't have to > > change any of the existing constants. For now converting from msleep() to tpm_msleep() will be straight forward. Internally we would just use usleep_range(). Going forward, my concern is that even 1 msec might be too long for some of these sleeps. Mimi
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-08-15 08:10 +0200 |
| Message-ID | <ueDd8-64p-9@gated-at.bofh.it> |
| In reply to | #1710879 |
On Mon, Aug 14, 2017 at 08:03:05AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > > internally uses usleep_range(). This way we can mechanically convert > > > > > everything to a more low latency option. > > > > > > > > Fine. I assume you meant tpm_sleep(), not tpm_msleep(). > > > > > > I think it would sense to have a function that takes msecs because msecs > > > are mostly used everywhere in the subsystem. This way we don't have to > > > change any of the existing constants. > > For now converting from msleep() to tpm_msleep() will be straight > forward. Internally we would just use usleep_range(). > > Going forward, my concern is that even 1 msec might be too long for > some of these sleeps. > > Mimi We can revisit this. I would take the simple route right now. /Jarkko
[toc] | [prev] | [next] | [standalone]
| From | Mimi Zohar <zohar@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-08-14 14:20 +0200 |
| Message-ID | <uemvD-42v-3@gated-at.bofh.it> |
| In reply to | #1710820 |
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > Since the main concern about this change is breaking old systems that > > > might potentially have other peripherals hanging off the LPC bus, can > > > we define a new Kconfig option, with the default as 'N'? > > > > > > Mimi > > > > I guess that could make sense but I would like to hear feedback first. > > > > /Jarkko > > And I'm worried would that it'd be left for many years to come as an > option. I do not have any metrics what portion of hardware in the field > would break if this is turned on. > > It would slow down kernel testing as I would have to run tests for the > driver with that option turned on and off because it is a major shift > from how driver functions. And I have zero idea how long I would go on > doing this. > > One maybe a little bit better option would be to have a sysfs attribute > for this functionality (disable_burst_count). What do you think about > that? That works! So we'll define a module_param named disable_burst_count, which can be specified on the boot command line. Mimi
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-08-15 08:10 +0200 |
| Message-ID | <ueDd7-64p-5@gated-at.bofh.it> |
| In reply to | #1710885 |
On Mon, Aug 14, 2017 at 08:12:53AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > Since the main concern about this change is breaking old systems that > > > > might potentially have other peripherals hanging off the LPC bus, can > > > > we define a new Kconfig option, with the default as 'N'? > > > > > > > > Mimi > > > > > > I guess that could make sense but I would like to hear feedback first. > > > > > > /Jarkko > > > > And I'm worried would that it'd be left for many years to come as an > > option. I do not have any metrics what portion of hardware in the field > > would break if this is turned on. > > > > It would slow down kernel testing as I would have to run tests for the > > driver with that option turned on and off because it is a major shift > > from how driver functions. And I have zero idea how long I would go on > > doing this. > > > > One maybe a little bit better option would be to have a sysfs attribute > > for this functionality (disable_burst_count). What do you think about > > that? > > That works! So we'll define a module_param named disable_burst_count, > which can be specified on the boot command line. > > Mimi That would work for me. /Jarkko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web