Mailing List Archive

Re: error in sd.c
From: "Niki W. Waibel" <niki.waibel@gmx.net>
...
The 2nd value is wrong!
8,715MB are 8.5GB - and not 8.7GB!!!
You are wrong.
8715 MB is precisely 8.715 GB.
We had this entire discussion a few weeks ago, and
you can read all about it in the archives.
Probably I wouldnt have answered but in the meantime
I encountered a few more data points:
- Not only is G = 10^9 the SI standard, also the IEEE
decided that 1 GB = 10^9 B, that is, the SI standard
must (by IEEE compliant engineers) also be used w.r.t.
computer memories.
- There is a proposal for a name and prefix notation
for the binary 2^20, 2^30 etc, namely Mi, Gi etc.
Thus, if you want to show off as a real hacker that
cannot be bothered with this decimal stuff, and you just
bought a 17 GB disk then you can call it a 15.8 GiB disk.
See for example, http://physics.nist.gov/cuu/Units/binary.html .
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
On Jan 21, Guest section DW wrote:
> From: "Niki W. Waibel" <niki.waibel@gmx.net>
>
> ...
> The 2nd value is wrong!
> 8,715MB are 8.5GB - and not 8.7GB!!!
>
> We had this entire discussion a few weeks ago, and
> you can read all about it in the archives.
please read this thread again yourself and try to separate facts from advocacy...
> You are wrong.
> 8715 MB is precisely 8.715 GB.
which gives absolutely no additional or relevant information when printing
both values with only shifting the decimal point
do you realize that in your example and kernel output it is
1 MB == 1024 * 1024
1 GB == 1024 * 1024 * 1000 == 1000 MB
^^^^
and so far I haven't seen any reasonable argument why for GBs we're mixing
powers of 2 and powers of 10, whereas MBs are just powers of 2...

