From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH v2] x86: make dump_pageframe_info() slightly more verbose for dying domains
Date: Wed, 24 Sep 2014 16:34:47 +0100 [thread overview]
Message-ID: <5422E497.3070605@citrix.com> (raw)
In-Reply-To: <5422FEA60200007800038690@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1831 bytes --]
On 24/09/14 16:25, Jan Beulich wrote:
> Allowing more than just 10 pages to be printed in this case gives a
> better chance to fully understand eventual page reference leaks: Report
> up to 16 "normal" (writable or untyped) pages, and an unlimited number
> of special type (page or descriptor table) ones.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> v2: Use MASK_EXTR() and extend description.
>
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -151,15 +151,29 @@ void dump_pageframe_info(struct domain *
>
> printk("Memory pages belonging to domain %u:\n", d->domain_id);
>
> - if ( d->tot_pages >= 10 )
> + if ( d->tot_pages >= 10 && d->is_dying < DOMDYING_dead )
> {
> printk(" DomPage list too long to display\n");
> }
> else
> {
> + unsigned long total[MASK_EXTR(PGT_type_mask, PGT_type_mask) + 1] = {};
> +
> spin_lock(&d->page_alloc_lock);
> page_list_for_each ( page, &d->page_list )
> {
> + unsigned int index = MASK_EXTR(page->u.inuse.type_info,
> + PGT_type_mask);
> +
> + if ( ++total[index] > 16 )
> + {
> + switch ( page->u.inuse.type_info & PGT_type_mask )
> + {
> + case PGT_none:
> + case PGT_writable_page:
> + continue;
> + }
> + }
> printk(" DomPage %p: caf=%08lx, taf=%" PRtype_info "\n",
> _p(page_to_mfn(page)),
> page->count_info, page->u.inuse.type_info);
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2733 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2014-09-24 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 15:25 [PATCH v2] x86: make dump_pageframe_info() slightly more verbose for dying domains Jan Beulich
2014-09-24 15:34 ` Andrew Cooper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5422E497.3070605@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).