Skip to contentSkip to conversation

+ mm-slab-shorten-kmalloc-cache-names-for-large-sizes.patch added to -mm tree

DISCUSSION Alexey Dobriyan 4 participants 5 messages Sep 7, 2018 – Sep 8, 2018 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · On Thu, Sep 06, 2018 at 03:48:49PM -0700, [email protected] wrote:
(quoted diff) +0 -8
-	{"kmalloc-1024",         1024},		{"kmalloc-2048",         2048},
-	{"kmalloc-4096",         4096},		{"kmalloc-8192",         8192},
-	{"kmalloc-16384",       16384},		{"kmalloc-32768",       32768},
-	{"kmalloc-65536",       65536},		{"kmalloc-131072",     131072},
-	{"kmalloc-262144",     262144},		{"kmalloc-524288",     524288},
-	{"kmalloc-1048576",   1048576},		{"kmalloc-2097152",   2097152},
-	{"kmalloc-4194304",   4194304},		{"kmalloc-8388608",   8388608},
-	{"kmalloc-16777216", 16777216},		{"kmalloc-33554432", 33554432},

Review

Quoted 10 lines
(quoted diff) +9 -1
-	{"kmalloc-67108864", 67108864}
+	{"kmalloc-1k",           1024},		{"kmalloc-2k",           2048},
+	{"kmalloc-4k",           4096},		{"kmalloc-8k",           8192},
+	{"kmalloc-16k",         16384},		{"kmalloc-32k",         32768},
+	{"kmalloc-64k",         65536},		{"kmalloc-128k",       131072},
+	{"kmalloc-256k",       262144},		{"kmalloc-512k",       524288},
+	{"kmalloc-1M",        1048576},		{"kmalloc-2M",        2097152},
+	{"kmalloc-4M",        4194304},		{"kmalloc-8M",        8388608},
+	{"kmalloc-16M",      16777216},		{"kmalloc-32M",      33554432},
+	{"kmalloc-64M",      67108864}

I'd rather use KB and MB suffixes or at least capital 'K'.

#2 lore raw
Quoted 13 lines · Alexey Dobriyan
Quoted 12 lines · On Thu, Sep 06, 2018 at 03:48:49PM -0700, [email protected] wrote:
(quoted diff) +3 -9
-	{"kmalloc-1024",         1024},		{"kmalloc-2048",         2048},
-	{"kmalloc-4096",         4096},		{"kmalloc-8192",         8192},
-	{"kmalloc-16384",       16384},		{"kmalloc-32768",       32768},
-	{"kmalloc-65536",       65536},		{"kmalloc-131072",     131072},
-	{"kmalloc-262144",     262144},		{"kmalloc-524288",     524288},
-	{"kmalloc-1048576",   1048576},		{"kmalloc-2097152",   2097152},
-	{"kmalloc-4194304",   4194304},		{"kmalloc-8388608",   8388608},
-	{"kmalloc-16777216", 16777216},		{"kmalloc-33554432", 33554432},
-	{"kmalloc-67108864", 67108864}
+	{"kmalloc-1k",           1024},		{"kmalloc-2k",           2048},
+	{"kmalloc-4k",           4096},		{"kmalloc-8k",           8192},
+	{"kmalloc-16k",         16384},		{"kmalloc-32k",         32768},
Quoted 8 lines

Review

Quoted 6 lines
(quoted diff) +6 -0
+	{"kmalloc-64k",         65536},		{"kmalloc-128k",       131072},
+	{"kmalloc-256k",       262144},		{"kmalloc-512k",       524288},
+	{"kmalloc-1M",        1048576},		{"kmalloc-2M",        2097152},
+	{"kmalloc-4M",        4194304},		{"kmalloc-8M",        8388608},
+	{"kmalloc-16M",      16777216},		{"kmalloc-32M",      33554432},
+	{"kmalloc-64M",      67108864}

I'd rather use KB and MB suffixes or at least capital 'K'.

I like k and M better.

#3 lore raw
Quoted 23 lines · Johannes Weiner
Quoted 13 lines · Alexey Dobriyan
Quoted 12 lines · On Thu, Sep 06, 2018 at 03:48:49PM -0700, [email protected] wrote:
(quoted diff) +3 -9
-	{"kmalloc-1024",         1024},		{"kmalloc-2048",         2048},
-	{"kmalloc-4096",         4096},		{"kmalloc-8192",         8192},
-	{"kmalloc-16384",       16384},		{"kmalloc-32768",       32768},
-	{"kmalloc-65536",       65536},		{"kmalloc-131072",     131072},
-	{"kmalloc-262144",     262144},		{"kmalloc-524288",     524288},
-	{"kmalloc-1048576",   1048576},		{"kmalloc-2097152",   2097152},
-	{"kmalloc-4194304",   4194304},		{"kmalloc-8388608",   8388608},
-	{"kmalloc-16777216", 16777216},		{"kmalloc-33554432", 33554432},
-	{"kmalloc-67108864", 67108864}
+	{"kmalloc-1k",           1024},		{"kmalloc-2k",           2048},
+	{"kmalloc-4k",           4096},		{"kmalloc-8k",           8192},
+	{"kmalloc-16k",         16384},		{"kmalloc-32k",         32768},
Quoted 8 lines

