Quoting Oren Laadan (or...@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
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel

Reply via email to