From: Martin Peres <martin.peres@free.fr>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Greg KH <greg@kroah.com>, Pavel Machek <pavel@ucw.cz>,
kernel list <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>
Subject: Re: unparseable, undocumented /sys/class/drm/.../pstate
Date: Mon, 23 Jun 2014 20:00:17 +0200 [thread overview]
Message-ID: <53A86B31.8090307@free.fr> (raw)
In-Reply-To: <CAKb7UvjPc1XGY7tETaMtn2N3ySq01CB6dLubVOZgW+NR_gsYMw@mail.gmail.com>
Le 23/06/2014 19:56, Ilia Mirkin a écrit :
> On Mon, Jun 23, 2014 at 1:46 PM, Martin Peres <martin.peres@free.fr> wrote:
>> Le 23/06/2014 18:40, Ilia Mirkin a écrit :
>>>
>>> On Mon, Jun 23, 2014 at 12:36 PM, Greg KH <greg@kroah.com> wrote:
>>>>
>>>> On Mon, Jun 23, 2014 at 12:18:51PM -0400, Ilia Mirkin wrote:
>>>> A list of valid "values" that a file can be in is fine if you just then
>>>> write one value back to that file. That's the one exception, but a
>>>> minor one given the huge number of sysfs files. Other than that, if you
>>>
>>>
>>> Which is pretty much what the pstate file is. Would it make things
>>> better if we removed the descriptive info while leaving the pstate
>>> file in place?
>>
>>
>> This means we should also create a new sysfs file per performance level too,
>> right? Is there another way for a driver to expose a list in sysfs?
>>
>> Since NVIDIA gives different names to performance levels depending on the
>> card family, we may need to abstract the name away in order to provide some
>> consistency and make listing performance levels easier from a program (may
>> it use readdir() or stat()).
>>
>> Moving the file to debugfs would "fix" the one-value-per-file rule but it
>> would also require users to mount debugfs at boot time in order to write the
>> default configuration they want for PM instead of just changing
>> /etc/sysctl.d/nouveau.conf... On the other hand, I'm not sure we can commit
>> on having a stable ABI on the way we display clocks (unless people take them
>> as a single value and do not try to parse them) as new hardware will alter
>> the semantics of each clock domain, if not drop/split some of them!
>>
>> Whatever we do, it doesn't look like we can find a nice solution that fits
>> every use cases unless we write a userspace program to access this data, but
>> this seems highly overkill...
>
> I was thinking just having the list of level ids in the pstate file,
> and then stick the current file into debugfs. That way people retain
> the ability to see things, as well as use pstate directly for a
> configured system.
In this case, would we still use the * to indicate the current perflvl?
Also, are we supposed to output the current perflvl or the current
configuration in use? Right now, we configure it to either auto (WIP),
perflvl X at all time or perflvl X when on battery and Y when on sector.
However, when we read pstate, we only get the current perflvl if my
memory serves me right. Maybe we should create a r-o file that outputs
the current perflvl and keep pstate for storing the configuration.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Martin Peres <martin.peres@free.fr>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Greg KH <greg@kroah.com>,
kernel list <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>, Pavel Machek <pavel@ucw.cz>
Subject: Re: unparseable, undocumented /sys/class/drm/.../pstate
Date: Mon, 23 Jun 2014 20:00:17 +0200 [thread overview]
Message-ID: <53A86B31.8090307@free.fr> (raw)
In-Reply-To: <CAKb7UvjPc1XGY7tETaMtn2N3ySq01CB6dLubVOZgW+NR_gsYMw@mail.gmail.com>
Le 23/06/2014 19:56, Ilia Mirkin a écrit :
> On Mon, Jun 23, 2014 at 1:46 PM, Martin Peres <martin.peres@free.fr> wrote:
>> Le 23/06/2014 18:40, Ilia Mirkin a écrit :
>>>
>>> On Mon, Jun 23, 2014 at 12:36 PM, Greg KH <greg@kroah.com> wrote:
>>>>
>>>> On Mon, Jun 23, 2014 at 12:18:51PM -0400, Ilia Mirkin wrote:
>>>> A list of valid "values" that a file can be in is fine if you just then
>>>> write one value back to that file. That's the one exception, but a
>>>> minor one given the huge number of sysfs files. Other than that, if you
>>>
>>>
>>> Which is pretty much what the pstate file is. Would it make things
>>> better if we removed the descriptive info while leaving the pstate
>>> file in place?
>>
>>
>> This means we should also create a new sysfs file per performance level too,
>> right? Is there another way for a driver to expose a list in sysfs?
>>
>> Since NVIDIA gives different names to performance levels depending on the
>> card family, we may need to abstract the name away in order to provide some
>> consistency and make listing performance levels easier from a program (may
>> it use readdir() or stat()).
>>
>> Moving the file to debugfs would "fix" the one-value-per-file rule but it
>> would also require users to mount debugfs at boot time in order to write the
>> default configuration they want for PM instead of just changing
>> /etc/sysctl.d/nouveau.conf... On the other hand, I'm not sure we can commit
>> on having a stable ABI on the way we display clocks (unless people take them
>> as a single value and do not try to parse them) as new hardware will alter
>> the semantics of each clock domain, if not drop/split some of them!
>>
>> Whatever we do, it doesn't look like we can find a nice solution that fits
>> every use cases unless we write a userspace program to access this data, but
>> this seems highly overkill...
>
> I was thinking just having the list of level ids in the pstate file,
> and then stick the current file into debugfs. That way people retain
> the ability to see things, as well as use pstate directly for a
> configured system.
In this case, would we still use the * to indicate the current perflvl?
Also, are we supposed to output the current perflvl or the current
configuration in use? Right now, we configure it to either auto (WIP),
perflvl X at all time or perflvl X when on battery and Y when on sector.
However, when we read pstate, we only get the current perflvl if my
memory serves me right. Maybe we should create a r-o file that outputs
the current perflvl and keep pstate for storing the configuration.
next prev parent reply other threads:[~2014-06-23 18:02 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-21 18:02 unparseable, undocumented /sys/class/drm/.../pstate Pavel Machek
2014-06-21 18:22 ` Ilia Mirkin
2014-06-21 18:22 ` Ilia Mirkin
2014-06-21 18:50 ` Pavel Machek
2014-06-21 18:50 ` Pavel Machek
2014-06-21 19:34 ` Ilia Mirkin
2014-06-21 19:34 ` Ilia Mirkin
2014-06-21 19:45 ` Greg KH
2014-06-21 19:45 ` Greg KH
2014-06-23 2:12 ` Ilia Mirkin
2014-06-23 2:12 ` Ilia Mirkin
2014-06-23 13:02 ` Pavel Machek
2014-06-23 13:02 ` Pavel Machek
2014-06-23 13:29 ` Ilia Mirkin
2014-06-23 13:29 ` Ilia Mirkin
2014-06-23 20:15 ` Pavel Machek
2014-06-23 20:15 ` Pavel Machek
2014-06-23 20:18 ` Ilia Mirkin
2014-06-23 20:18 ` Ilia Mirkin
2014-06-23 20:26 ` Greg KH
2014-06-23 20:26 ` Greg KH
2014-06-23 20:32 ` Ilia Mirkin
2014-06-23 20:32 ` Ilia Mirkin
2014-06-24 0:06 ` Ben Skeggs
2014-06-24 0:06 ` Ben Skeggs
2014-06-24 16:00 ` Greg KH
2014-06-24 16:00 ` Greg KH
2014-06-23 16:07 ` Greg KH
2014-06-23 16:07 ` Greg KH
2014-06-23 16:18 ` Ilia Mirkin
2014-06-23 16:18 ` Ilia Mirkin
2014-06-23 16:36 ` Greg KH
2014-06-23 16:36 ` Greg KH
2014-06-23 16:40 ` Ilia Mirkin
2014-06-23 16:40 ` Ilia Mirkin
2014-06-23 17:46 ` Martin Peres
2014-06-23 17:46 ` Martin Peres
2014-06-23 17:56 ` Ilia Mirkin
2014-06-23 17:56 ` Ilia Mirkin
2014-06-23 18:00 ` Martin Peres [this message]
2014-06-23 18:00 ` Martin Peres
2014-06-23 18:05 ` Ilia Mirkin
2014-06-23 18:05 ` Ilia Mirkin
2014-06-23 18:09 ` Greg KH
2014-06-23 18:09 ` Greg KH
2014-06-23 18:08 ` Greg KH
2014-06-23 18:08 ` Greg KH
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=53A86B31.8090307@free.fr \
--to=martin.peres@free.fr \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=greg@kroah.com \
--cc=imirkin@alum.mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.