Re: How to document dimension units for virtual files?

From: Kyle Moffett
Date: Sun Nov 12 2006 - 23:38:18 EST


On Nov 10, 2006, at 10:41:09, Sanjoy Mahajan wrote:
Watts are an indication of power emitted or consumed per unit time (as opposed to current/amperage which counts only the number of electrons and not the change in energy), so perhaps "power_flow:mW" or "power_consumption:mW" would make more sense?

So all of the following make sense:

* "Power:mW"
* "energy flow: mW" (more verbose but equivalent)
* "energy flow: mJ/s" (even more verbose but also equivalent)

In this case the name is a sysfs file to indicate the load on the battery; so spaces are frowned upon and "load:mW" would probably work the best.

I can conceivably see a need for a "current:mJ_per_s" versus "current:mW" depending on the hardware-reported units, but never both at the same time.

I got lost here. mJ/s is the same as mW, so with either current:mW or current:mJ/s you're back in the soup of measuring current using units of power

Whoops; sorry, I was writing this too early in the morning without my caffeine and got myself turned around. What I _meant_ to say was this:

"I conceivably see a need for a "load:mC_s" versus "load:mW", depending on the hardware-reported units, but never both at the same time."

Essentially if the hardware reports units of milli-watts or milli- Calories-per-second or whatever, then we should report that directly and let userspace convert as appropriate; keeping the floating-point out of the kernel.

Cheers,
Kyle Moffett

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/