Review

Quoted 6 lines
(quoted diff) +6 -0
+	{"kmalloc-64k",         65536},		{"kmalloc-128k",       131072},
+	{"kmalloc-256k",       262144},		{"kmalloc-512k",       524288},
+	{"kmalloc-1M",        1048576},		{"kmalloc-2M",        2097152},
+	{"kmalloc-4M",        4194304},		{"kmalloc-8M",        8388608},
+	{"kmalloc-16M",      16777216},		{"kmalloc-32M",      33554432},
+	{"kmalloc-64M",      67108864}

I'd rather use KB and MB suffixes or at least capital 'K'.

Quoted 1 line

I like k and M better.

k and M work for me too. It we were going to be anal then we should go with the IEC standard of KiB and MiB, but we're trying to make /proc/slabinfo a little less ugly, and so we have 16 characters to work with. "dma-kmalloc-256KiB" is 18 characters. The obvious place to lose two characters is the "iB" which are implicit; we know we're measuring bytes and the binary nature is assumed in this context of memory bytes (not storage bytes). "dma-kmalloc-256k" is better.

#4 lore raw
Quoted 24 lines · Matthew Wilcox
Quoted 23 lines · Johannes Weiner
Quoted 21 lines · Alexey Dobriyan
Quoted 8 lines · On Thu, Sep 06, 2018 at 03:48:49PM -0700, [email protected] wrote:
(quoted diff) +0 -8
-	{"kmalloc-1024",         1024},		{"kmalloc-2048",         2048},
-	{"kmalloc-4096",         4096},		{"kmalloc-8192",         8192},
-	{"kmalloc-16384",       16384},		{"kmalloc-32768",       32768},
-	{"kmalloc-65536",       65536},		{"kmalloc-131072",     131072},
-	{"kmalloc-262144",     262144},		{"kmalloc-524288",     524288},
-	{"kmalloc-1048576",   1048576},		{"kmalloc-2097152",   2097152},
-	{"kmalloc-4194304",   4194304},		{"kmalloc-8388608",   8388608},
-	{"kmalloc-16777216", 16777216},		{"kmalloc-33554432", 33554432},

Review

Quoted 10 lines
(quoted diff) +9 -1
-	{"kmalloc-67108864", 67108864}
+	{"kmalloc-1k",           1024},		{"kmalloc-2k",           2048},
+	{"kmalloc-4k",           4096},		{"kmalloc-8k",           8192},
+	{"kmalloc-16k",         16384},		{"kmalloc-32k",         32768},
+	{"kmalloc-64k",         65536},		{"kmalloc-128k",       131072},
+	{"kmalloc-256k",       262144},		{"kmalloc-512k",       524288},
+	{"kmalloc-1M",        1048576},		{"kmalloc-2M",        2097152},
+	{"kmalloc-4M",        4194304},		{"kmalloc-8M",        8388608},
+	{"kmalloc-16M",      16777216},		{"kmalloc-32M",      33554432},
+	{"kmalloc-64M",      67108864}

I'd rather use KB and MB suffixes or at least capital 'K'.

Quoted 4 lines
Quoted 1 line

I like k and M better.

k and M work for me too. It we were going to be anal then we should go with the IEC standard of KiB and MiB, but we're trying to make

But ^K and ^M.

Small 'k' .. I don't know what that is.

Quoted 6 lines

/proc/slabinfo a little less ugly, and so we have 16 characters to work with. "dma-kmalloc-256KiB" is 18 characters. The obvious place to lose two characters is the "iB" which are implicit; we know we're measuring bytes and the binary nature is assumed in this context of memory bytes (not storage bytes). "dma-kmalloc-256k" is better.

Signature · 1 line
~Randy
#5 lore raw
Quoted 11 lines · Randy Dunlap
Quoted 6 lines · Matthew Wilcox
Quoted 3 lines · Johannes Weiner
Quoted 1 line · Alexey Dobriyan

I'd rather use KB and MB suffixes or at least capital 'K'.

I like k and M better.

k and M work for me too. It we were going to be anal then we should go with the IEC standard of KiB and MiB, but we're trying to make

But ^K and ^M.

Small 'k' .. I don't know what that is.

SI uses 'k' for kilo and 'K' for Kelvin. It's an anomaly because all the other magnifying prefixes use capital letters, but it's km, not Km; kg, kV, kJ, kN, kW and kΩ.