Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm-mem: update to arm-mem-0100445, enable for all arm builds #3393

Merged
merged 2 commits into from
Apr 14, 2019
Merged

arm-mem: update to arm-mem-0100445, enable for all arm builds #3393

merged 2 commits into from
Apr 14, 2019

Conversation

MilhouseVH
Copy link
Contributor

This has been in my RPi/RPi2 test builds since 15 March 2019 without complaint.

I can drop the second commit which enables arm-mem for all arm-based projects if this is not wanted - I have not build/run-time tested this with any other projects.

@kszaq
Copy link
Contributor

kszaq commented Apr 2, 2019

Results from built-in test.c on S905X, 5.1 kernel, performance CPU governor:

test-memcmp:

GLIBC
L1,     L2,     M,      T,      R,      RT
801.61, 795.65, 505.09, 301.98,  68.90,  27.91
801.80, 794.64, 504.32, 301.62,  68.90,  27.93
801.72, 795.05, 504.46, 302.06,  68.91,  27.92
801.86, 796.03, 504.80, 302.36,  68.89,  27.93
803.56, 795.29, 504.81, 302.23,  68.89,  27.93

ARM-MEM
L1,     L2,     M,      T,      R,      RT
2633.89, 2383.70, 1135.15, 408.95,  75.48,  27.42
2753.91, 2419.36, 1135.86, 408.56,  75.44,  27.41
2738.98, 2414.06, 1136.63, 408.83,  75.45,  27.40
2760.25, 2416.71, 1136.94, 409.09,  75.43,  27.40
2745.08, 2420.62, 1136.94, 408.84,  75.42,  27.41

test-memcpy:

GLIBC
L1,     L2,     M,      T,      R,      RT
2268.48, 2198.67, 1570.57, 446.60,  85.22,  25.70
2274.64, 2207.47, 1558.60, 446.91,  85.27,  25.70
2276.86, 2193.95, 1559.59, 445.19,  85.32,  25.69
2266.16, 2196.71, 1599.13, 445.72,  85.28,  25.69
2266.65, 2204.22, 1551.97, 446.52,  85.27,  25.66

ARM-MEM
L1,     L2,     M,      T,      R,      RT
3747.16, 3863.79, 1616.89, 387.12,  94.50,  25.96
3730.17, 3854.90, 1630.59, 387.13,  94.47,  25.95
3728.18, 3845.70, 1603.97, 386.76,  94.46,  25.95
3726.19, 3846.41, 1630.53, 386.67,  94.45,  25.95
3728.51, 3844.99, 1621.51, 387.12,  94.44,  25.95

test-memset

GLIBC
L1,     L2,     M,      T,      R,      RT
3166.15, 3215.72, 3116.63, 657.61, 185.93,  51.73
3180.56, 3219.68, 3118.72, 656.29, 185.96,  51.70
3190.48, 3224.14, 3122.66, 666.53, 185.86,  51.69
3190.23, 3224.63, 3124.99, 652.03, 185.83,  51.72
3189.51, 3223.14, 3134.57, 645.63, 185.76,  51.70

ARM-MEM
L1,     L2,     M,      T,      R,      RT
19644.97, 14971.84, 6227.24, 1006.49, 187.54,  51.97
19116.69, 15068.78, 6138.83, 1041.12, 187.21,  51.96
18892.80, 15584.52, 6239.29, 1002.56, 187.29,  51.96
19257.12, 15339.14, 6434.56, 1024.84, 187.21,  51.92
18875.79, 15521.01, 6185.91, 1011.61, 187.45,  51.83

All results are in favour of arm-mem except for T test of memcpy.

I also ran benchmarks from glibc and results were in favour of arm-mem except for very short lengths (0, 1 and 2).

@@ -11,7 +12,7 @@ PKG_DEPENDS_INIT="toolchain glibc:init"
PKG_SECTION="virtual"
PKG_LONGDESC="Meta package for installing various tools and libs needed for libc"

