cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.de>
To: cpufreq@www.linux.org.uk, dongili@supereva.it
Subject: Re: [RFC] cpufreqtools
Date: Mon, 25 Oct 2004 13:11:50 +0200	[thread overview]
Message-ID: <20041025111150.GA7655@dominikbrodowski.de> (raw)
In-Reply-To: <20041025090139.GC2998@inferi.kami.home>

On Mon, Oct 25, 2004 at 11:01:39AM +0200, Mattia Dongili wrote:
> I definitely think it's useful. Probably versioned symbols could be a
> good idea for the library.

For some stuff yes, for other things like "get current frequency of that
CPU" it seems like overkill. Patches are welcome.

> Right now I'm (mostly) rewriting cpufreqd and
> I'd like to use such a library. It could be just a starting point to
> test the library usability :)

Excellent :)

> > d) autotoolization and libtoolization. I tried to do so today, but failed
> 
> I'm working on it. Anyway I'm not a master autostuff user :) so some
> thing I'm going to say may be plainly wrong. I'll send you the result of
> my efforts asap.

That's great. Thanks for doing this.

> >    in a subdirectory "libcpufreq/", only enable "sysfs" input if libsys
> >    is present, only enable "proc" input if so explicitely desired by the
> >    user; cpufreq-set and cpufreq-info should link against libcpufreq, too;
> >    and they should be put in a subdirecoty "utils/"... anybody willing to
> >    help me to do this?
> 
> Also, I don't know if enabling aut (as in latin) sysfs aut procfs
> reading is a good idea because you may have many kernels with different
> configurations and recompiling the library each time you switch kernel
> is not that *friendly*.
> Maybe having a function that detects _which_ cpufreq interface is used
> and pass its return value everywhere is better? opinions?
> Something like:
> 

Maybe I didn't express my intention too clearly: the code doesn't do "aut"
(as in Latin) or either/or (as in English). It preferres sysfs, but doesn't
find sysfs to be doable, it falls back to proc if possible.

> --- cpufreq.h
> #define CPUFREQ_PROC_IFACE  0
> #define CPUFREQ_SYSFS_IFACE 1

check "interface.h" at the top:
#define INTERFACE_SYSFS
#define INTERFACE_PROC

You can define one of them or both; only both not defined will not work, of
course...


As 2.6. kernels are preferred to use for cpufreq, but it depends on libsyfs
-- and will only link correctly if libsyfs is present -- I'd like to make
#define INTERFACE_SYSFS dependant on libsysfs; and #define INTERFACE_PROC on
some "--enable-proc-interface" passed to ./configure...

Many thanks,
	Dominik

  reply	other threads:[~2004-10-25 11:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 17:22 [RFC] cpufreqtools Dominik Brodowski
2004-10-21 18:51 ` Dave Jones
2004-10-22 14:39 ` Bruno Ducrot
2004-10-22 14:57   ` Dominik Brodowski
2004-10-22 17:21     ` Bruno Ducrot
2004-10-22 17:47       ` Dominik Brodowski
2004-10-22 18:19         ` Bruno Ducrot
2004-10-24 16:30       ` Jeremy Fitzhardinge
2004-10-25 10:07         ` Paul Ionescu
2004-10-26 19:57           ` Dominik Brodowski
2004-10-25  9:01 ` Mattia Dongili
2004-10-25 11:11   ` Dominik Brodowski [this message]
2004-10-25 12:17     ` Mattia Dongili
2004-10-25 12:42       ` Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041025111150.GA7655@dominikbrodowski.de \
    --to=linux@dominikbrodowski.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=dongili@supereva.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox