Re: [RFC PATCH 0/6 v2] Queued spinlocks/RW-locks for ARM

Arnd Bergmann
2019-10-16T18:34:15Z

On Wed, Oct 16, 2019 at 7:45 PM Waiman Long <longman@redhat.com> wrote:
> So if the target is 4 cores or less, there isn't too much to gain from
> using qspinlock. Lock function inlining probably has a bigger
> performance benefit here than switching to qspinlock. Just food for thought.

As a very crude estimate, here are the numbers of machine descriptions
based on the number of CPUs in each machine:

git grep -c '\<cpu@' arch/arm/boot/dts/ | cut -f 2 -d: | sort -n | uniq -c
115 1
63 2
48 4
1 5
1 6
8 8
2 16

Filtering out the machines with at most four cores:

$ git grep -c '\<cpu@' arch/arm/boot/dts/ | grep -v ':[124]$'
arch/arm/boot/dts/axm5516-cpus.dtsi:16
arch/arm/boot/dts/exynos5260.dtsi:6
arch/arm/boot/dts/exynos5420-cpus.dtsi:8
arch/arm/boot/dts/exynos5422-cpus.dtsi:8
arch/arm/boot/dts/hip04.dtsi:16
arch/arm/boot/dts/mt6592.dtsi:8
arch/arm/boot/dts/r8a7790.dtsi:8
arch/arm/boot/dts/sun8i-a83t.dtsi:8
arch/arm/boot/dts/sun9i-a80.dtsi:8
arch/arm/boot/dts/tegra124.dtsi:8
arch/arm/boot/dts/tegra30.dtsi:8
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts:5

None of the above are recent or popular. There are still more
dual-core systems than quad-code, but most of the new ones
are either quad-code or single-core.

Arnd