[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: stop_machine: fill fn_result only in case of error.
On Wed, May 31, 2017 at 02:30:29AM -0600, Jan Beulich wrote: > >>> On 30.05.17 at 18:19, <gregory.herrero@xxxxxxxxxx> wrote: > > Since fn_result member is shared across all cpus, it must be filled > > only if an error happens. Assume CPU1 detects an error and set fn_result > > to -1, then CPU2 doesn't detect an error and set fn_result to 0. The > > error detected by CPU1 will be ignored. > > First of all there's a difference between stop_machine_run()'s last > argument being a valid CPU number or NR_CPUS - what you say > above applies to the latter case only, so you should also state that. > Make sense, I will mention that. > And then even after your fix it'll remain ambiguous which error is > being returned on case multiple failures occur (which isn't all that > unlikely). This (almost unavoidable) effect should also be spelled > out imo, and I think you want to use write_atomic() to actually > store the error code. > I agree, that's indeed ambiguous which error happens on which cpu. I will mention it in v2. And I will also use write_atomic(). > Finally there a various coding style violations in the code you add. > Sorry for that, I will fix it. Thanks, Gregory _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |