Skip to contentSkip to conversation

Memory fragmentation, order>0 allocation, and 4.0 dynamic RAM optimization features

DISCUSSION Jan Beulich 4 participants 8 messages Feb 18, 2010 – Feb 19, 2010

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines
Quoted 1 line
Quoted 1 line

Dan Magenheimer <[email protected]> 08.02.10 19:13 >>>

Are there other known order>0 allocations that might result in similar issues?

Interestingly, tmem itself indirectly causes order-1 allocations (through the use of xmem_pool_create(), sizeof(struct xmem_pool) = 0x18d0 on a non-debug build).

Jan

#1 lore raw
Quoted 9 lines

From: Jan Beulich [mailto:[email protected]]

Quoted 3 lines
Quoted 1 line
Quoted 1 line

Dan Magenheimer <[email protected]> 08.02.10 19:13 >>>

Are there other known order>0 allocations that might result in similar issues?

Interestingly, tmem itself indirectly causes order-1 allocations (through
the use of xmem_pool_create(), sizeof(struct xmem_pool) = 0x18d0 on a non-debug build).

Well that's embarrassing :-}

But to be fair:
1) tmem is just using xen infrastructure code that suffers from the same pervasive problem (though admittedly I added the interface to xmalloc_tlsf to enable additional xmem pools to be created)
2) tmem fails semi-gracefully by just turning itself off for a domain that fails this order-1 allocation (though it really need only disable persistent pools, not all tmem pools)

But ignoring my flimsy excuses, Jan, do you have some debug code you are using to identify order>0 allocations? If so, could I have a copy... and perhaps Keir would consider adding it post-4.0 to make it easier to search-and-destroy.

#2 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Dan Magenheimer <[email protected]> 18.02.10 17:09 >>>

But ignoring my flimsy excuses, Jan, do you have some debug code you are using to identify order>0 allocations? If so, could I have a copy... and perhaps Keir would consider adding it post-4.0 to make it easier to search-and-destroy.

I actually noticed this only as a side effect from a much uglier debugging patch - observing apparent memory corruption with no apparent pattern during save/restore/migrate, I finally decided to try a brute force method and track all allocations. Since you are so eager to point out and fix all order > 0 allocations, I was quite surprised to see one while tmem itself initialized its state for Dom0. Hence I thought I'd point it out. The patch as it stands is, I think, not really a general debugging aid - if you think differently, I can of course still share it.

Jan

#3 lore raw
Quoted 1 line

Since you are so eager to point out and fix all order > 0 allocations

"eager" is a rather poor word choice :-)

Quoted 31 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: Thursday, February 18, 2010 9:19 AM
To: Dan Magenheimer
Cc: Grzegorz Milos; Tim Deegan; PatrickColp; Andrew Peace; GeorgeDunlap; Ian Pratt; Keir Fraser; [email protected]
Subject: RE: Memory fragmentation, order>0 allocation, and 4.0 dynamic RAM optimization features

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Dan Magenheimer <[email protected]> 18.02.10 17:09 >>>

But ignoring my flimsy excuses, Jan, do you have some debug code you are using to identify order>0 allocations? If so, could I have a copy... and perhaps Keir would consider adding it post-4.0 to make it easier to search-and-destroy.

I actually noticed this only as a side effect from a much uglier debugging
patch - observing apparent memory corruption with no apparent pattern during save/restore/migrate, I finally decided to try a brute force method
and track all allocations. Since you are so eager to point out and fix all
order > 0 allocations, I was quite surprised to see one while tmem itself initialized its state for Dom0. Hence I thought I'd point it out. The
patch as it stands is, I think, not really a general debugging aid - if you
think differently, I can of course still share it.

Jan

#5 lore raw

RE: xe pool_reject support on XCP

Hi,

The XenAPI call pool.eject(host) can be used to remove a host from a pool.

http://www.xen.org/files/XenCloud/ocamldoc/apidoc.html?c=pool

"Instruct a pool master to eject a host from the pool"

The xe command should also work.

Cheers,
Dave

From: Chonduy Nguyen [mailto:[email protected]]
Sent: 18 February 2010 20:47
To: [email protected]
Cc: Dave Scott; Stephen Spector
Subject: xe pool_reject support on XCP

Hello,

Can I use XenAPI to do remove host from resource pool for XCP?

if there is no XenAPI - can I use xe command to do

xe pool-eject host-uuid=uuid ? on XCP env

Thanks,

Thuymai

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw

Re: XCP event tracking

Hi,

May I ask what kind of event that I can resgiter for XCP? - or any info regarding to this feature:

Event Tracking: progress and notification.

can i register event for DOM_CRASH ?

I looked at the below link:

http://www.xen.org/files/XenCloud/ocamldoc/apidoc.html?c=event

May you point to example code?

Thanks

Thuymai

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel