Bug 84741 - power usage rises a lot after resume from ram when using maxcpus=X
Summary: power usage rises a lot after resume from ram when using maxcpus=X
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Lan Tianyu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 12:25 UTC by Arkadiusz Miskiewicz
Modified: 2015-04-04 19:45 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.17-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Arkadiusz Miskiewicz 2014-09-17 12:25:25 UTC
Kernel: 3.17rc5 (but also 3.14, 3.10 and probably all other)
hw: Dell XPS 15 9530
cpu: i7-4702HQ


This CPU has 4 normal cores and 4 HT cores.

I was using maxcpus=4 on this machine. After resume from ram machine immediately eats ~10W more.

Initially I thought this is some Intel GPU bug and reported
https://bugs.freedesktop.org/show_bug.cgi?id=83914

But it looks like after resume all 8 cores are up, eating power while linux kernel only manages first 4. The reset 4 cores are only eating power and producing heat.

dmesg:
https://bugs.freedesktop.org/attachment.cgi?id=106351

How to reproduce:
- boot with maxcpus=4 (with minimal userspace for example)
- measure power usage with powertop
- suspend to ram, resume from ram
- measure power usage again, it rises ~10W

How to workaround the problem, online CPUS and then make then offline again:
for cpu in $(grep -l 0 /sys/devices/system/cpu/cpu*/online); do
    echo 1 > $cpu
    sleep 1
    echo 0 > $cpu
done

After this power usage is back to normal.

So, I guess if maxcpus is being used linux kernel should apply some action to other, offline cores, too to avoid them being power hungry.
Comment 1 Arkadiusz Miskiewicz 2014-09-17 12:26:36 UTC
"all 8 cores are up" - by writting that I mean hardware is up/eating power but kernel still thinks these are offline etc.
Comment 2 Len Brown 2014-11-06 05:14:16 UTC
maxcpus= cmdline causes Linux to ignore those cpus
both at boot-time, and at resume-time.

In both cases, they are left in whatever state the BIOS leaves them in.
Hopefully that is a low power state, but in this case, it seems the
BIOS is not leaving them in a low power state on resume from suspend.

Not immediately clear that it is Linux's job to fix this issue.

Note You need to log in before you can comment on or make changes to this bug.