public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Oeser <ioe-lkml@rameria.de>
To: Michael Holzheu <holzheu@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com
Subject: Re: How to document dimension units for virtual files?
Date: Mon, 23 Oct 2006 21:03:32 +0200	[thread overview]
Message-ID: <200610232103.33710.ioe-lkml@rameria.de> (raw)
In-Reply-To: <20061023143254.496420f7.holzheu@de.ibm.com>

Hi Michael,

On Monday, 23. October 2006 14:32, Michael Holzheu wrote:
> The question is how to provide the dimension unit information to
> the user.
> 
> I see three possibilites:
> 
> 1. Write dimension unit into the output string (e.g. "476362365 kB"),
> which makes parsing a bit more complicated.
> 
> 2. Encode dimension unit into filename (e.g. onlinetime_ms or memory_kb)

This is the recommended one.
- simple to implement and understand on both sides

- if you change units, you notice breaking userspace immediately
  and can even notice it being used in closed source tools 
  with a simple strace

- no parsing involved, as the author of the user space tool 
  usually assumes the unit implicitly (like "programming by contract", where
  the "contract" is the filename, which is quite easy to check for.

- you can keep a legacy interface with neglible effort and code wastage

- many advantages I forgot :-)

> 3. Document dimension unit somewhere. In that case we need some central
> place to provide such information. E.g. in the Documentation directory of
> the linux kernel.

Regards

Ingo Oeser

  reply	other threads:[~2006-10-23 19:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-23 12:32 How to document dimension units for virtual files? Michael Holzheu
2006-10-23 19:03 ` Ingo Oeser [this message]
2006-10-24 14:15   ` Michael Holzheu
2006-10-24 20:13     ` Arnd Bergmann
2006-10-28 18:40     ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2006-11-08 16:54 Michael Holzheu
2006-11-08 17:04 ` Randy Dunlap
2006-11-08 18:27   ` Michael Holzheu
2006-11-10  6:53     ` Greg KH
2006-11-10 10:03       ` Michael Holzheu
2006-11-13 17:16         ` Greg KH
2006-11-13 12:18       ` Pavel Machek
2006-11-13 17:46         ` Henrique de Moraes Holschuh
2006-11-14  8:50           ` Michael Holzheu
2006-11-08 17:09 ` Jörn Engel
2006-11-08 18:32   ` Michael Holzheu
2006-11-08 18:01 ` Henrique de Moraes Holschuh
2006-11-08 18:37   ` Michael Holzheu
2006-11-08 19:59     ` Henrique de Moraes Holschuh
2006-11-09 23:15 ` Pavel Machek
2006-11-10 13:18   ` Kyle Moffett
2006-11-10 15:41     ` Sanjoy Mahajan
2006-11-13  4:33       ` Kyle Moffett

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=200610232103.33710.ioe-lkml@rameria.de \
    --to=ioe-lkml@rameria.de \
    --cc=holzheu@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.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