xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Linux 4.1 reports wrong number of pages to toolstack
@ 2015-09-04  0:40 Wei Liu
  2015-09-04  3:38 ` Juergen Gross
  2015-09-04  8:53 ` Ian Campbell
  0 siblings, 2 replies; 15+ messages in thread
From: Wei Liu @ 2015-09-04  0:40 UTC (permalink / raw)
  To: xen-devel, David Vrabel, Juergen Gross
  Cc: Ian Jackson, wei.liu2, Ian Campbell, Andrew Cooper

Hi David

This issue is exposed by the introduction of migration v2. The symptom is that
a guest with 32 bit 4.1 kernel can't be restored because it's asking for too
many pages.

Note that all guests have 512MB memory, which means they have 131072 pages.

Both 3.14 tests [2] [3] get the correct number of pages.  Like:

   xc: detail: max_pfn 0x1ffff, p2m_frames 256
   ...
   xc: detail: Memory: 2048/131072    1%
   ...

However in both 4.1 [0] [1] the number of pages are quite wrong.

4.1 32 bit:

   xc: detail: max_pfn 0xfffff, p2m_frames 1024
   ...
   xc: detail: Memory: 11264/1048576    1%
   ...

It thinks it has 4096MB memory.

4.1 64 bit:

   xc: detail: max_pfn 0x3ffff, p2m_frames 512
   ...
   xc: detail: Memory: 3072/262144    1%
   ...

It thinks it has 1024MB memory.

The total number of pages is determined in libxc by calling
xc_domain_nr_gpfns, which yanks shared_info->arch.max_pfn from
hypervisor. And that value is clearly touched by Linux in some way.

I now think this is a bug in Linux kernel. The biggest suspect is the
introduction of linear P2M.  If you think this is a bug in toolstack,
please let me know.

I don't know why 4.1 64 bit [0] can still be successfully restored. I
don't have handy setup to experiment. The restore path doesn't show
enough information to tell anything. The thing I worry about is that
migration v2 somehow make the guest bigger than it should be. But that's
another topic.


Wei.

[0] 4.1 kernel 64 bit save restore:
http://logs.test-lab.xenproject.org/osstest/logs/60785/test-amd64-amd64-xl/16.ts-guest-saverestore.log

[1] 4.1 kernel 32 bit save restore:
http://logs.test-lab.xenproject.org/osstest/logs/60785/test-amd64-i386-xl/14.ts-guest-saverestore.log

[2] 3.14 kernel 64 bit save restore:
http://logs.test-lab.xenproject.org/osstest/logs/61263/test-amd64-amd64-xl/16.ts-guest-saverestore.log

[3] 3.14 kernel 32 bit save restore:
http://logs.test-lab.xenproject.org/osstest/logs/61263/test-amd64-i386-xl/16.ts-guest-saverestore.log

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

end of thread, other threads:[~2015-09-07  7:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04  0:40 Linux 4.1 reports wrong number of pages to toolstack Wei Liu
2015-09-04  3:38 ` Juergen Gross
2015-09-04  8:28   ` Jan Beulich
2015-09-04  9:35     ` Andrew Cooper
2015-09-04 11:35       ` Wei Liu
2015-09-04 18:39         ` Andrew Cooper
2015-09-04 19:46           ` Wei Liu
2015-09-04 20:32             ` Andrew Cooper
2015-09-04 11:40     ` Wei Liu
2015-09-04  8:53 ` Ian Campbell
2015-09-04  9:28   ` Ian Campbell
2015-09-04 14:42   ` David Vrabel
2015-09-04 14:53     ` Wei Liu
2015-09-04 14:58       ` David Vrabel
2015-09-07  7:09   ` Jan Beulich

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