Add support for enabling C-states in Intel Atom N2000 series?
braveheartleo
Status: Interested
Joined: 23 Jan 2012
Posts: 43
Reply Quote
damentz,

Would you consider applying the patch mentioned here: bugzilla.kernel.org/show_bug.cgi?id=60201, which adds support in intel_idle for model 54 of Intel Atoms?

Currently C-states is disabled in these Intel Atoms (N2600/N2800) because intel_idle reports that it does not run on them. However, I have applied that patch which modifies a single file, intel_idle.c, adding a single line that enables C-states in the aforementioned CPUs.

:: Code ::
System:    Host: xbox-0 Kernel: 3.9-8.dmz.1-liquorix-686 (32 bit, gcc: 4.7.3)
           Desktop: Xfce 4.10.2 (Gtk 2.24.10) dm: lightdm Distro: Ubuntu precise (12.04.2 LTS)
Machine:   System: LENOVO product: 20126 version: Ideapad S110 Chassis: type: 10 version: Type2 - Board Serial Number
           Mobo: LENOVO model: 123456789 version: Type1Sku0 Bios: LENOVO version: 5BCN29WW date: 4/10/2012
CPU:       Dual core Intel Atom CPU N2800 (-HT-MCP-) clocked at 798.00 MHz
Graphics:  Card: Intel Atom Processor D2xxx/N2xxx Integrated Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0be2
           X.Org: 1.11.3 driver: N/A Resolution: 1024x600@60.0hz
           GLX Renderer: PowerVR SGX545 GLX Version: 2.1 Direct Rendering: Yes
Network:   Card-1: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller
           driver: r8169 ver: 2.3LK-NAPI port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8136
           Card-2: Realtek RTL8188CE 802.11b/g/n WiFi Adapter driver: rtl8192ce port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8176
Drives:    HDD Total Size: 500.1GB (24.6% used)
Info:      Processes: 162 Uptime: 4:04 Memory: 648.1/2013.6MB Runlevel: 2 Gcc sys: 4.7.3 alt: 4.6/4.8
           Client: Shell (bash 4.2.25 running in xfce4-terminal) inxi: 1.9.11

Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Has anyone tested this patch, including you? That bug report was created the 3 days ago and no one has responded.
Back to top
braveheartleo
Status: Interested
Joined: 23 Jan 2012
Posts: 43
Reply Quote
Yes I have.

Before the patch, I was only getting this on my system:
:: Code ::
intel_idle: does not run on family 6 model 54

Powertop-2.1 did not report idle states as well -- the idle states tab was empty.

After the patch, I'm now getting:
:: Code ::
[    1.629824] intel_idle: MWAIT substates: 0x3020220
[    1.629828] intel_idle: v0.4 model 0x36
[    1.629831] intel_idle: lapic_timer_reliable_states 0xffffffff
[    1.652638] cpuidle: using governor ladder
[    1.652889] cpuidle: using governor menu

And Powertop-2.1 now contains idle states information (POLL, C1E-ATM, C2-ATM, C4-ATM, C6-ATM).

This being a laptop, C-states support really shouldn't be missing in the OS.

Before this, I was scouring the net for why the behavior for this particular Atom, and found this bugs.debian.org/cgi-bin/bugreport.cgi?bug=704420

However, the generic ACPI processor driver (acpi_cpuidle) didn't expose any C-states to the OS for this CPU, and I was getting blank idle states information in Powertop-2.1 (this is true for both stock Ubuntu and liquorix kernels).
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Added your patch to mainline zen-kernel, both 3.9 and upcoming 3.10. Should be in the next Liquorix package.
Back to top
braveheartleo
Status: Interested
Joined: 23 Jan 2012
Posts: 43
Reply Quote
Thank you damentz.

It makes me wonder why the early Atom generations are supported but later, not to mention greatly improved, generations of the same CPU family like this particular Atom are missing support from source code.

Considering that this Atom generation, code-named Cedarview, was released Q4'11, model definitions for this CPU should have already been present in code where it matters (like C-states in intel_idle) in the mainline kernel.

You might be interested in what I wrote here, phoronix.com/forums/showthread.php?81865-Intel-OTC-support-discrimination-on-Intel-Atom-N2600-N2800-CPUs, and perhaps you might have some information on why it seems that way?
Back to top
braveheartleo
Status: Interested
Joined: 23 Jan 2012
Posts: 43
Reply Quote
The patch works well in the yet-to-be-released liquorix 3.9.9. Thank you damentz.

:: Code ::
$ uname -a
Linux xbox-0 3.9.9-zen #1 ZEN SMP PREEMPT Sun Jul 7 17:09:35 PHT 2013 i686 i686 i386 GNU/Linux
$ dmesg | grep idle
[    1.639160] intel_idle: MWAIT substates: 0x3020220
[    1.639165] intel_idle: v0.4 model 0x36
[    1.639168] intel_idle: lapic_timer_reliable_states 0xffffffff
[    1.667896] cpuidle: using governor ladder
[    1.668144] cpuidle: using governor menu

Back to top
Display posts from previous:   

All times are GMT - 8 Hours