[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] additional domain.c memory allocation causes "xm create" to fail


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: misiu godfrey <godfrey@xxxxxxxxxxxxx>
  • Date: Tue, 4 Sep 2012 14:22:07 -0400
  • Delivery-date: Tue, 04 Sep 2012 18:22:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hello Xen Developers,

I am currently attempting an experiment to modify Xen in such a way that it will flush the L2 cache every time it performs a context switch.  Thus far I have implemented my code inside the __context_switch() function, of domain.c (xen/arch/x86/domain.c), and while my modifications work fine for memory allocations of up to 512KB, it fails whenever I increase this to 1MB.

Specifically, when the memory buffer is increased to 1MB, the machine will force a hard reset whenever xm tries to create a new domain.  When I try to create a new domain (a sparse squeeze install, Dom0 is running Ubuntu 12.04) it gets as far as completing the scripts/init-bottom call before it crashes, which makes me think it is going down during the following init call.

I have narrowed down the section of code that is failing.  The curious thing is that the failure threshold seems to be dependent on the number of iterations in the loop, rather than the specific amount of memory (i.e. 1MB of memory will work when 'i' is incremented by 128 rather than 64, whereas 512KB of memory will work when 'i' is 64):

  cache_mem_size = 1048576;  // Size of L2 cache
  cache_mem = xmalloc_array(char,cache_mem_size);

  for (i=0;i<cache_mem_size;i+=64)
    cache_mem[i] += 1;

  xfree(cache_mem);

If anyone has a suggestion as to what may be causing this failure, or insight into the runtime limitations of this section of the architecture, kernel, or scheduler, I would appreciate the information.

Thanks,

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.