Powertop suggests CONFIG_PM_ADVANCED_DEBUG kernel option

Bug #632327 reported by Mike
204
This bug affects 42 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Wishlist
Unassigned
Oneiric
Fix Released
Low
Tim Gardner

Bug Description

On Maverick beta + updates (linux-image-2.6.35-20-generic at the moment), powertop suggests:

>Suggestion: Enable the CONFIG_PM_ADVANCED_DEBUG kernel configuration option.
>This option will allow PowerTOP to collect runtime power management statistics.

The option is not enabled for Maverick yet:
https://wiki.ubuntu.com/KernelTeam/Specs/KernelMaverickConfigReview

Tags: kconfig
tags: added: kconfig
Changed in linux (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
John Hart (jlhart68) wrote :

I am running Ubuntu 10.10 and I am also getting the same message in powertop.

How does one enable CONFIG_PM_ADVANCED_DEBUG?

Revision history for this message
Gurmeet (gurmeet1109) wrote :

This is not a bug, but qualifies as a question.
Suggest filing under the appropriate category.

Revision history for this message
Gurmeet (gurmeet1109) wrote :

Not that I am suggesting a 'ready to use' solution, just my findings for more understanding ....
I can enable the option, but am not sure whether the recompiled kernel will suit my machine well ...

I see this on line no. 3275 in <linux-source-2.6.35>/debian.master/config/config.common.ubuntu
 # CONFIG_PM_ADVANCED_DEBUG is not set

and is used in <linux-source-2.6.35>/drivers/base/power/sysfs.c as
#ifdef CONFIG_PM_ADVANCED_DEBUG
#ifdef CONFIG_PM_RUNTIME

static ssize_t rtpm_usagecount_show(struct device *dev,
        struct device_attribute *attr, char *buf)
{
 return sprintf(buf, "%d\n", atomic_read(&dev->power.usage_count));
}

static ssize_t rtpm_children_show(struct device *dev,
      struct device_attribute *attr, char *buf)
{
 return sprintf(buf, "%d\n", dev->power.ignore_children ?
  0 : atomic_read(&dev->power.child_count));
}

static ssize_t rtpm_enabled_show(struct device *dev,
     struct device_attribute *attr, char *buf)
{
 if ((dev->power.disable_depth) && (dev->power.runtime_auto == false))
  return sprintf(buf, "disabled & forbidden\n");
 else if (dev->power.disable_depth)
  return sprintf(buf, "disabled\n");
 else if (dev->power.runtime_auto == false)
  return sprintf(buf, "forbidden\n");
 return sprintf(buf, "enabled\n");
}

static DEVICE_ATTR(runtime_usage, 0444, rtpm_usagecount_show, NULL);
static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL);
static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL);

#endif

Revision history for this message
Andy Whitcroft (apw) wrote :

In order to enable CONFIG_PM_ADVANCED_DEBUG we would also need to enable CONFIG_PM_DEBUG.

Revision history for this message
rava-me (rava-stuff) wrote :

So still the questions remain: 1. how do I enable it? and 2. is it safe?
Thanks. I am not an advanced user, so I don't know much about kernels...

Revision history for this message
Leif Walsh (leif.walsh) wrote :

If you want to recompile, you can follow the kernel compilation guide on the wiki, and just before you compile, set CONFIG_PM_DEBUG and CONFIG_PM_ADVANCED_DEBUG to 'y' in config.common.ubuntu. I did this for a while and it was safe, but I got tired of recompiling with every kernel release.

Revision history for this message
Leif Walsh (leif.walsh) wrote :

That said, I would be pleased if these options were added to the default config that official kernels are compiled with, it doesn't really slow things down and makes powertop a lot more useful.

Revision history for this message
Andy Whitcroft (apw) wrote :

@Leif -- you say "doesn't really slow things down" can you quantify the slow down we will see?

Andy Whitcroft (apw)
Changed in linux (Ubuntu):
milestone: none → ubuntu-11.04-beta-1
Changed in linux (Ubuntu):
milestone: ubuntu-11.04-beta-1 → ubuntu-11.04-beta-2
Revision history for this message
Andy Whitcroft (apw) wrote :

As we are unable to easily quantify the overall cost of enabling this, and now are very close to release (for Natty) we are not going to be changing this there. We should review this early in Oneiric.

Revision history for this message
Shahar Or (mightyiam) wrote :

Thanks! Good luck with this.

Revision history for this message
Kate Stewart (kate.stewart) wrote :

Have added an Oneiric task, and set the importance so it it gets considered as part of planning, and add milestone if appropiriate.

Changed in linux (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu):
milestone: ubuntu-11.04-beta-2 → dapper-updates
milestone: dapper-updates → natty-updates
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Actually, CONFIG_PM_DEBUG is already set for i386/amd64 in Natty. Enabling CONFIG_PM_ADVANCED_DEBUG merely turns on some sysfs functions that have no runtime impact until accessed. I'm gonna enable this for Oneiric.

Changed in linux (Ubuntu Oneiric):
assignee: Canonical Kernel Team (canonical-kernel-team) → Tim Gardner (timg-tpi)
importance: High → Low
status: Triaged → Fix Committed
Revision history for this message
Dhaval Patel (dhuv) wrote :

So you are saying that Natty should have this enabled? If I launch powertop it will not suggest enabling this setting?

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Dhaval - Natty only has CONFIG_PM_DEBUG enabled. I watched powertop for awhile and didn't see any complaints about needing CONFIG_PM_ADVANCED_DEBUG.

Revision history for this message
Andrew Cowie (afcowie) wrote :

> Enabling CONFIG_PM_ADVANCED_DEBUG merely turns on some sysfs
> functions that have no runtime impact until accessed. I'm gonna
> enable this for Oneiric.

No runtime impact.

Can we get CONFIG_PM_ADVANCED_DEBUG added to the Maverick (as current release) and/or Natty (as upcoming release) then? It'll be some time until we're able to roll Oneiric out to our users.

AfC

Revision history for this message
Dhaval Patel (dhuv) wrote :

As a user, I would have to say that I would love it if you can get it into the current release.

Thanks for the effort! Much appreciated. Trying to squeeze every bit of battery life out of this x301.

Revision history for this message
Shahar Or (mightyiam) wrote :

Yes, if it doesn't hurt, please put this in one of the next Maverick Kernels.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.