mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: rjw@sisk.pl, arjan@linux.intel.com, len.brown@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC v00 1/1] PowerCap: Documentation
Date: Thu, 18 Jul 2013 13:40:50 -0700	[thread overview]
Message-ID: <20130718204050.GA20750@kroah.com> (raw)
In-Reply-To: <1374176055-23527-2-git-send-email-srinivas.pandruvada@linux.intel.com>

On Thu, Jul 18, 2013 at 12:34:15PM -0700, Srinivas Pandruvada wrote:
> Added power cap framework documentation. This explains the use of power capping framework,
> sys-fs and programming interface.

Minor nit, it's called "sysfs" no '-' anywhere in the name please.

> +Experimental implantation is using two options:
> +Option 1: Use simple device model. Since we can't have duplicate file names under
> +a class even if there parents are different (Unlike a Linux directory tree), each
> +child will be named using their hierarchy in the tree. For example, a RAPL power
> +zone such as a CPU package can be called intel-rapl-0, then its children will be
> +named as intel-rapl-0:0, intel-rapl-0:1 etc.
> +
> +Option 2: Each controller is a device and zones and constraints under it are
> +created using kobjects. Here exact names of power zones can be used in the sys-fs
> +file names.

Don't ever use "raw" kobjects in the device tree, that way is crazy,
userspace can never see the devices, and you end up having to duplicate
all of the logic that the driver core creates for you.

In short, don't do that, as I will not accept such code into the kernel,
sorry.  Work with the driver model, don't get hung up on the names not
being able to be "the same", that restriction is there for a reason, as
you found out (it is exactly like a Linux directory tree, unlike your
statement above, as those names all end up in the same directory in
sysfs, which is why the restriction is there.)

hope this helps,

greg k-h

      reply	other threads:[~2013-07-18 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 19:34 [RFC v00 0/1] Power Capping framework and drivers Srinivas Pandruvada
2013-07-18 19:34 ` [RFC v00 1/1] PowerCap: Documentation Srinivas Pandruvada
2013-07-18 20:40   ` Greg KH [this message]

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=20130718204050.GA20750@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arjan@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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

Powered by JetHome