From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [RFC PATCH 11/17] define function to print error messages to user log
Date: Wed, 28 Oct 2009 20:44:40 -0400 [thread overview]
Message-ID: <4AE8E578.4030300@librato.com> (raw)
In-Reply-To: <20091029001223.GA1463-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org):
>>
>> Serge E. Hallyn wrote:
>>> Quoting Oren Laadan (orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org):
>>>> Serge E. Hallyn wrote:
>>>>> Quoting Matt Helsley (matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
>>>>>>> @@ -401,6 +409,9 @@ char *ckpt_generate_fmt(struct ckpt_ctx *ctx, char *fmt)
>>>>>>> case 'E':
>>>>>>> len += sprintf(format+len, "[%s]", "err %d");
>>>>>>> break;
>>>>>>> + case 'C': /* count of bytes read/written to checkpoint image */
>>>>>>> + len += sprintf(format+len, "[%s]", "pos %d");
>>>>>>> + break;
>>>>>> Instead we could always output ckpt->total and then we wouldn't need %(C). I
>>>>>> suspect it's such a useful piece of information that it'll be repeated
>>>>>> in many/all format strings eventually.
>>>>> Yes, likewise %(T). If that's what we want to do.
>>>> I agree. For the cases when there is not task, can put "none"
>>>>
>>>>> Should we discuss here what we want an entry to look like? For both
>>>>> ckpt_write_err (to the checkpoint image) and ckpt_error()?
>>>>>
>>>> Yes please !
>>> Actually %T isn't the current task, right, so it shouldn't always be prepended?
>>> It actually is only meaningful during checkpoint_task(), collect_objs(), and
>>> __tree_count_tasks?
>>>
>>> Ok, so how about:
>>>
>>> 1. ckpt_write_err() always also calls ckpt_error() (which in turn calls
>>> ckpt_debug). Avoid duplication which exists in several places
>>> right now.
>>> 2. We always prepend:
>>>
>>> [current->pid]:[ctx->root_pid]:[ctx->active_pid]:[ctx->errno][ctx->total]
>>>
>>> The %(X) expansions if specified come whereever they are in the fmt
>>> string (which is what's happening now with my patchset).
>> So somewhere should set ctx->errno during a checkpoint.
>>
>> I suppose active_pid is for restart, but it's redundant isn't it ?
>> (it's always active_pid) - is it the different between top-level pid-ns
>> and "current" pid-ns ?
>
> No, I figured it would be meaningful for instance in places like
> wait_task_active().
Perhaps then leave it out of the default printing, and have the
specific debug messages there write it explicitly.
>
>> Instead of writing root_pid repeatedly, why not write sometime at the
>> beginning some "global" info about the checkpoint/restart ? (e.g.
>> the root_pid ...)
>
> Well it is written out (for restart) at the end, so I suppose I should
> switch restore_debug_free() to using ckpt_error() instead of ckpt_debug().
Yes, that will be helpful to reduce the noise :)
Oren.
next prev parent reply other threads:[~2009-10-29 0:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 22:46 [RFC PATCH 0/17] Introduce ckpt_error Serge Hallyn
[not found] ` <1256683587-23961-1-git-send-email-serge-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-27 22:46 ` [RFC PATCH 01/17] ckpt_write_err: use single format with %(T) style tokens Serge Hallyn
[not found] ` <1256683587-23961-2-git-send-email-serge-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 16:50 ` Matt Helsley
2009-10-27 22:46 ` [RFC PATCH 02/17] make ckpt_format_fmt non-static in checkpoint/sys.c Serge Hallyn
[not found] ` <1256683587-23961-3-git-send-email-serge-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 16:53 ` Matt Helsley
[not found] ` <20091028165317.GS31446-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-28 18:04 ` Serge E. Hallyn
[not found] ` <20091028180418.GB19554-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 18:31 ` Serge E. Hallyn
2009-10-28 22:21 ` Serge E. Hallyn
2009-10-27 22:46 ` [RFC PATCH 03/17] ckpt_write_err update arch/x86/mm/checkpoint.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 04/17] ckpt_write_err update checkpoint/checkpoint.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 05/17] ckpt_write_err update checkpoint/files.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 06/17] ckpt_write_err update checkpoint/memory.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 07/17] ckpt_write_err update checkpoint/objhash.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 08/17] ckpt_write_err update checkpoint/process.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 09/17] ckpt_write_err update checkpoint/signal.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 10/17] ckpt_write_err update fs/eventpoll.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 11/17] define function to print error messages to user log Serge Hallyn
[not found] ` <1256683587-23961-12-git-send-email-serge-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 18:14 ` Matt Helsley
[not found] ` <20091028181415.GB14023-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-28 20:54 ` Serge E. Hallyn
[not found] ` <20091028205424.GA27394-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 21:50 ` Oren Laadan
[not found] ` <4AE8BCB5.4030406-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-28 22:12 ` Serge E. Hallyn
[not found] ` <20091028221208.GA30227-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 22:31 ` Oren Laadan
[not found] ` <4AE8C639.6090105-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-29 0:12 ` Serge E. Hallyn
[not found] ` <20091029001223.GA1463-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-29 0:44 ` Oren Laadan [this message]
[not found] ` <4AE8E578.4030300-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-29 4:23 ` Serge E. Hallyn
[not found] ` <20091029042304.GA9005-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2009-10-29 16:02 ` Oren Laadan
2009-10-27 22:46 ` [RFC PATCH 12/17] use ckpt_error in checkpoint/restart.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 13/17] ckpt_error in checkpoint/files.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 14/17] ckpt_error in checkpoint/process.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 15/17] ckpt_error in ipc/checkpoint_msg.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 16/17] ckpt_error in ipc/checkpoint_sem.c Serge Hallyn
2009-10-27 22:46 ` [RFC PATCH 17/17] ckpt_error in ipc/checkpoint_shm.c Serge Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AE8E578.4030300@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox