tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: percpu_foreach() does not execute remotely
> Date: Tue, 28 Jan 2020 09:08:22 -0800
> From: Jason Thorpe <thorpej%me.com@localhost>
>
> >> 2- If I were to use xc_broadcast(), then in the case of network
> >> protocol / interface stats, I would need to use either atomic
> >> operations or add some other synchronization into the shared
> >> "exported copy" of the data that's being gathered up.
> >
> > Why is this different from a hypothetical percpu_foreach_xcall?
>
> Because percpu_foreach_xcall() would make the xcalls one-by-one, or
> possibly provide another synchronization mechanism, that would hide
> the complexity of this from the callers who just want to do a pretty
> basic thing, but safely and correctly.
OK, that sounds reasonable. (I misunderstood your first message to
mean that percpu_foreach_xcall would synchronize with _other activity_
on each CPU, rather than that it would serialize the xcall with itself
on different CPUs.)
Home |
Main Index |
Thread Index |
Old Index