[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 3/9] vnuma hook to debug-keys u
>>> On 29.08.14 at 05:06, <ufimtseva@xxxxxxxxx> wrote: > @@ -389,6 +389,35 @@ static void dump_numa(unsigned char key) > > for_each_online_node(i) > printk(" Node %u: %u\n", i, page_num_node[i]); > + > + if (d->vnuma) { > + printk(" Domain has %u vnodes, %u vcpus\n", > + d->vnuma->nr_vnodes, d->max_vcpus); > + for (i = 0; i < d->vnuma->nr_vnodes; i++) { > + err = snprintf(keyhandler_scratch, 12, "%u", > + > d->vnuma->vnode_to_pnode[i]); > + if (err < 0 || d->vnuma->vnode_to_pnode[i] == > NUMA_NO_NODE) > + snprintf(keyhandler_scratch, 3, "???"); > + > + printk(" vnode %3u - pnode %s,", i, > keyhandler_scratch); > + printk(" %"PRIu64" MB, ", > (d->vnuma->vmemrange[i].end - > + d->vnuma->vmemrange[i].start) >> 20); > + > + printk("vcpu nrs: "); > + for (j = 0, n = 0; j < d->max_vcpus; j++) { > + if (d->vnuma->vcpu_to_vnode[j] == i) { > + if ( ((n + 1) % 8) == 0 ) > + printk("%d\n", j); > + else if ( !(n % 8) && n != 0 ) > + printk("%s%d ", " > ", j); > + else > + printk("%d ", j); > + n++; > + } > + } > + printk("\n"); > + } > + } There are still a number of indentation issues here (remember that tabs are worth 8 spaces when checking for proper alignment of multi-line statements), and - once that's fixed - a few overly long lines. It might also help to invert the initial condition (following it by "continue;") and thus decrease indentation of the rest of the code by one level. Similarly maybe for the innermost loop. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |