All of lore.kernel.org
 help / color / mirror / Atom feed
* additional domain.c memory allocation causes "xm create" to fail
@ 2012-09-04 18:22 misiu godfrey
  2012-09-04 18:32 ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: misiu godfrey @ 2012-09-04 18:22 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1513 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1788 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

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

end of thread, other threads:[~2012-09-04 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 18:22 additional domain.c memory allocation causes "xm create" to fail misiu godfrey
2012-09-04 18:32 ` Andrew Cooper
2012-09-04 19:45   ` misiu godfrey
2012-09-04 20:11     ` Andrew Cooper
2012-09-04 20:53       ` misiu godfrey

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.