Re: [PATCH 00/11] md: avoid counter operation conflicts

From: tada keisuke
Date: Tue Mar 26 2024 - 21:27:50 EST


>> Currently, active_aligned_reads and nr_pending used as counters are atomic types.
>> Therefore, when inc/dec in a multi-core results in conflicts.
>
> I don't uderstand what's the problem here, what's wrong with atomic
> types in a multi-core system?

Hi Kuai

This patch is not a fix for the problem, but an improvement.
This patch makes the counter inc/dec faster.

For the same reason, active_io was changed from atomic_t to percpu_ref.
https://marc.info/?l=linux-raid&m=167514225920879

Thanks,
Keisuke