All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Tim Deegan <tim@xen.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/mm: print domain IDs instead of pointers
Date: Fri, 5 Jun 2015 11:53:31 +0100	[thread overview]
Message-ID: <55717FAB.20309@citrix.com> (raw)
In-Reply-To: <557195AE02000078000813DC@mail.emea.novell.com>

On 05/06/15 11:27, Jan Beulich wrote:
> Printing pointers to struct domain isn't really useful for initial
> problem analysis. In get_page() also drop the page only after issuing
> the log message, so that at the time of printing the state can be
> considered reasonably consistent.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

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

There are a few areas of code which seem overzealous with printing Xen
pointers.

> ---
> It also slightly concerns me that page_get_owner_and_reference() can
> (at least theoretically) return NULL even after having taken a page
> reference (when ->v.inuse._domain is clear), in which case that
> reference would never get dropped again. One case where this might be a
> problem is sh_set_allocation(), which - other than all other uses of
> page_set_owner(, NULL) - doesn't zap the refcount.

Looks as if page_get_owner_and_reference() should drop the ref itself if
->v.inuse._domain is clear.

Alternatively, the implication is that page_get_owner_and_reference() is
called on a page with a real owner, which might justify an ASSERT/BUG.

A different area which concerns me is __acquire_grant_for_copy() which
ignores the return value.  The caller of __acquire_grant_for_copy() cant
actually be certain that a ref was taken on the page, based on a return
value of GNTST_okay.

~Andrew

  reply	other threads:[~2015-06-05 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 10:27 [PATCH] x86/mm: print domain IDs instead of pointers Jan Beulich
2015-06-05 10:53 ` Andrew Cooper [this message]
2015-06-05 12:55   ` Jan Beulich

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=55717FAB.20309@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.