CXL driver synchronizes the PSL timebase with the CAPP during
initialization. If it can't synchronize, then the driver currently
fails and the cxl adapter is not usable. That behavior is a bit
extreme for the time being, as some adapters are known to have
troubles syncing their PSL timebase and there are no known use of it.
Introduce a psl_timebase module parameter to control whether PSL
timebase is required or not. Default is to allow initializaton even if
syncing failed.
Default behavior will be changed when current issues with some cxl
adapters are resolved.
Signed-off-by: Frederic Barrat <redacted>
---
drivers/misc/cxl/cxl.h | 1 +
drivers/misc/cxl/main.c | 4 ++++
drivers/misc/cxl/pci.c | 7 +++++--
3 files changed, 10 insertions(+), 2 deletions(-)
CXL driver synchronizes the PSL timebase with the CAPP during
initialization. If it can't synchronize, then the driver currently
fails and the cxl adapter is not usable. That behavior is a bit
extreme for the time being, as some adapters are known to have
troubles syncing their PSL timebase and there are no known use of it.
Introduce a psl_timebase module parameter to control whether PSL
timebase is required or not. Default is to allow initializaton even if
syncing failed.
Default behavior will be changed when current issues with some cxl
adapters are resolved.
Signed-off-by: Frederic Barrat <redacted>
---
Same as before, but this patch applies on 'next'
drivers/misc/cxl/cxl.h | 1 +
drivers/misc/cxl/main.c | 4 ++++
drivers/misc/cxl/pci.c | 7 +++++--
3 files changed, 10 insertions(+), 2 deletions(-)
From: Michael Neuling <hidden> Date: 2016-03-15 00:27:29
On Mon, 2016-03-14 at 20:29 +0100, Frederic Barrat wrote:
CXL driver synchronizes the PSL timebase with the CAPP during
initialization. If it can't synchronize, then the driver currently
fails and the cxl adapter is not usable. That behavior is a bit
extreme for the time being, as some adapters are known to have
troubles syncing their PSL timebase and there are no known use of it.
=20
Introduce a psl_timebase module parameter to control whether PSL
timebase is required or not. Default is to allow initializaton even
if
syncing failed.
Default behavior will be changed when current issues with some cxl
adapters are resolved.
I'm not happy with doing this unless we add something which advertises
that it's synced or not to userspace.
If we do that, I'm happy to just fail without the need of the parameter
but advertise it to userspace.
The parameter is a bit of a PITA too, as it's a driver level config not
card level. You really want to turn it on/off based on the card, not
the whole system.
Mikey
quoted hunk
=20
Signed-off-by: Frederic Barrat <redacted>
---
=20
Same as before, but this patch applies on 'next'
=20
drivers/misc/cxl/cxl.h | 1 +
drivers/misc/cxl/main.c | 4 ++++
drivers/misc/cxl/pci.c | 7 +++++--
3 files changed, 10 insertions(+), 2 deletions(-)
=20
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-03-15 03:56:27
On Tue, 2016-03-15 at 11:27 +1100, Michael Neuling wrote:
On Mon, 2016-03-14 at 20:29 +0100, Frederic Barrat wrote:
quoted
CXL driver synchronizes the PSL timebase with the CAPP during
initialization. If it can't synchronize, then the driver currently
fails and the cxl adapter is not usable. That behavior is a bit
extreme for the time being, as some adapters are known to have
troubles syncing their PSL timebase and there are no known use of it.
Introduce a psl_timebase module parameter to control whether PSL
timebase is required or not. Default is to allow initializaton even
if
syncing failed.
Default behavior will be changed when current issues with some cxl
adapters are resolved.
I'm not happy with doing this unless we add something which advertises
that it's synced or not to userspace.
If we do that, I'm happy to just fail without the need of the parameter
but advertise it to userspace.
The parameter is a bit of a PITA too, as it's a driver level config not
card level. You really want to turn it on/off based on the card, not
the whole system.
And it just sounds like a big hack around broken hardware, which we'll have to
carry for the foreseeable future.
cheers
I'm not happy with doing this unless we add something which advertises
that it's synced or not to userspace.
If we do that, I'm happy to just fail without the need of the parameter
but advertise it to userspace.
The parameter is a bit of a PITA too, as it's a driver level config not
card level. You really want to turn it on/off based on the card, not
the whole system.
Would a bool attribute in sysfs for the card (e.g timebase_sync) make
sense? We can by default ignore (and log) timebase sync errors during card
initialization and provide a simple wrapper in libcxl to query and set
this attribute afterwards.
Also it might be better if the AFU advertises the need for timebase
synchronization via a configuration record so that we enable it for the
psl iif one of the slices asks for it. I am not sure if this possible at
the moment but I believe it something we can put forth the psl/hdk team
before timebase usage becomes more widespread.
~ Vaibhav
Hi Mikey,
Le 15/03/2016 01:27, Michael Neuling a écrit :
I'm not happy with doing this unless we add something which advertises
that it's synced or not to userspace.
If we do that, I'm happy to just fail without the need of the parameter
but advertise it to userspace.
OK, so I'm guessing that by advertising, you mean more than logging
something in dmesg, since that's already the case.
Are you suggesting to make the sync status available programmatically
(like through a status on /sys)? Seems like it would be pushing some
work on applications which want to use the psl timebase in the future,
just because there's currently a problem with some card models.
So I doubt I'm understanding you correctly here.
My vote was to keep it simple: it's all or nothing. If the driver claims
to support psl timebase sync, it should work on all the cards. This is
not the case today, so let's not make it a requirement until we are
confident it's working as expected. cxlflash is not using it, so there
should be no harm done. We'd keep the psl sync code in mostly to get
exposure on multiple setups.
The parameter is a bit of a PITA too, as it's a driver level config not
card level. You really want to turn it on/off based on the card, not
the whole system.
I don't really care about the module parameter. It was mostly a feeble
attempt to be developer-friendly and activate the feature easily on some
setup.
Fred
And it just sounds like a big hack around broken hardware, which we'll have to
carry for the foreseeable future.
I discussed with Mikey about what would be acceptable here. There's
basically no good solution. No matter how we workaround the issue, we'll
have to pay a price in the future.
Removing the psl timebase sync code is not desirable either as we cannot
be 100% sure it's not being used by someone (on the cards where it works).
So our only option at this point is to just keep debugging the
problematic setups to come up with the real fix. In the meantime, this
patch can be dropped.
Fred
From: Ian Munsie <hidden> Date: 2016-03-17 01:42:42
Excerpts from Michael Neuling's message of 2016-03-15 11:27:29 +1100:
I'm not happy with doing this unless we add something which advertises
that it's synced or not to userspace.
In my opinion this is probably unnecessary (but it's not a bad idea
either and I'm happy for that to be added). As far as I know, no one is
using timebase in an AFU today, or if they are it is on working cards
(if it wasn't someone would have complained by now).
This change is just to make it so that the affected cards will work at
all, since at the moment we treat the failure of this feature no one
uses as fatal.
If / when someone actually needs timebase, they will have to debug the
root cause of the problem anyway (if we haven't already), at which point
they will have a working card regardless of whether this patch is merged
or not.
If it turns out to be a software bug it is not unreasonable for them to
say that their afu is only supported by kernel or firmware "whatever
version we fix it in".
That said, a read-only attribute in sysfs to indicate whether the
timebase is synced or not would be fine and give them something they can
query if they care about it.
The parameter is a bit of a PITA too, as it's a driver level config not
card level. You really want to turn it on/off based on the card, not
the whole system.
I don't agree - userspace already needs to know what AFU they are
dealing with and therefore knows if the timebase is important or not. A
read-only attribute in sysfs would be enough to tell them this. We can
be fairly confident that there is no software that would need to be
changed to check this today since we had been failing the whole init so
it wouldn't have worked at all regardless.
We did have a software bug where the sync was sensitive to the kernel
config, but that has been fixed. If anyone was using timebase (and I
don't think anyone was) already and lucked out by testing on a kernel
config that was working this won't impact them either since those cards
will work either way now that issue has been fixed.
IMO, we should ditch the module parameter altogether and never treat
timebase sync failure as fatal, and leave that up to any applications
actually need it to check.
Cheers,
-Ian
From: Michael Neuling <hidden> Date: 2016-03-17 02:45:09
IMO, we should ditch the module parameter altogether and never treat
timebase sync failure as fatal, and leave that up to any applications
actually need it to check.