Page MenuHomeFreeBSD

ps.1: Use ISO/IEC byte units
ClosedPublic

Authored by ziaee on Wed, Mar 26, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 9, 3:09 AM
Unknown Object (File)
Wed, Apr 9, 3:09 AM
Unknown Object (File)
Wed, Apr 9, 3:09 AM
Unknown Object (File)
Tue, Apr 8, 4:59 AM
Unknown Object (File)
Tue, Apr 8, 4:59 AM
Unknown Object (File)
Tue, Apr 8, 4:59 AM
Unknown Object (File)
Tue, Apr 8, 4:59 AM
Unknown Object (File)
Tue, Apr 8, 4:59 AM
Subscribers

Details

Summary

The ps(1) utility uses 1024 byte units, not 1000 byte units.

git grep KiB | wc -l
535
git grep KBytes | wc -l
39

Fixes: 20bdda14fa5c (Consistent usage of Kbyte unit)
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ziaee requested review of this revision.Wed, Mar 26, 5:44 PM
ziaee created this revision.

Just my $0.02 https://en.wikichip.org/wiki/kibibyte and consistency is cool. and a certainly am convinced that https://github.com/freebsd/freebsd-src/commit/20bdda14fa5c7ccb96c814d09311db948b1d239a drops informations kBytes is not common usage for KiB

In D49522#1129122, @jsm wrote:

Just my $0.02 https://en.wikichip.org/wiki/kibibyte and consistency is cool. and a certainly am convinced that https://github.com/freebsd/freebsd-src/commit/20bdda14fa5c7ccb96c814d09311db948b1d239a drops informations kBytes is not common usage for KiB

Yea, the days of correcting marketing folks that say a new machine has 65kB of RAM are long since past. kB hasn't been a primary unit of measure of memory in maybe 40 years. So the sensibilities developed when it was (like I did) aren't a good judge for what's common (even though I read kBytes as 1024 always).

And we're now maybe 20 years past when the view of IEC standard started to shift from 'silly' to 'useful', so this is a good change.

This revision is now accepted and ready to land.Wed, Mar 26, 9:04 PM

I sent a patch to llvm to fix 6 of them in contrib as well.

Contrib likely should be done upstream

Absolutely, that's what I meant I did, sorry.

This revision was automatically updated to reflect the committed changes.