Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brian,

On 2/8/23 04:58, Brian Inglis wrote:
> Hi Alex,
> 
> TL;DR: They are bit/byte unit prefixes kibi..., ... but abstract value suffix 
> symbols, which is how I think of them, and mainly how we use them. Perhaps we 
> should just call them all multiples or symbosl, as we only sometimes(/rarely?) 
> use them as unit prefixes (and seldom written out, only to explain the weird Xi 
> notation)? Feel free to change the titles and log messages as you see fit.

Indeed, I had doubts about using them as suffixes because that's incorrect according to the SI, but it makes sense and improves documentation, so I'm fine with the use as suffixes now.  However, I'm still concerned with calling them suffixes.  How about multipliers?  Does it make sense to you?

> 
> [BT;DT: Many discussions about units over the decades, including various 
> *industry* conventions about "accepted" units, values, and conversion factors, 
> invariant regardless of SI and CODATA.
> 
> ISO/BIPM etc. uses SI to mean decimal *metric* unit prefixes (and notes that SI 
> does not support non-physical units of information) and IEC to mean binary unit 
> prefixes for bits, bytes, and also allows Hertz so far. See refs from:
> 
> https://en.wikipedia.org/wiki/Binary_prefix#cite_note-bipm-book-91
> 
> Bureau International des Poids et Mesures. (2006). "§3.1 SI prefixes" (PDF). The 
> International System of Units (SI) (in French and English) (8th ed.). Paris: 
> STEDI Media. p. 127. ISBN 978-92-822-2213-3. Archived (PDF) from the original on 
> 2006-08-13. Retrieved 2007-02-25. [Side note:] These SI prefixes refer strictly 
> to powers of 10. They should not be used to indicate powers of 2 (for example, 
> one kilobit represents 1000 bits and not 1024 bits). The IEC has adopted 
> prefixes for binary powers in the international standard IEC 60027-2: 2005, 
> third edition, Letter symbols to be used in electrical technology – Part 2: 
> Telecommunications and electronics. The names and symbols for the prefixes 
> corresponding to 2^10, 2^20, 2^30, 2^40, 2^50, and 2^60 are, respectively: kibi, 
> Ki; mebi, Mi; gibi, Gi; tebi, Ti; pebi, Pi; and exbi, Ei. Thus, for example, one 
> kibibyte would be written: 1 KiB = 210 B = 1024 B, where B denotes a byte. 
> Although these prefixes are *not part of the SI*, they should be used in the 
> field of information technology to avoid the incorrect usage of the SI prefixes.
> 
> BIPM SI Brochure 2022 edition (adding ronna/ronta, quetta/quecto, etc.) English 
> text only p.143 side note (the only uses of "bit" in the document; "byte" is not 
> used; "information" and "word" are used only in the literate senses):
> 
> https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-EN.pdf#page=29
> 
> "The SI prefixes refer
> strictly to powers of 10.
> They should not be used to
> indicate powers of 2
> (for example, one kilobit
> represents 1000 bits and
> not 1024 bits). The names
> and symbols for prefixes to
> be used with powers of 2
> are recommended as
> follows:
> kibi Ki 2^10
> mebi Mi 2^20
> gibi Gi 2^30
> tebi Ti 2^40
> pebi Pi 2^50
> exbi Ei 2^60
> zebi Zi 2^70
> yobi Yi 2^80"
> 
> ...no
> robi Ri 2^90
> qubi Qi 2^100
> yet! ;^> ]

Thanks.  It now makes sense.  Looks like the SI talks about them, but only takes them as defined by IEC, and doesn't incorporate them as their own.  So, using IEC seems correct (as SI does itself).

Cheers,

Alex

BTW, this was one of the few patches that I received inline :/

> 
> On 2023-02-07 16:44, Alejandro Colomar wrote:
>> Hi Brian,
>>
>> The subject is not correct, IMO.  The SI also defines the Ki, Mi, ... prefixes for binary multipliers.
>> Also, they are prefixes, not suffixes.
>>
>> Cheers,
>>
>> Alex
>>
>> On 2/7/23 21:11, Brian Inglis wrote:
>>> ---
>>>   man2/shmget.2 | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/man2/shmget.2 b/man2/shmget.2
>>> index cdb2d3bee4b5..4bc18bedf3a9 100644
>>> --- a/man2/shmget.2
>>> +++ b/man2/shmget.2
>>> @@ -354,7 +354,7 @@ for a discussion of why this default value (rather than
>>>   is used.
>>>   .IP
>>>   From Linux 2.2 up to Linux 3.15, the default value of
>>> -this limit was 0x2000000 (32\ MB).
>>> +this limit was 0x2000000 (32\ MiB).
>>>   .IP
>>>   Because it is not possible to map just part of a shared memory segment,
>>>   the amount of virtual memory places another limit on the maximum size of a
> 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux