lkml.org 
[lkml]   [2020]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH v2 08/10] smp,irq_work: Use the new irq_work API
On Wed, Aug 19, 2020 at 12:22 AM <peterz@infradead.org> wrote:
>
> That is, the external serialization comes from the non-atomic
> test-and-set they both have. This works nicely when there is external
> state that already serializes things, but totally comes apart (and
> causes trivial list corruption) when you get it wrong.

Quite often, there just isn't any *need* for serialization, because
there is only ever one op active.

That can be either because the csd is fundamentally a single thing ("I
will transfer this object to another CPU"), or it can be because the
CSD is already per-cpu (ie smp_call_function_single).

You seem to make that common situation much worse.

Not only do you add that expensive atomic op, you add that expensive
"use irq_work queues" for something that doesn't _need_ to use them.

I have to say, I'm not a fan. What are the real advantages? Your
listed disadvantages are very very questionable.

IOW, what are the actual examples of "totally comes apart" that justifies this?

If the example is theoretical ("if you use csd's wrong") then I think
they are worthless.

Linus

\
 
 \ /
  Last update: 2020-08-19 20:52    [W:0.099 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site