* [PATCH RFC v2 7/7] xen/vNUMA: adds vNUMA to NUMA debug-key
@ 2013-09-13 8:50 Elena Ufimtseva
2013-09-19 14:38 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Elena Ufimtseva @ 2013-09-13 8:50 UTC (permalink / raw)
To: xen-devel
Cc: lccycc123, george.dunlap, msw, dario.faggioli, stefano.stabellini,
Elena Ufimtseva
Prints basic information about vNUMA topology
for vNUMA enabled domains when issuing debug-key 'u'.
Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
---
xen/arch/x86/numa.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index b141877..7980e54 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -347,7 +347,7 @@ EXPORT_SYMBOL(node_data);
static void dump_numa(unsigned char key)
{
s_time_t now = NOW();
- int i;
+ int i, j;
struct domain *d;
struct page_info *page;
unsigned int page_num_node[MAX_NUMNODES];
@@ -389,6 +389,27 @@ 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.nr_vnodes > 0)
+ {
+ printk(" Domain has %d vnodes\n", d->vnuma.nr_vnodes);
+ for_each_online_node(i)
+ {
+
+ printk(" pnode %d: vnodes: ", i);
+ for(j = 0; j < d->vnuma.nr_vnodes; j++) {
+ if (d->vnuma.vnode_to_pnode[j] == i)
+ printk("%d (%Lu), ", j, (unsigned long long)
+ (d->vnuma.vnuma_memblks[j].end -
+ d->vnuma.vnuma_memblks[j].start)
+ >> 20);
+ }
+ printk("\n");
+ }
+ printk(" Domain vcpu to vnode: ");
+ for(j = 0; j < d->max_vcpus; j++)
+ printk("%d ", d->vnuma.vcpu_to_vnode[j]);
+ printk("\n");
+ }
}
rcu_read_unlock(&domlist_read_lock);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RFC v2 7/7] xen/vNUMA: adds vNUMA to NUMA debug-key
2013-09-13 8:50 [PATCH RFC v2 7/7] xen/vNUMA: adds vNUMA to NUMA debug-key Elena Ufimtseva
@ 2013-09-19 14:38 ` George Dunlap
2013-09-27 17:05 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: George Dunlap @ 2013-09-19 14:38 UTC (permalink / raw)
To: Elena Ufimtseva
Cc: Matt Wilson, Dario Faggioli, Li Yechen, Stefano Stabellini,
xen-devel@lists.xen.org
On Fri, Sep 13, 2013 at 9:50 AM, Elena Ufimtseva <ufimtseva@gmail.com> wrote:
> Prints basic information about vNUMA topology
> for vNUMA enabled domains when issuing debug-key 'u'.
>
> Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
> ---
> xen/arch/x86/numa.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
> index b141877..7980e54 100644
> --- a/xen/arch/x86/numa.c
> +++ b/xen/arch/x86/numa.c
> @@ -347,7 +347,7 @@ EXPORT_SYMBOL(node_data);
> static void dump_numa(unsigned char key)
> {
> s_time_t now = NOW();
> - int i;
> + int i, j;
> struct domain *d;
> struct page_info *page;
> unsigned int page_num_node[MAX_NUMNODES];
> @@ -389,6 +389,27 @@ static void dump_numa(unsigned char key)
>
> for_each_online_node(i)
> printk(" Node %u: %u\n", i, page_num_node[i]);
Blank line
> + if(d->vnuma.nr_vnodes > 0)
> + {
> + printk(" Domain has %d vnodes\n", d->vnuma.nr_vnodes);
Blank line, &c
> + for_each_online_node(i)
> + {
> +
Remove this blank line. :-)
> + printk(" pnode %d: vnodes: ", i);
> + for(j = 0; j < d->vnuma.nr_vnodes; j++) {
> + if (d->vnuma.vnode_to_pnode[j] == i)
> + printk("%d (%Lu), ", j, (unsigned long long)
> + (d->vnuma.vnuma_memblks[j].end -
> + d->vnuma.vnuma_memblks[j].start)
> + >> 20);
I think here it probable makes sense to be more vnuma-centric rather
than pnuma centric: Rather than print the vnodes sorted by pnodes,
just print the vnodes and print the pnode associated with it. That
gets rid of the need for the extra nest of the loop.
Other than that (and the blank lines) it looks good.
-George
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC v2 7/7] xen/vNUMA: adds vNUMA to NUMA debug-key
2013-09-19 14:38 ` George Dunlap
@ 2013-09-27 17:05 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-09-27 17:05 UTC (permalink / raw)
To: George Dunlap
Cc: Stefano Stabellini, Matt Wilson, Dario Faggioli, Li Yechen,
xen-devel@lists.xen.org, Elena Ufimtseva
On Thu, Sep 19, 2013 at 03:38:29PM +0100, George Dunlap wrote:
> On Fri, Sep 13, 2013 at 9:50 AM, Elena Ufimtseva <ufimtseva@gmail.com> wrote:
> > Prints basic information about vNUMA topology
> > for vNUMA enabled domains when issuing debug-key 'u'.
> >
> > Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
> > ---
> > xen/arch/x86/numa.c | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
> > index b141877..7980e54 100644
> > --- a/xen/arch/x86/numa.c
> > +++ b/xen/arch/x86/numa.c
> > @@ -347,7 +347,7 @@ EXPORT_SYMBOL(node_data);
> > static void dump_numa(unsigned char key)
> > {
> > s_time_t now = NOW();
> > - int i;
> > + int i, j;
> > struct domain *d;
> > struct page_info *page;
> > unsigned int page_num_node[MAX_NUMNODES];
> > @@ -389,6 +389,27 @@ static void dump_numa(unsigned char key)
> >
> > for_each_online_node(i)
> > printk(" Node %u: %u\n", i, page_num_node[i]);
>
> Blank line
>
> > + if(d->vnuma.nr_vnodes > 0)
I think you need a space there between the 'if' and '('..
> > + {
> > + printk(" Domain has %d vnodes\n", d->vnuma.nr_vnodes);
>
> Blank line, &c
>
> > + for_each_online_node(i)
> > + {
> > +
>
> Remove this blank line. :-)
>
> > + printk(" pnode %d: vnodes: ", i);
> > + for(j = 0; j < d->vnuma.nr_vnodes; j++) {
> > + if (d->vnuma.vnode_to_pnode[j] == i)
> > + printk("%d (%Lu), ", j, (unsigned long long)
> > + (d->vnuma.vnuma_memblks[j].end -
> > + d->vnuma.vnuma_memblks[j].start)
> > + >> 20);
>
> I think here it probable makes sense to be more vnuma-centric rather
> than pnuma centric: Rather than print the vnodes sorted by pnodes,
> just print the vnodes and print the pnode associated with it. That
> gets rid of the need for the extra nest of the loop.
>
> Other than that (and the blank lines) it looks good.
>
> -George
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-27 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 8:50 [PATCH RFC v2 7/7] xen/vNUMA: adds vNUMA to NUMA debug-key Elena Ufimtseva
2013-09-19 14:38 ` George Dunlap
2013-09-27 17:05 ` Konrad Rzeszutek Wilk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).