From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Thu, 21 Jan 2021 14:55:56 -0500 References: <20201209160642.6317-1-anshuman.gupta@intel.com> <20201209160642.6317-3-anshuman.gupta@intel.com> <160753115527.595.15173510320238280650@build.alporthouse.com> <20201209162502.GA6486@intel.com> <160753242185.595.5436148780497590017@build.alporthouse.com> <20201210050247.GA9309@intel.com> <160758613245.595.6370833186215737580@build.alporthouse.com> In-Reply-To: <160758613245.595.6370833186215737580@build.alporthouse.com> Message-ID: Subject: Re: [igt-dev] [PATCH i-g-t 2/6] i915/i915_pm_rpm.c: create PC state subtest group From: Rodrigo Vivi Content-Type: multipart/alternative; boundary="000000000000c78c3f05b96e75cc" To: Chris Wilson Cc: Anshuman Gupta , igt-dev@lists.freedesktop.org List-ID: --000000000000c78c3f05b96e75cc Content-Type: text/plain; charset="UTF-8" On Thu, Dec 10, 2020 at 2:42 AM Chris Wilson wrote: > Quoting Anshuman Gupta (2020-12-10 05:02:48) > > On 2020-12-09 at 16:47:01 +0000, Chris Wilson wrote: > > > Quoting Anshuman Gupta (2020-12-09 16:25:02) > > > > On 2020-12-09 at 16:25:55 +0000, Chris Wilson wrote: > > > > > Quoting Anshuman Gupta (2020-12-09 16:06:38) > > > > > > Create a separate igt test group and move package C > > > > > > state in to this subgroup. > > > > > > Run powertop --auto-tune to tune SOC power configuration > > > > > > for package C state tests. > > > > > > > > > > > > Signed-off-by: Anshuman Gupta > > > > > > --- > > > > > > tests/i915/i915_pm_rpm.c | 35 > +++++++++++++++++++++++++++++++---- > > > > > > 1 file changed, 31 insertions(+), 4 deletions(-) > > > > > > > > > > > > diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c > > > > > > index af55b569..42bc44d9 100644 > > > > > > --- a/tests/i915/i915_pm_rpm.c > > > > > > +++ b/tests/i915/i915_pm_rpm.c > > > > > > @@ -832,6 +832,25 @@ static void basic_subtest(void) > > > > > > /* XXX Also we can test wake up via exec nop */ > > > > > > } > > > > > > > > > > > > +static bool setup_powertop(void) > > > > > > +{ > > > > > > + FILE *fp; > > > > > > + char tmp[512]; > > > > > > + > > > > > > + fp = popen("powertop --auto-tune", "r"); > > > > > > > > > > Doesn't this defeat the point of having it work out of the box? > > May be misunderstood your comment, is it PC state or powertop should work > > out of box ? > > Powermanagement should not require the user to configure it before it > can work. > > powertop in particular may tweak the gfx, which is verboten. > > Manually perform any configuration you think is required, and warn if the > initial configuration does not support reaching the lowest pc state the > system can. File bugs. > I understand why Anshuman did this. There are many many components out there that are blocking the PC10 and this powertop --auto-tune is trying to take care of all the corner cases to get the "best" of all the components so we can try to garantee that we are not getting blocked by other components. However this is very very dangerous. It toggles a lot of unsafe and untested cases. I have lost a laptop right after a powertop --auto-tune and have never used that in my life again. Coincidence? Maybe... but I don't want to take the risk in my machine and I definitely cannot recommend its use. > -Chris > _______________________________________________ > igt-dev mailing list > igt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/igt-dev > --000000000000c78c3f05b96e75cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Thu, Dec 10, 2020 at 2:42 AM C= hris Wilson <chris@chris-wil= son.co.uk> wrote:
Quoting Anshuman Gupta (2020-12-10 05:02:48)
> On 2020-12-09 at 16:47:01 +0000, Chris Wilson wrote:
> > Quoting Anshuman Gupta (2020-12-09 16:25:02)
> > > On 2020-12-09 at 16:25:55 +0000, Chris Wilson wrote:
> > > > Quoting Anshuman Gupta (2020-12-09 16:06:38)
> > > > > Create a separate igt test group and move package = C
> > > > > state in to this subgroup.
> > > > > Run powertop --auto-tune to tune SOC power configu= ration
> > > > > for package C state tests.
> > > > >
> > > > > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com&= gt;
> > > > > ---
> > > > >=C2=A0 tests/i915/i915_pm_rpm.c | 35 ++++++++++++++= +++++++++++++++++----
> > > > >=C2=A0 1 file changed, 31 insertions(+), 4 deletion= s(-)
> > > > >
> > > > > diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915= /i915_pm_rpm.c
> > > > > index af55b569..42bc44d9 100644
> > > > > --- a/tests/i915/i915_pm_rpm.c
> > > > > +++ b/tests/i915/i915_pm_rpm.c
> > > > > @@ -832,6 +832,25 @@ static void basic_subtest(voi= d)
> > > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX Also we ca= n test wake up via exec nop */
> > > > >=C2=A0 }
> > > > >=C2=A0
> > > > > +static bool setup_powertop(void)
> > > > > +{
> > > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0FILE *fp;
> > > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0char tmp[512];
> > > > > +
> > > > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0fp =3D popen("pow= ertop --auto-tune", "r");
> > > >
> > > > Doesn't this defeat the point of having it work out= of the box?
> May be misunderstood your comment, is it PC state or powertop should w= ork
> out of box ?

Powermanagement should not require the user to configure it before it
can work.

powertop in particular may tweak the gfx, which is verboten.

Manually perform any configuration you think is required, and warn if the initial configuration does not support reaching the lowest pc state the
system can. File bugs.

I understand why= Anshuman did this. There are many many components
out there that= are blocking the PC10 and this powertop --auto-tune
is trying to= take care of all the corner cases to get the "best" of all the
components so we can try to garantee that we are not getting block= ed by other components.

However this is very very = dangerous. It toggles a lot of unsafe and untested cases.

I have lost a laptop right after a powertop --auto-tune and have ne= ver used that
in my life again. Coincidence? Maybe... but I don&#= 39;t want to take the risk in my
machine and I definitely cannot = recommend its use.
=C2=A0
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@= lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo= /igt-dev
--000000000000c78c3f05b96e75cc--