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@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-May-23 07:22 UTC
Re: [Xen-devel] [PATCH]Fix Trace Buffer Allocation Error
On 23 May 2006, at 05:52, Atsushi SAKAI wrote:> This is a Patch for Trace Buffer allocation Error.No patch attached. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Atsushi SAKAI
2006-May-24 11:37 UTC
Re: [Xen-devel][RESEND] [PATCH]Fix Trace Buffer Allocation Error
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@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel