lkml.org 
[lkml]   [2024]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 00/11] md: avoid counter operation conflicts
Date
>> 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


\
 
 \ /
  Last update: 2024-05-27 16:10    [W:0.356 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site