All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: pvh dom0: memory leak from iomem map
Date: Thu, 5 Jun 2014 19:04:47 -0700	[thread overview]
Message-ID: <20140605190447.77ee2af7@mantra.us.oracle.com> (raw)
In-Reply-To: <539043D2.7050806@citrix.com>

On Thu, 5 Jun 2014 12:17:54 +0200
Roger Pau Monné <roger.pau@citrix.com> wrote:

> On 05/06/14 01:32, Mukesh Rathor wrote:
> > On Wed, 04 Jun 2014 08:33:59 +0100
> > "Jan Beulich" <JBeulich@suse.com> wrote:
> > 
> >>>>> On 04.06.14 at 03:29, <mukesh.rathor@oracle.com> wrote:
> >>> Hi Tim,
> >>>
> >>> When building a dom0 pvh, we populate the p2m with 0..N pfns
> >>> upfront. Then in pvh_map_all_iomem, we walk the e820 and map all
> >>> iomem 1:1. As such any iomem range below N would cause those ram
> >>> frames to be silently dropped. 
> >>>
> >>> Since the holes could be pretty big, I am concenred this could
> >>> result in significant loss of frames. 
> >>>
> >>> In my very early patches I had:
> >>>
> >>> set_typed_p2m_entry():
> >>> ...
.....
> 
> I'm quite sure I'm missing something here, but I don't see were those 
> pages are removed from the domheap page list (d->page_list). In fact 
> I've created a small debug patch to show that the pages removed by
> the MMIO holes are still in the domheap list:

Ah, I see, you are reusing the pages by snooping into the M2P... 

            if ( get_gpfn_from_mfn(mfn) != INVALID_M2P_ENTRY )
                continue;

I guess that works since the M2P gets invalidated in set_mmio_p2m_entry,
and I think it's guaranteed that INVALID_M2P_ENTRY frame is always free
to be used. 

Ok, we are fine then.

thanks Roger,
Mukesh


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

  parent reply	other threads:[~2014-06-06  2:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04  1:29 pvh dom0: memory leak from iomem map Mukesh Rathor
2014-06-04  7:33 ` Jan Beulich
2014-06-04 23:32   ` Mukesh Rathor
2014-06-05  6:33     ` Jan Beulich
2014-06-05 10:17     ` Roger Pau Monné
2014-06-05 10:29       ` Jan Beulich
2014-06-06  2:04       ` Mukesh Rathor [this message]
2014-06-05  9:20 ` Tim Deegan
2014-06-06  2:12   ` Mukesh Rathor
2014-06-06  9:53     ` Tim Deegan
2014-06-06 19:36       ` Mukesh Rathor

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=20140605190447.77ee2af7@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --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.