if [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
if [ "${TARGET_ARCH}" = "arm" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm-mem was tested only on A7 and A53, perhaps something like && [[ "$TARGET_CPU" = "cortex-a7" ]] || [[ "$TARGET_CPU" = *"cortex-a53" ]] should be added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I'd rather just continue limiting it to RPi/RPi2 than get into the game of cherry picking support for specific ARM CPU implementations. If we start restricting this to specific implementations of ARM CPU then I would start to question the sense of including it at all (even for RPi/RPi2) - at that point it's just more trouble/hassle than it's worth (IMHO).

@CvH CvH merged commit bcf6a8e into LibreELEC:master Apr 14, 2019
@Kwiboo
Copy link
Member

Kwiboo commented Apr 14, 2019

Results from RK3328 on 5.0.7 kernel, performance CPU governor:

LibreELEC:~ # /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
734.91, 730.42, 574.87, 311.84,  92.01,  37.26
733.83, 730.18, 573.18, 312.02,  92.02,  37.25
734.52, 729.74, 573.95, 311.94,  92.01,  37.32
734.30, 729.72, 574.65, 312.05,  92.02,  37.31
733.80, 729.34, 573.53, 311.89,  92.09,  37.27

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
2536.41, 2238.02, 1235.65, 443.22, 103.60,  37.21
2535.03, 2238.26, 1230.00, 442.98, 103.64,  37.20
2528.76, 2237.42, 1234.34, 442.95, 103.63,  37.22
2529.98, 2238.50, 1231.30, 443.13, 103.66,  37.22
2532.42, 2239.33, 1232.17, 444.20, 103.70,  37.21

LibreELEC:~ # /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
2096.47, 2034.24, 1525.11, 459.88, 106.41,  33.42
2089.37, 2046.57, 1522.34, 460.86, 103.36,  33.42
2088.95, 2038.01, 1518.98, 459.55, 106.39,  33.42
2083.35, 2040.19, 1503.03, 459.10, 106.42,  33.41
2082.52, 2040.39, 1499.53, 459.16, 106.45,  33.39

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
3431.96, 3527.98, 1587.09, 425.03, 116.94,  33.49
3411.86, 3548.00, 1584.15, 425.00, 116.86,  33.49
3412.97, 3561.27, 1586.73, 425.03, 117.08,  33.46
3398.04, 3557.94, 1592.03, 425.27, 117.08,  33.47
3407.43, 3551.61, 1590.76, 425.03, 116.95,  33.45

LibreELEC:~ # /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
2923.60, 2951.75, 2834.58, 714.67, 263.38,  78.22
2924.01, 2949.88, 2852.12, 712.71, 263.42,  78.48
2921.36, 2949.67, 2844.39, 716.38, 263.15,  78.43
2911.83, 2954.87, 2848.25, 713.54, 262.89,  78.39
2911.22, 2952.37, 2849.80, 715.39, 263.19,  78.32

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
17787.11, 13996.39, 6539.92, 1091.52, 272.20,  79.34
17475.84, 14224.52, 6286.99, 1094.60, 272.41,  79.18
17490.42, 14109.53, 6619.39, 1112.55, 272.87,  79.21
17475.84, 14190.79, 6292.65, 1078.04, 272.17,  79.24
17475.84, 14133.33, 6362.33, 1089.45, 272.07,  79.28

@Kwiboo
Copy link
Member

Kwiboo commented Apr 14, 2019

Results from RK3399 (with A72 cores disabled) on 5.0.7 kernel, performance CPU governor:

LibreELEC:~ # /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
803.46, 789.83, 560.11, 309.15,  82.61,  33.17
802.58, 789.55, 560.22, 308.95,  82.53,  33.14
802.56, 789.57, 560.25, 308.88,  82.57,  33.19
802.55, 789.91, 560.17, 308.73,  82.54,  33.12
802.87, 789.73, 560.15, 308.85,  82.51,  33.21

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
2765.53, 2449.92, 1023.44, 460.99,  92.95,  33.88
2774.86, 2446.06, 1023.69, 461.15,  92.97,  33.94
2763.52, 2446.92, 1018.69, 461.53,  92.99,  33.93
2764.80, 2448.63, 1022.24, 462.51,  92.86,  33.94
2766.81, 2454.80, 1023.59, 462.14,  93.00,  33.92

LibreELEC:~ # /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
2282.81, 2230.15, 1638.11, 474.99,  96.41,  30.16
2281.94, 2233.84, 1637.98, 474.13,  96.45,  29.98
2271.43, 2229.68, 1641.70, 474.85,  96.59,  30.34
2274.88, 2231.46, 1619.89, 474.83,  96.71,  30.31
2278.47, 2235.99, 1655.83, 475.40,  96.89,  30.34

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
3738.15, 3887.81, 1626.04, 433.54, 105.45,  30.54
3724.54, 3862.36, 1609.63, 433.92, 105.24,  30.54
3726.52, 3889.98, 1614.90, 434.65, 105.50,  30.58
3724.21, 3877.02, 1622.96, 433.01, 105.45,  30.52
3723.88, 3883.85, 1624.34, 433.49, 105.48,  30.52

LibreELEC:~ # /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
3201.44, 3224.88, 3106.93, 780.60, 270.14,  83.20
3185.39, 3224.14, 3111.31, 783.33, 269.69,  82.90
3185.15, 3215.47, 3107.39, 794.07, 270.08,  82.98
3187.81, 3217.20, 3106.93, 781.54, 269.73,  82.56
3184.66, 3218.19, 3116.63, 784.13, 266.11,  82.73

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
19134.13, 15367.28, 10487.74, 1182.44, 284.33,  86.17
19047.24, 15452.31, 10348.01, 1204.23, 284.22,  85.56
19134.13, 15367.28, 10461.58, 1212.59, 283.47,  85.89
19029.95, 15395.52, 10309.85, 1216.61, 283.57,  85.34
19151.61, 15266.47, 10464.19, 1199.89, 283.80,  85.99

@Kwiboo
Copy link
Member

Kwiboo commented Apr 14, 2019

Results from RK3399 (with A72 cores enabled) on 5.0.7 kernel, performance CPU governor:

LibreELEC:~ # /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
2022.47, 2017.59, 1971.35, 598.80, 154.09,  47.81
2025.50, 2019.34, 1967.93, 598.48, 153.84,  47.94
2022.76, 2017.98, 1970.98, 598.53, 153.34,  47.88
2029.03, 2018.07, 1970.98, 598.23, 153.60,  47.68
2025.79, 2017.01, 1969.04, 598.51, 153.52,  47.77

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
3801.16, 3411.61, 2927.99, 665.02, 161.57,  49.64
3825.78, 3410.78, 2917.80, 664.33, 161.45,  49.60
3828.92, 3409.39, 2924.72, 664.46, 161.42,  49.30
3822.29, 3412.17, 2918.21, 664.58, 161.40,  49.76
3831.37, 3404.68, 2915.37, 663.83, 161.26,  49.59

LibreELEC:~ # /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
4040.66, 4759.82, 2853.09, 317.94, 160.27,  48.53
4062.97, 4890.40, 2532.94, 306.66, 153.74,  46.52
4054.72, 4789.76, 2850.96, 307.02, 153.27,  46.51
4055.90, 4810.66, 2498.99, 306.29, 153.40,  46.51
4056.68, 4753.88, 2843.81, 306.78, 153.54,  45.97

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
3558.63, 3689.88, 2386.37, 326.78, 144.91,  42.55
3558.63, 3691.51, 2427.81, 313.33, 137.91,  42.67
3555.91, 3695.74, 2289.95, 314.74, 138.59,  42.60
3553.50, 3683.71, 1739.84, 315.44, 138.61,  42.62
3548.09, 3690.53, 2101.23, 313.43, 138.64,  42.42

LibreELEC:~ # /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
10262.30, 11297.52, 9215.66, 484.56, 671.63, 230.91
10180.10, 10578.59, 9155.31, 499.47, 667.61, 236.68
10143.17, 10239.84, 9240.03, 528.66, 677.12, 230.90
10257.28, 10444.08, 9252.26, 497.63, 659.56, 227.95
10180.10, 10605.37, 9276.81, 517.21, 693.59, 242.38

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
14069.78, 12602.65, 12667.01, 534.45, 649.82, 209.16
14126.65, 12328.19, 12724.66, 542.34, 649.72, 216.30
14098.16, 12386.52, 12709.24, 521.36, 615.34, 203.44
14140.94, 12302.85, 12716.94, 520.85, 632.19, 211.66
14093.42, 12324.57, 12767.27, 559.34, 640.59, 217.15

@Kwiboo
Copy link
Member

Kwiboo commented Apr 15, 2019

Results from RK3288 on 5.0.7 kernel, performance CPU governor:

LibreELEC:~ # /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
1157.85, 1158.05, 1040.53, 518.08, 124.88,  46.15
1157.79, 1158.14, 1037.90, 517.32, 124.80,  46.01
1158.43, 1158.27, 1036.03, 520.22, 125.18,  46.28
1158.81, 1157.82, 1039.19, 518.77, 124.92,  46.25
1157.92, 1157.41, 1036.90, 518.15, 124.97,  46.19

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcmp 5
L1,     L2,     M,      T,      R,      RT
2952.00, 2455.09, 1231.62, 585.68, 130.14,  45.78
2961.17, 2454.08, 1227.41, 592.42, 130.56,  45.74
3012.21, 2454.66, 1236.45, 591.24, 130.07,  45.80
2992.87, 2447.06, 1240.62, 591.52, 129.74,  45.81
3015.24, 2440.50, 1237.44, 587.96, 130.19,  45.92

LibreELEC:~ # /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
6044.39, 5905.99, 1357.38, 1537.48, 146.42,  45.70
6035.69, 5904.33, 1365.74, 1526.91, 145.40,  45.50
6042.65, 5903.49, 1359.67, 1552.50, 146.55,  45.37
6031.35, 5924.37, 1364.27, 1546.19, 146.36,  44.44
6060.11, 5903.49, 1361.79, 1542.49, 145.93,  45.66

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memcpy 5
L1,     L2,     M,      T,      R,      RT
6055.73, 5917.67, 1376.00, 825.16, 142.02,  43.00
6046.13, 5920.18, 1365.47, 823.53, 142.42,  43.00
6041.78, 5949.61, 1378.44, 801.69, 142.36,  42.98
6050.49, 5942.01, 1364.05, 826.60, 142.65,  42.96
6036.56, 5920.18, 1371.41, 822.87, 142.72,  42.74

LibreELEC:~ # /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
5232.94, 5166.01, 4858.72, 951.99, 577.14, 183.81
5366.86, 5171.11, 4880.20, 945.99, 578.99, 181.81
5367.55, 5171.11, 4900.16, 942.26, 603.45, 188.67
5418.17, 5187.12, 4863.79, 949.32, 571.82, 183.36
5372.36, 5177.51, 4887.03, 944.18, 581.14, 183.14

LibreELEC:~ # LD_PRELOAD=/usr/lib/libarmmem-v7l.so /usr/lib/test-memset 5
L1,     L2,     M,      T,      R,      RT
12598.98, 11009.51, 7603.42, 1334.15, 634.96, 206.02
12610.35, 11035.62, 7830.56, 1339.61, 633.01, 212.93
12595.20, 11032.71, 7755.27, 1342.39, 659.26, 219.05
12621.73, 11021.10, 7705.40, 1338.34, 663.41, 205.10
12467.90, 11012.41, 7826.18, 1339.69, 636.57, 206.05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants