[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201206252237.07518.rjw@sisk.pl>
Date: Mon, 25 Jun 2012 22:37:07 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Deepthi Dharwar <deepthi@...ux.vnet.ibm.com>
Cc: Fengguang Wu <wfg@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Preeti Murthy <preeti@...ux.vnet.ibm.com>,
Srivatsa S Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
Subject: Re: boot hang on commit "PM / ACPI: Fix suspend/resume regression caused by cpuidle cleanup."
On Monday, June 25, 2012, Deepthi Dharwar wrote:
> On 06/25/2012 03:48 AM, Rafael J. Wysocki wrote:
>
> > On Friday, June 22, 2012, Fengguang Wu wrote:
> >> Hi Deepthi,
> >>
> >> I can no longer reproduce this issue... Sorry for the noise!
> >
> > But I do, 100% of the time on real hardware which is Acer Ferrari One.
> >
> > The symptom is that the new WARN_ON() triggers pretty much on every
> > cpuidle transition for me which makes the machine unuseable.
> >
> > That may be a result of a different bug, but the box evidently works
> > without the hunk in arch/x86/kernel/process.c, so I'd prefer to drop it
> > for now.
>
> If cpu is coming out of cpuidle with WARN_ON every-time, is suspend
> on this device working ?
Yes, it is.
> Wanted to get some clarity about this hardware .
> We can remove this check for now.
OK
> > Moreover, I have a couple of questions regarding the implementation.
> >
> > First, why are we returning -EINVAL if acpi_idle_suspend is set? Surely,
> > something like -EBUSY or -EAGAIN would be better here, wouldn't it?
> >
>
>
> Any negative return value will serve the purpose. We put it as -EINVAL
> as cpu_idle operation during suspend was termed invalid. I will change it to
> -EBUSY for better readability.
OK
> > Second, is the cpu_relax() before returning really necessary?
>
>
> cpu_relax operation is mainly to lower CPU power consumption.
> If the system is idle, we would want to at-least reduce
> power consumption. Better than busy looping in and out of idle when
> suspend is triggered. There is no harm having it.
It seems kind of redundant, though. The system is suspending at this point,
so the increased power consumption, if any, shouldn't be that much anyway,
right?
> > Finally, the hunk in acpi_idle_enter_bm() still looks ugly. I'd prefer
> > something like this instead:
> >
> > @@ -907,7 +928,10 @@ static int acpi_idle_enter_bm(struct cpu
> > drv, drv->safe_state_index);
> > } else {
> > local_irq_disable();
> > - acpi_safe_halt();
> > +
> > + if (!acpi_idle_suspend)
> > + acpi_safe_halt();
> > +
> > local_irq_enable();
> > return -EINVAL;
> > }
> > @@ -915,6 +939,12 @@ static int acpi_idle_enter_bm(struct cpu
> >
> > local_irq_disable();
> >
> > + if (acpi_idle_suspend) {
> > + local_irq_enable();
> > + cpu_relax();
> > + return -EBUSY;
> > + }
> > +
> > if (cx->entry_method != ACPI_CSTATE_FFH) {
> > current_thread_info()->status &= ~TS_POLLING;
> > /*
> >
> > Hmm?
>
>
> Yes, I'll will re-factor the code.
Good.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists