[Devel] Re: [PATCH RFC] Send checkpoint and restart debug info to a log file (v2)

Serge E. Hallyn serue at us.ibm.com
Thu Oct 22 11:25:35 PDT 2009


Quoting Oren Laadan (orenl at librato.com):
...
> > More practically, requiring userspace to pass over a flag
> > consisting of CKPT_DBG_MEM|CKPT_DBG|FILE|CKPT_DBG|TASK, and
> > handle corresponding usage flags, is not nice.
> 
> I agree with you on about this. Maybe we want a better
> interface ?

I'm looking at tracehooks right now.  So the way it would work is:

1. Error messages using ckpt_error() are always compiled in, are
sent to ctx->logfile if that exists, and are sent to syslog if
CONFIG_CHECKPOINT_DEBUG (or some sysctl is set).

2. Debug messages could be tracehooks which can be enabled per
subsystem as above - for mem, file, task, etc - using code we add
under linux-cr/samples/.  It would basically do:

	  ret = register_trace_ckpt_mem(ckpt_trace_mem, ckpt_logprobe);
	  ret = register_trace_ckpt_task(ckpt_trace_mem, ckpt_logprobe);

where ckpt_logprobe does the printing of info to ctx->logfile and
syslog.

Or,

at first of course we can just let CONFIG_CHECKPOINT_DEBUG determine
the printing of ckpt_debugs() as we do now.

I'm going to start slowly, first defining the ckpt_error() helpers
and introducing/converting some callers.

-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list