Re: /sys/module/pcie_aspm/parameters/policy not writable?

From: Pavel Machek
Date: Tue Jul 09 2013 - 13:15:58 EST


Hi!

> > > > My thinkpad has rather high ping latencies... and perhaps it is due to
> > > > PCIE ASPM.
> > >
> > > Why would that be the problem? The odds that the PCIE bus is the issue
> > > seems strange to me.
> >
> > Aha: I guess that's why the file is not writable:
> >
> > pavel@amd:~$ dmesg | grep -i aspm
> > ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
> > e1000e 0000:02:00.0: Disabling ASPM L0s L1
> > pavel@amd:~$ cat /sys/module/pcie_aspm/parameters/policy
> > [default] performance powersave
> > pavel@amd:~$
> > root@amd:~# echo -n performance >
> > /sys/module/pcie_aspm/parameters/policy
> > -su: echo: write error: Operation not permitted
> > root@amd:~#
> >
> > But:
> > 1) it should not list unavailable options
>
> It's a module parameter, you can't control if they are present or not
> dynamically.
>
> > 2) operation not permitted seems like wrong error code for
> > operation not supported.
>
> Then what should it be?

I'd vote for EOPNOTSUPP /* Operation not supported on transport
endpoint */ ... its certainly closer. EIO would also be an option.
You are right we do not have really suitable errno.

Operation not permitted is bad because it made me think that kernel
denied the request for some reason, not that hardware does not support it.

Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/