WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Bug in xmalloc_bytes()

To: "Byrne, John (HP Labs)" <john.l.byrne@xxxxxx>
Subject: [Xen-devel] Re: [PATCH] Bug in xmalloc_bytes()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 21 Oct 2009 09:25:04 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 21 Oct 2009 01:27:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <469F2699A483D44BA6D2B311B1089D3A66B4BCC5FD@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpMbiGTpsosXvUZTBKfKN0tNBAdJAFgbqeQAA4IRsM=
Thread-topic: [PATCH] Bug in xmalloc_bytes()
User-agent: Microsoft-Entourage/12.20.0.090605
Thanks, I've applied a different fix as xen-unstable:20349

 -- Keir

On 21/10/2009 02:49, "Byrne, John (HP Labs)" <john.l.byrne@xxxxxx> wrote:

> Keir,
> 
> Dan Magenheimer said I should forward this on to you, last week, as he was
> out. I meant to do some further testing against the top of xen-unstable, but
> something came up and I can't deal with this, further, right now. I'm sending
> my patch, as-is, so people can be aware of the bug.
> 
> John Byrne
>  
> 
> -----Original Message-----
> From: Byrne, John (HP Labs)
> Sent: Tuesday, October 13, 2009 6:32 PM
> To: 'dan.magenheimer@xxxxxxxxxx'
> Subject: Bug in xmalloc_bytes()
> 
> Dan,
> 
> Since you ported the xmalloc_tlsf code, I thought I'd talk to you first.
> 
> With the various roundings, xmalloc_bytes() fails consistently with requests
> of 3921 to 3952 bytes.
> 
> 3921 + 128 (SMP_CACHE_BYTES)- 16 (MEM_ALIGN) = 4033 in _xmalloc(); then
> MAPPING_SEARCH() rounds the size up to 4096, at which point you fail the "if (
> size > (pool->grow_size - 2 * BHDR_OVERHEAD) )" test in xmem_pool_alloc().
> 
> Attached is the patch I came up with. I've tested it against:
> 
> changeset:   19105:696351cde9a4
> user:        Keir Fraser <keir.fraser@xxxxxxxxxx>
> date:        Wed Jan 28 16:58:41 2009 +0000
> summary:     Allow memflags to be specified to alloc_xenheap_pages().
> 
> Not the latest stuff with the tmem hooks, but I don't think they will affect
> anything.
> 
> Feel free to test, fold, spindle, or mutilate it and/or send it on to Keir.
> 
> John
> 
> 
> 
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>