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

xen-devel

[Top] [All Lists]

Re: [Xen-devel][RESEND] [PATCH]Fix Trace Buffer Allocation Error

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel][RESEND] [PATCH]Fix Trace Buffer Allocation Error
From: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
Date: 2006年5月24日 20:37:41 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2006年5月24日 04:38:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: (Your message of "2006年5月23日 08:22:37 +0100") <027789d79902d5bdc23cea74b4628e4e@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200605230452.k4N4qq1U032431@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <027789d79902d5bdc23cea74b4628e4e@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
A patch added (Resend).
Sorry for forgetting the patch.
>On 23 May 2006, at 05:52, Atsushi SAKAI wrote:
>
>> This is a Patch for Trace Buffer allocation Error.
>
>No patch attached.
>
> -- Keir
>
>
This is a body of previous mail.
Thanks, 
Atsushi Sakai
=======================
Hi, All.
 This is a Patch for Trace Buffer allocation Error.
Currently, Trace Buffer Management uses two variables
(opt_tbuf_size & tb_init_done)
Variable "opt_tbuf_size" is setting a tbuf_size and keeps the tbuf_size.
Variable "tb_init_done" is a flag to do trace buffer process.
This flag is set by tb_control() DOM0_TBUF_ENABLE with the condition of 
opt_tbuf_size > 0.
The trace buffer(tbuf_size) is allocated by is alloc_trace_bufs().
This function used by two functions(tb_set_size() and init_trace_bufs())
In tb_set_size(), the alloc_trace_bufs() failure is cared collectly by setting 
opt_tbuf_size=0.
But in init_trace_bufs(), the alloc_trace_bufs() failure is not cared collectry
(KEEP opt_tbuf_size = n ).
(init_trace_bufs() calls at x86/setup.c & ia64/xensetup.c)
This problem occured in following steps.
1)tbuf_size = n in xen boot option
2)tbuf_size is too large and memory allocation fails.
3)tbctl 1(TraceBuffer Enable tb_init_done set to 1.)
 (because opt_tbuf_size keeps n)
 (tbctl calls tb_control DOM0_TBUF_ENABLE)
 Current xen-unstable(CS10068), tbctl function is moved to get_tbuf(in 
xentrace & xenbaked)
 So 3) and 4) are occured at once.
 But Current xen-ia64-unstable(CS10029) still remain tbctl.
4)tracebuffer collection process start working
 (But trace buffer is not allocated)
5)tracebuffer collection process halted
 because no trace buffers,
To avoid this problem I changed the location of error collection code
opt_tbuf_size = 0;
from tb_set_size() to alloc_trace_bufs().
Because 1)allocation error is occured in alloc_trace_bufs() 
and 2)init_trace_bufs() mis-allocation is also cared.
Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>

Attachment: tb_alloc.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [PATCH] [XM-TEST] block device write verify test 2nd attempt , Harry Butterworth
Next by Date: Re: [Xen-devel] x86 string/memory inline functions , Jan Beulich
Previous by Thread: Re: [Xen-devel] [PATCH]Fix Trace Buffer Allocation Error , Keir Fraser
Next by Thread: [Xen-devel] [PATCH]Fix Trace Buffer Allocation Error , Atsushi SAKAI
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /