Skip to contentSkip to conversation

xen/mm: Improve message in populate physmap when the domain is direct mapped

PATCH In review Julien Grall 3 participants 5 messages Oct 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/mm: Improve message in populate physmap when the domain is direct mapped

The current domain and the domain pointed by the variable "d" are not the same.

However, when it's not possible to get a reference on the page, the target domain ID is not printed. This makes the message difficult to understand.

Improve the message by printing the target domain ID.

---
Cc: Ian Campbell <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Keir Fraser <[email protected]>
Cc: Tim Deegan <[email protected]>

---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/memory.c +1 -1
index f6aed0d..206955f 100644
@@ -141,7 +141,7 @@ static void populate_physmap(struct memop_args *a)
                     {
                         gdprintk(XENLOG_INFO,
                                  "mfn %#"PRI_xen_pfn" doesn't belong to the"
-                                 " domain\n", mfn);
+                                 " domain %d\n", mfn, d->domain_id);
                         goto out;
                     }
                     put_page(page);
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Julien Grall

The current domain and the domain pointed by the variable "d" are not the same.

However, when it's not possible to get a reference on the page, the target domain ID is not printed. This makes the message difficult to understand.

Improve the message by printing the target domain ID.

suggestion as well.

Quoted 15 lines

---
Cc: Ian Campbell <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Keir Fraser <[email protected]>
Cc: Tim Deegan <[email protected]>

---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/memory.c +0 -0
index f6aed0d..206955f 100644

xen/common/memory.c static void populate_physmap(struct memop_args *a) · line 144

Quoted 5 lines
xen/common/memory.c +1 -1
@@ -141,7 +141,7 @@ static void populate_physmap(struct memop_args *a)
                     {
                         gdprintk(XENLOG_INFO,
                                  "mfn %#"PRI_xen_pfn" doesn't belong to the"
-                                 " domain\n", mfn);
+                                 " domain %d\n", mfn, d->domain_id);

This could easily be shortened to "doesn't belong to d%d" which matches our other domain identification.

~Andrew

#2 lore raw

Hi Andrew,

Quoted 25 lines · Andrew Cooper
Quoted 10 lines · Julien Grall

The current domain and the domain pointed by the variable "d" are not the same.

However, when it's not possible to get a reference on the page, the target domain ID is not printed. This makes the message difficult to understand.

Improve the message by printing the target domain ID.

suggestion as well.

Quoted 10 lines

---
Cc: Ian Campbell <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Keir Fraser <[email protected]>
Cc: Tim Deegan <[email protected]>

---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

xen/common/memory.c static void populate_physmap(struct memop_args *a) · line 144

Quoted 10 lines
xen/common/memory.c +1 -1
index f6aed0d..206955f 100644
@@ -141,7 +141,7 @@ static void populate_physmap(struct memop_args *a)
                     {
                         gdprintk(XENLOG_INFO,
                                  "mfn %#"PRI_xen_pfn" doesn't belong to the"
-                                 " domain\n", mfn);
+                                 " domain %d\n", mfn, d->domain_id);

This could easily be shortened to "doesn't belong to d%d" which matches our other domain identification.

I also just noticed that the message is split between 2 lines. IIRC, we are trying to avoid that to allow grep working.

I will resend this patch with:

gprintk(XENLOG_INFO,

	"mfn %#"PRI_xen_pfn" doesn't belong to d%d\n",
	mfn, d->domain_id).

Can I keep your reviewed-by with that change?

Regards,

Signature · 1 line
Julien Grall
#3 lore raw
Quoted 41 lines · Julien Grall

Hi Andrew,

Quoted 23 lines · Andrew Cooper
Quoted 10 lines · Julien Grall

The current domain and the domain pointed by the variable "d" are not the same.

However, when it's not possible to get a reference on the page, the target domain ID is not printed. This makes the message difficult to understand.

Improve the message by printing the target domain ID.

suggestion as well.

Quoted 9 lines

---
Cc: Ian Campbell <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Keir Fraser <[email protected]>
Cc: Tim Deegan <[email protected]>

---
 xen/common/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

xen/common/memory.c static void populate_physmap(struct memop_args *a) · line 144

Quoted 10 lines
xen/common/memory.c +1 -1
index f6aed0d..206955f 100644
@@ -141,7 +141,7 @@ static void populate_physmap(struct memop_args *a)
                     {
                         gdprintk(XENLOG_INFO,
                                  "mfn %#"PRI_xen_pfn" doesn't belong to the"
-                                 " domain\n", mfn);
+                                 " domain %d\n", mfn, d->domain_id);

This could easily be shortened to "doesn't belong to d%d" which matches our other domain identification.

I also just noticed that the message is split between 2 lines. IIRC, we are trying to avoid that to allow grep working.

Quoted 7 lines

I will resend this patch with:

gprintk(XENLOG_INFO,

	"mfn %#"PRI_xen_pfn" doesn't belong to d%d\n",
	mfn, d->domain_id).

Can I keep your reviewed-by with that change?

Certainly.

~Andrew

#4 lore raw
In reply to Julien Grall
Quoted 18 lines
Quoted 1 line
Quoted 1 line · On 27.10.15 at 12:49, <[email protected]> wrote:
Quoted 12 lines · Andrew Cooper

xen/common/memory.c static void populate_physmap(struct memop_args *a) · line 144

Quoted 8 lines · Julien Grall
xen/common/memory.c +1 -1
@@ -141,7 +141,7 @@ static void populate_physmap(struct memop_args *a)
                     {
                         gdprintk(XENLOG_INFO,
                                  "mfn %#"PRI_xen_pfn" doesn't belong to the"
-                                 " domain\n", mfn);
+                                 " domain %d\n", mfn, d->domain_id);

This could easily be shortened to "doesn't belong to d%d" which matches our other domain identification.

I also just noticed that the message is split between 2 lines. IIRC, we are trying to avoid that to allow grep working.

Quoted 7 lines

I will resend this patch with:

gprintk(XENLOG_INFO,

	"mfn %#"PRI_xen_pfn" doesn't belong to d%d\n",
	mfn, d->domain_id).

Can I keep your reviewed-by with that change?

And no need to resend, btw.

Jan