Re: How to document dimension units for virtual files?

From: Sanjoy Mahajan
Date: Fri Nov 10 2006 - 10:41:48 EST


Kyle Moffett <mrmacman_g4@xxxxxxx> writes:
> Well, IMO you should never have "current:mW" in any form whatsoever
> anyways. Electrically it makes no sense; it's like saying
> "height:grams".

Agreed!

> 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?

Current is flow of charge, in other words, charge per time. Flow has
the notion of "per time" built into it. So "power flow" contains an
extra "per time" compared to what you're looking for. Power, being
energy per time, is already a flow (it's a flow of energy).

Perhaps because I'm writing a textbook on _The Art of Approximation_
(and finding formulas using dimensions is a main part of the art), I
like to distinguish a quantity's dimensions from its units. The
dimensions are universal, like energy or length or power; the units
are their implementation in a particular system of measurement. In
the SI system of units (a.k.a. the metric system), energy is measured
in Joules, time in seconds, and power in Joules/seconds or Watts.

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)

> 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. If the hardware reports current, use "current: mA". If the
hardware reports power, use "power: mW". Then applications can easily
find out what's being reported and use it accordingly.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
--Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
-
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/