Re: boot hang on commit "PM / ACPI: Fix suspend/resume regression caused by cpuidle cleanup."

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[Other Archives]     [Linux Kernel Newbies]     [Linux Driver Development]     [Linux Kbuild]     [Fedora Kernel]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Tape]     [Linux Input]     [Linux Kernel Janitors]     [Linux Kernel Packagers]     [Linux Doc]     [Linux Man Pages]     [Linux API]     [Linux Memory Management]     [Linux Modules]     [Linux Standards]     [Kernel Announce]     [Netdev]     [Git]     [Linux PCI]     Linux CAN Development     [Linux I2C]     [Linux RDMA]     [Linux NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [FIO]     [Linux Perf Users]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Kernel Stable Commits]     [Linux Tip Commits]     [Kernel MM Commits]     [Linux Security Module]     [AutoFS]     [Filesystem Development]     [Ext3 Filesystem]     [Linux bcache]     [Ext4 Filesystem]     [Linux BTRFS]     [Linux CEPH Filesystem]     [Linux XFS]     [XFS]     [Linux NFS]     [Linux CIFS]     [Ecryptfs]     [Linux NILFS]     [Linux Cachefs]     [Reiser FS]     [Initramfs]     [Linux FB Devel]     [Linux OpenGL]     [DRI Devel]     [Fastboot]     [Linux RT Users]     [Linux RT Stable]     [eCos]     [Corosync]     [Linux Clusters]     [LVS Devel]     [Hot Plug]     [Linux Virtualization]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Linux Hexagon]     [Linux Cgroups]     [Util Linux]     [Wireless]     [Linux Bluetooth]     [Bluez Devel]     [Ethernet Bridging]     [Embedded Linux]     [Barebox]     [Linux MMC]     [Linux IIO]     [Sparse]     [Smatch]     [Linux Arch]     [x86 Platform Driver]     [Linux ACPI]     [Linux IBM ACPI]     [LM Sensors]     [CPU Freq]     [Linux Power Management]     [Linmodems]     [Linux DCCP]     [Linux SCTP]     [ALSA Devel]     [Linux USB]     [Linux PA RISC]     [Linux Samsung SOC]     [MIPS Linux]     [IBM S/390 Linux]     [ARM Linux]     [ARM Kernel]     [ARM MSM]     [Tegra Devel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Linux Media]     [Video 4 Linux]     [Linux IRDA Users]     [Linux for the blind]     [Linux RAID]     [Linux ATA RAID]     [Device Mapper]     [Linux SCSI]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Linux IDE]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux M68K]     [Linux ia64]     [Linux 8086]     [Linux x86_64]     [Linux Config]     [Linux Apps]     [Linux MSDOS]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [Linux Trace Users]     [Linux Btrace]     [Linux Watchdog]     [Utrace Devel]     [Linux C Programming]     [Linux Assembly]     [Dash]     [DWARVES]     [Hail Devel]     [Linux Kernel Debugger]     [Linux gcc]     [Gcc Help]     [X.Org]     [Wine]

Add to Google Powered by Linux

[Older Kernel Discussion]     [Yosemite National Park Forum]     [Large Format Photos]     [Gimp]     [Yosemite Photos]     [Stuff]