> Probably I wouldnt have answered but in the meantime
> I encountered a few more data points:
>
> - Not only is G = 10^9 the SI standard, also the IEEE
> decided that 1 GB = 10^9 B, that is, the SI standard
> must (by IEEE compliant engineers) also be used w.r.t.
> computer memories.
>
> - There is a proposal for a name and prefix notation
> for the binary 2^20, 2^30 etc, namely Mi, Gi etc.
> Thus, if you want to show off as a real hacker that
> cannot be bothered with this decimal stuff, and you just
> bought a 17 GB disk then you can call it a 15.8 GiB disk.
> See for example, http://physics.nist.gov/cuu/Units/binary.html .
this all doesn't exaplain why for GB numbers we mix 1024 and 1000,
giving twice the same digits with only decimal point shifted.
if just makes no sense and gives no new information, the 2nd value
should be based on either all powers of 10 or powers of 2 -- I'd vote
for the latter (and tried to provice a fix for this for years now:-(
Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
From koenig@alamak.tat.physik.uni-tuebingen.de Fri Jan 22 08:40:57 1999
Ha, Harald!
Did you try my aha1542? Was it any good?
> From: "Niki W. Waibel" <niki.waibel@gmx.net>
>
> ...
> The 2nd value is wrong!
> 8,715MB are 8.5GB - and not 8.7GB!!!
>
> We had this entire discussion a few weeks ago, and
> you can read all about it in the archives.
please read this thread again yourself and try to separate facts from advocacy...
Hmm. It is me who quotes the standards.
> You are wrong.
> 8715 MB is precisely 8.715 GB.
which gives absolutely no additional or relevant information when printing
both values with only shifting the decimal point
do you realize that in your example and kernel output it is
1 MB == 1024 * 1024
1 GB == 1024 * 1024 * 1000 == 1000 MB
^^^^
No, you are not willing to understand. Things are so simple:
1 M = 1000000. 1 G = 1000000000.
That is the SI norm. That is the IEEE norm as I learned recently.
That is what device manufacturers use. (Of course.)
That is what Windows uses if I understand people correctly.
In the good old days we sloppily said 1 kB when we really meant
1024 bytes. That was just a way of speaking. Because 1 is easier
to pronounce than 1024.
These days some people think that 1 k = 1024 is the truth,
and there are terrible confusions. But it is not the truth,
just a convenient approximation. 1 k = 1000.
With memory modules this is still convenient, so we continue
talking about 128 MB modules, well aware of the fact that these
have 2^27=134217728 bytes. With disks this is not convenient at all,
so there is no reason to defend this usage that never was very common.
Why do I say that this usage was uncommon?
For disks one often wants to know how many 1024-byte blocks there are.
So it happened that disks with 72 1024-byte blocks were called
72k disks. Disks became larger, and disks with 8000 1024-byte blocks
were called 8M disks. You see that here the usage is decimal,
but with a base unit that is 1024 bytes.
This is still what a lot of IBM software does.
And everyone knows that a 1.44MB floppy has 1.44*1024000 bytes.
Why do I insist? Unfortunately I maintain *fdisk, and I get about
two questions a week saying: Linux has a problem recognizing my
disk. Windows sees the full 10 GB but Linux only sees 9.3 GB.
You see, this sloppiness, out of convenience, from thirty years ago
has become very inconvenient, a source of confusion and discussion,
where some young people think that 1 M really means 1048576.
See also http://physics.nist.gov/cuu/Units/prefixes.html and
http://physics.nist.gov/cuu/Units/binary.html .
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
Guest section DW wrote:

> No, you are not willing to understand. Things are so simple:
> 1 M = 1000000. 1 G = 1000000000.
> That is the SI norm. That is the IEEE norm as I learned recently.
> That is what device manufacturers use. (Of course.)
> That is what Windows uses if I understand people correctly.
Well under NT if I check the properties of a file that is 16,215,628
Bytes, it claims it is 15.4 MB ( 16215628/(1024*1024) ) = 15.464427948.
So they do use the 1024B/KB 1024KB/MB convention. The Mac has always
done it this way too. My own opinion is to stick to that but the SI and
IEEE folks never ask me ;)
cheers
-Eric
--
Eric Hegstrom tele: 520-617-0072 x402
Sonoran Scanners, Inc. email: ehegstrom@sonoranscanners.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
Date: Fri, 22 Jan 1999 12:00:34 +0100 (MET)
From: dwguest@win.tue.nl (Guest section DW)
See also http://physics.nist.gov/cuu/Units/prefixes.html and
http://physics.nist.gov/cuu/Units/binary.html .
An interesting question to consider is whether we think it's a good idea
to start adopting the proposed IEEE notation for binary multiples, i.e
name Name Symbol
2**10 kibi Ki
2**20 mebi Mi
2**30 gibi Gi
2**40 tebi Ti
So 1024 bytes == 1 KiB, 1024*1024 bytes == 1 MiB, etc.... and 1 MB is
exactly 1,000,000 bytes, 1GB is exactly 1,000,000,000 bytes, and so on.
This has the advantage of being precise, and removing the ambiguity of
exactly what did people mean by "8.4GB"? The disadvantage is that it's
not clear to me how successful this new proposed nomenclature will work
out. The proponents mean well, and the scheme is logical and
well-thought out. On the other hand, the same thing can be said of
Esperato and the International Phonetic Alphabet, and look how well
those things worked out! (My grandfather Anglicized our Chinese family
name using the IPA, back when IPA was popular. As a result, no one has
any idea how to pronouce my last name simply by looking at the
spelling. :-)
One potential solution would be print the message both ways. I.e.,
print out that the disk sizes both in "megabytes" and "mebibytes".
So instead of saying just this:
hda: IBM-DTCA-24090, 3909MB w/468kB Cache, CHS=993/128/63
we'd print out something like this:
hda: IBM-DTCA-24090, 3909MB (3727 MiB) w/468KiB Cache, CHS=993/128/63
It's more verbose, true, but when you consider the millions and millions
of innocent electrons slaughtered every few months as this thread
repeatedly comes vampire-like back from the dead, it might just be worth
it. :-)
- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
From tytso@MIT.EDU Fri Jan 22 21:50:44 1999
Date: Fri, 22 Jan 1999 12:00:34 +0100 (MET)
From: dwguest@win.tue.nl (Guest section DW)
See also http://physics.nist.gov/cuu/Units/prefixes.html and
http://physics.nist.gov/cuu/Units/binary.html .
An interesting question to consider is whether we think it's a good idea
to start adopting the proposed IEEE notation for binary multiples, i.e
name Name Symbol
2**10 kibi Ki
2**20 mebi Mi
2**30 gibi Gi
2**40 tebi Ti
So 1024 bytes == 1 KiB, 1024*1024 bytes == 1 MiB, etc.... and 1 MB is
exactly 1,000,000 bytes, 1GB is exactly 1,000,000,000 bytes, and so on.
This has the advantage of being precise, and removing the ambiguity of
exactly what did people mean by "8.4GB"? The disadvantage is that it's
not clear to me how successful this new proposed nomenclature will work
out. The proponents mean well, and the scheme is logical and
well-thought out. On the other hand, ...
My point of view would be that the main goal of the proposal is to
offer an alternative. 1 GB = 10^9 B, but what if you really mean 2^30 B?
Now there is a notation for that, too: 1 GiB.
Maybe nobody expects these new symbols to be used a lot -
they just serve to keep the old symbols clean.
One potential solution would be print the message both ways. I.e.,
print out that the disk sizes both in "megabytes" and "mebibytes".
Yes. I dislike the names, but the symbols are good enough,
so in the new version of the Large Disk HOWTO one can read
"This allows access of up to 8.4 GB (7.8 GiB)."
So instead of saying just this:
hda: IBM-DTCA-24090, 3909MB w/468kB Cache, CHS=993/128/63
we'd print out something like this:
hda: IBM-DTCA-24090, 3909MB (3727 MiB) w/468KiB Cache, CHS=993/128/63
Yes. Probably
hda: IBM-DTCA-24090, 4100MB (3910 MiB) w/468KiB Cache, CHS=993/128/63
It's more verbose, true, but when you consider the millions and millions
of innocent electrons slaughtered every few months as this thread
repeatedly comes vampire-like back from the dead, it might just be worth
it. :-)
Exactly.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
On Jan 23, Guest section DW wrote:
> Hmm. Didnt I tell you that 1 k = 1000? That 1 kB = 1000 B unless
> the context makes clear that probably 2^10 was meant?
> If you are speaking about modem speeds, about tape capacity,
> about just anything except memory modules then 1 kB really means 1000 B.
so two disk sectors are 1,024 kBytes ? please get real...
and if you'd agree that 1[kK] for two sectors would be much more reasonable,
you either have to stick with 2^n or you're start mixing powers of 2 and 10.
> Now you mention 1 K. I think that is 1 degree Kelvin.
agreed, but not in this context;) even it would be very intereting too
to talk about maximum allowed temperature of disks and other parts.
> But in a computer context I would take it to mean 1024
> because of the capital K.
yep, that's how I learned it too for signal processing/transmitting.
but since upper/lowercase distinction often causes even more confusion
(and can be misused in `typos' for lager adds...) this is only reasonable
in very specific publication, not in public life :-(
and the basic problem remains: if you like using 1K (uppercase intended!)
for the `most reasonable' and natural size (like for two disk sectors;)
you have to stick with powers of two which makes a lot of sence in _this_ context...
> this is not about physics, but about computer sciences.
> even physicists (like me;) know to use apropriate units where it's due.
>
> Hmm. For whom do you think these binary units are meant?
it's not the question for _whom_ this units are meant -- otherwise
you'd have to start to paint the world in M$ colors!
units are for values. and you should pick up reasonable units
depending on the context, not depending on the audience (IMHO).
choosing units depending on the audience is what brings in all the confusion...
>
> strange that you didn't try to argue against 1K=1024, why not ?
> just because it's even `more' convenient and natural ?
> and mixing 2^n and 10^m is not more confusing than being reasonable ?
>
> Hmm. Didnt I tell you that 1 k = 1000? That 1 kB = 1000 B unless
> the context makes clear that probably 2^10 was meant?
> If you are speaking about modem speeds, about tape capacity,
> about just anything except memory modules then 1 kB really means 1000 B.
>
> Now you mention 1 K. I think that is 1 degree Kelvin.
> But in a computer context I would take it to mean 1024
> because of the capital K.
>
> You see, you could have answered all your rhetoric questions yourself
> if you had thought that in fact I was both consistent and reasonable.
except that you avoided to mention disks in you paragraph about 1k = 1000 ;-)
and when talking about transfer rates e.g. from disk through modem/network
to disk, or from disk to tape for backups I have to convert from 10^6 to 2^20
and back ? sounds _very_ consistent and reasonable :-((
Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
units are for values. and you should pick up reasonable units
depending on the context, not depending on the audience (IMHO).
choosing units depending on the audience is what brings in all the confusion...
1 k = 1000. Always. 1 M = 1000000. Always.
Where is the dependence on the audience?
and when talking about transfer rates e.g. from disk through modem/network
to disk, or from disk to tape for backups I have to convert from 10^6 to 2^20
and back ? sounds _very_ consistent and reasonable :-((
What a bad reader you are.
You are the one who wants to use binary units, and possibly have to convert.
I am telling you to follow the standard, where 1 MB always is 1000000 bytes.
Always.
But it seems you are fighting a losing battle.
We all know what the SI standard says. We have learned that IEEE decided to
follow the SI standard. The ATA standard follows SI. Disk manufacturers
follow SI. Now I read on a Phoenix web site:
CMOS setup in older ROM BIOSes will show drive capacity in binary megabytes.
CMOS setup in most newer ROM BIOSes will show drive capacity in decimal megabytes.
So it seems also BIOS manufacturers decide to follow the SI standard.
(And of course that is the only way to get rid of this confusion.)
I suppose it is about time to educate Linux fdisk a bit as well :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: error in sd.c [ In reply to ]
On Mon, 25 Jan 1999, Guest section DW wrote:
>I am telling you to follow the standard, where 1 MB always is 1000000 bytes.
>Always.
Build me a decimal computer and I will. But whilst computers still
address using powers of two, I'll still count space using powers of two.
Pat in Houston
--
Patrick St. Jean '97 XLH 883 psj@cgmlarson.com
Programmer & Systems Administrator +1 713-977-4177 x115
Larson Software Technology http://www.cgmlarson.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/