On Fri, 30 May 2008, Rusty Russell wrote: > Hmm, does cpu_free(NULL, 0) do something? Seems like it shouldn't, for > symmetry with free(). No it just returns. > > + percpu = cpu_alloc(size, GFP_KERNEL|__GFP_ZERO, align); > > + if (!percpu) > > + printk(KERN_WARNING "Could not allocate %lu bytes percpu data\n", > > + size); > > if (!percpu) { > > err = -ENOMEM; > > goto free_mod; > > OK, we've *never* had a report of the per-cpu alignment message, so I'd be > happy to pass that through to cpu_alloc() and have it fail. Also, the if > (!percpu) cases should be combined. Ack. > > free_percpu: > > if (percpu) > > - percpu_modfree(percpu); > > + cpu_free(percpu, percpu_size); > > As above. The if can be dropped. > > > + goal = __per_cpu_size; > > Where did __per_cpu_size come from? I missed it in the earlier patches... Its __per_cpu_end - __per_cpu_start. -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html