On Sun, Jun 16, 2013 at 06:41:24PM +0200, Andreas Färber wrote: > Am 11.06.2013 09:41, schrieb Markus Armbruster: > > Andreas Färber <afaer...@suse.de> writes: > >> If having patch 57/59 larger is not a concern (which getting rid of > >> open-coded CPU loops tried to address), then I can just convert the > >> loops in place alongside first_cpu / next_cpu. > >> Then still the question remains of whether you'd want to inline and drop > >> qemu_for_each_cpu() afterwards, or whether we can establish some rules > >> of thumb when to use which? > > > > To be honest, I see no value in qemu_for_each_cpu(). > > > > At a glance, PATCH 57 looks fairly mechanical to me. Is it? Would it > > remain so if refrains from converting simple loops to > > qemu_for_each_cpu()? > > v2 does that now. > > Andreas
I think it's a bad idea to have everyone looking at CPU state also care about the data structure used to keep all CPUs. If we switch to another datastructure what then? Rework it again? And I think it *would* be a good idea to rework it - there's a singly linked list there manually put together using the next_cpu pointer. We have macros for list manipulation, it should use that. > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg