From: "Jan Beulich" Subject: Re: [PATCH v8 3/9] vnuma hook to debug-keys u Date: Tue, 26 Aug 2014 16:29:47 +0100 Message-ID: <53FCC40B020000780002DB89@mail.emea.novell.com> References: <1409039106-955-1-git-send-email-ufimtseva@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409039106-955-1-git-send-email-ufimtseva@gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Elena Ufimtseva Cc: keir@xen.org, Ian.Campbell@citrix.com, lccycc123@gmail.com, george.dunlap@eu.citrix.com, msw@linux.com, dario.faggioli@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 26.08.14 at 09:45, wrote: > @@ -389,6 +389,39 @@ 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"); > + } > + } > } > > rcu_read_unlock(&domlist_read_lock); Actually I'm afraid Konrad's comment (and me agreeing to it) misguided you here: The function is currently written in Linux style, so Linux style is what the changes should be in. I.e. opening curly braces on the same line as the end of their control construct, and no blanks inside outermost parentheses of control constructs. However, the comment regarding overly long lines was correct (and sadly still stands), and there are indentation issues too. Jan