[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 4/5] xen: add per-cpu buffer option to debugtrace



On 09.09.2019 09:35, Juergen Gross wrote:
> debugtrace is normally writing trace entries into a single trace
> buffer. There are cases where this is not optimal, e.g. when hunting
> a bug which requires writing lots of trace entries and one cpu is
> stuck. This will result in other cpus filling the trace buffer and
> finally overwriting the interesting trace entries of the hanging cpu.
> 
> In order to be able to debug such situations add the capability to use
> per-cpu trace buffers. This can be selected by specifying the
> debugtrace boot parameter with the modifier "cpu:", like:
> 
>   debugtrace=cpu:16
> 
> At the same time switch the parsing function to accept size modifiers
> (e.g. 4M or 1G).
> 
> Printing out the trace entries is done for each buffer in order to
> minimize the effort needed during printing. As each entry is prefixed
> with its sequence number sorting the entries can easily be done when
> analyzing them.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
perhaps with ...

> @@ -23,35 +24,79 @@ struct debugtrace_data {
>  };
>  
>  static struct debugtrace_data *dt_data;
> +static DEFINE_PER_CPU(struct debugtrace_data *, dt_cpu_data);
>  
> -static unsigned int debugtrace_kilobytes = 128;
> -static unsigned long debugtrace_bytes;
> +static unsigned long debugtrace_bytes = 128 << 10;
> +static bool debugtrace_per_cpu;

... two more __read_mostly used here (which could again be done
while committing if you agree).

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.