On Monday, July 29, 2013 01:53:32 gregor herrmann wrote:
> On Sun, 28 Jul 2013 19:02:20 -0400, Chris Knadle wrote:
> > > and the new cpuinfo_cur_freq is root:root 0400 :/
> > 
> > Concerning root:root 0400 ownership, the workaround I would suggest would
> > be to install the 'sysfsutils' package and then to make entries in
> 
> > /etc/sysfs.conf to manually set file mode and ownership, such as:
> Oh, nice, I didn't know that.

I didn't either until I tried to use 'cpufreq-set' from the 'cpufrequtils' 
package as a normal user, and then found that I didn't have permission to 
manually change the CPU frequency due to the permission/ownership on these 
files. 

Normally I use sysfsutils for setting battery charge thresholds with the 
tp_smapi module, and /etc/sysfs.conf contains comments specific to changing 
/sys file mode+ownership, so that's how I found out it could do this.

> > Another confusing thing is that I'm using Debian's 3.10 kernel, but for
> > some reason scaling_cur_freq and cpuinfo_cur_freq both exist on my
> > system.  (Not sure why that is.)
> 
> It depends on the scaling_driver; I'm using (not by my own decision,
> but hey :)) intel_pstate.

This makes sense after I read the 'help' in a 'make menuconfig' on the Linux 
kernel source.

> I had a quick look into the kernel sources today, and depending on
> the driver's "properties" cpuinfo_cur_freq and/or scaling_cur_freq
> are created, at least that was my conclusion.

Okay.  The output of these two 'files' (pointers to kernel memory) output the 
same information:

  # cat cpuinfo_cur_freq scaling_cur_freq 
  800000
  800000

I currently don't know if it's possible to make a [soft|hard]link within /sys, 
but if that were possible that would be a way around the lack of the 
scaling_cur_freq filename.

If nothing else this should be possible via a custom Linux kernel module.  
I've experimented with doing this, which is explained in "Linux Device 
Drivers":

  https://lwn.net/Kernel/LDD3/

which is another book I'm hoping to get back to reading...



P.S. I've subscribed to this bug (manually), so I don't need to be CCed.
Cheers

  -- Chris

--
Chris Knadle
chris.kna...@coredump.us

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to