xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
@ 2017-05-04  9:09 Jan Beulich
  2017-05-04  9:39 ` Andrew Cooper
  2017-05-08 15:00 ` George Dunlap
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Beulich @ 2017-05-04  9:09 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Andrew Cooper, Julien Grall

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

See the code comment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -480,6 +480,22 @@ struct page_info *get_page_from_gfn_p2m(
     p2m_access_t _a;
     p2m_type_t _t;
     mfn_t mfn;
+#ifndef NDEBUG
+    /*
+     * Temporary debugging code, added in the hope of finding the origin
+     * of calls to get_page(..., dom_cow) as observed during osstest
+     * migration failures (see
+     * lists.xenproject.org/archives/html/xen-devel/2017-04/msg03331.html).
+     */
+    static unsigned long cnt, thr;
+
+    if ( d->is_dying && ++cnt > thr )
+    {
+        thr |= cnt;
+        printk("%pv: d%d dying (looking up %lx)\n", current, d->domain_id, gfn);
+        dump_execution_state();
+    }
+#endif
 
     /* Allow t or a to be NULL */
     t = t ?: &_t;




[-- Attachment #2: x86-mm-gpfgp-dying-debug.patch --]
[-- Type: text/plain, Size: 920 bytes --]

x86/mm: add temporary debugging code to get_page_from_gfn_p2m()

See the code comment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -480,6 +480,22 @@ struct page_info *get_page_from_gfn_p2m(
     p2m_access_t _a;
     p2m_type_t _t;
     mfn_t mfn;
+#ifndef NDEBUG
+    /*
+     * Temporary debugging code, added in the hope of finding the origin
+     * of calls to get_page(..., dom_cow) as observed during osstest
+     * migration failures (see
+     * lists.xenproject.org/archives/html/xen-devel/2017-04/msg03331.html).
+     */
+    static unsigned long cnt, thr;
+
+    if ( d->is_dying && ++cnt > thr )
+    {
+        thr |= cnt;
+        printk("%pv: d%d dying (looking up %lx)\n", current, d->domain_id, gfn);
+        dump_execution_state();
+    }
+#endif
 
     /* Allow t or a to be NULL */
     t = t ?: &_t;

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
  2017-05-04  9:09 [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m() Jan Beulich
@ 2017-05-04  9:39 ` Andrew Cooper
  2017-05-04  9:42   ` Julien Grall
  2017-05-08 15:00 ` George Dunlap
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cooper @ 2017-05-04  9:39 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: George Dunlap, Julien Grall

On 04/05/17 10:09, Jan Beulich wrote:
> See the code comment.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -480,6 +480,22 @@ struct page_info *get_page_from_gfn_p2m(
>      p2m_access_t _a;
>      p2m_type_t _t;
>      mfn_t mfn;
> +#ifndef NDEBUG
> +    /*
> +     * Temporary debugging code, added in the hope of finding the origin
> +     * of calls to get_page(..., dom_cow) as observed during osstest
> +     * migration failures (see
> +     * lists.xenproject.org/archives/html/xen-devel/2017-04/msg03331.html).
> +     */
> +    static unsigned long cnt, thr;
> +
> +    if ( d->is_dying && ++cnt > thr )
> +    {
> +        thr |= cnt;
> +        printk("%pv: d%d dying (looking up %lx)\n", current, d->domain_id, gfn);
> +        dump_execution_state();
> +    }
> +#endif
>  
>      /* Allow t or a to be NULL */
>      t = t ?: &_t;
>
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
  2017-05-04  9:39 ` Andrew Cooper
@ 2017-05-04  9:42   ` Julien Grall
  2017-05-04 12:07     ` Jan Beulich
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Grall @ 2017-05-04  9:42 UTC (permalink / raw)
  To: Andrew Cooper, Jan Beulich, xen-devel; +Cc: George Dunlap

Hi,

On 04/05/17 10:39, Andrew Cooper wrote:
> On 04/05/17 10:09, Jan Beulich wrote:
>> See the code comment.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Release-acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

>
>>
>> --- a/xen/arch/x86/mm/p2m.c
>> +++ b/xen/arch/x86/mm/p2m.c
>> @@ -480,6 +480,22 @@ struct page_info *get_page_from_gfn_p2m(
>>      p2m_access_t _a;
>>      p2m_type_t _t;
>>      mfn_t mfn;
>> +#ifndef NDEBUG
>> +    /*
>> +     * Temporary debugging code, added in the hope of finding the origin
>> +     * of calls to get_page(..., dom_cow) as observed during osstest
>> +     * migration failures (see
>> +     * lists.xenproject.org/archives/html/xen-devel/2017-04/msg03331.html).
>> +     */
>> +    static unsigned long cnt, thr;
>> +
>> +    if ( d->is_dying && ++cnt > thr )
>> +    {
>> +        thr |= cnt;
>> +        printk("%pv: d%d dying (looking up %lx)\n", current, d->domain_id, gfn);
>> +        dump_execution_state();
>> +    }
>> +#endif
>>
>>      /* Allow t or a to be NULL */
>>      t = t ?: &_t;
>>
>>
>>
>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
  2017-05-04  9:42   ` Julien Grall
@ 2017-05-04 12:07     ` Jan Beulich
  2017-05-04 12:49       ` Julien Grall
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2017-05-04 12:07 UTC (permalink / raw)
  To: Julien Grall; +Cc: George Dunlap, Andrew Cooper, xen-devel

>>> On 04.05.17 at 11:42, <julien.grall@arm.com> wrote:
> On 04/05/17 10:39, Andrew Cooper wrote:
>> On 04/05/17 10:09, Jan Beulich wrote:
>>> See the code comment.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> Release-acked-by: Julien Grall <julien.grall@arm.com>

Thanks, but what about the patch this one is the follow-up to
("x86/mm: silence a pointless warning")?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
  2017-05-04 12:07     ` Jan Beulich
@ 2017-05-04 12:49       ` Julien Grall
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2017-05-04 12:49 UTC (permalink / raw)
  To: Jan Beulich; +Cc: George Dunlap, Andrew Cooper, xen-devel

Hi Jan,

On 04/05/17 13:07, Jan Beulich wrote:
>>>> On 04.05.17 at 11:42, <julien.grall@arm.com> wrote:
>> On 04/05/17 10:39, Andrew Cooper wrote:
>>> On 04/05/17 10:09, Jan Beulich wrote:
>>>> See the code comment.
>>>>
>>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>
>> Release-acked-by: Julien Grall <julien.grall@arm.com>
>
> Thanks, but what about the patch this one is the follow-up to
> ("x86/mm: silence a pointless warning")?

Sorry I missed that one:

Release-acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()
  2017-05-04  9:09 [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m() Jan Beulich
  2017-05-04  9:39 ` Andrew Cooper
@ 2017-05-08 15:00 ` George Dunlap
  1 sibling, 0 replies; 6+ messages in thread
From: George Dunlap @ 2017-05-08 15:00 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: George Dunlap, Andrew Cooper, Julien Grall

On 04/05/17 10:09, Jan Beulich wrote:
> See the code comment.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

> 
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -480,6 +480,22 @@ struct page_info *get_page_from_gfn_p2m(
>      p2m_access_t _a;
>      p2m_type_t _t;
>      mfn_t mfn;
> +#ifndef NDEBUG
> +    /*
> +     * Temporary debugging code, added in the hope of finding the origin
> +     * of calls to get_page(..., dom_cow) as observed during osstest
> +     * migration failures (see
> +     * lists.xenproject.org/archives/html/xen-devel/2017-04/msg03331.html).
> +     */
> +    static unsigned long cnt, thr;
> +
> +    if ( d->is_dying && ++cnt > thr )
> +    {
> +        thr |= cnt;
> +        printk("%pv: d%d dying (looking up %lx)\n", current, d->domain_id, gfn);
> +        dump_execution_state();
> +    }
> +#endif
>  
>      /* Allow t or a to be NULL */
>      t = t ?: &_t;
> 
> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-08 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04  9:09 [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m() Jan Beulich
2017-05-04  9:39 ` Andrew Cooper
2017-05-04  9:42   ` Julien Grall
2017-05-04 12:07     ` Jan Beulich
2017-05-04 12:49       ` Julien Grall
2017-05-08 15:00 ` George Dunlap

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).