From: Ingo Molnar <mingo@elte.hu>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: dave@linux.vnet.ibm.com, arnd@arndb.de, jeremy@goop.org,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org
Subject: Re: [RFC v4][PATCH 3/9] x86 support for checkpoint/restart
Date: Tue, 9 Sep 2008 10:17:13 +0200 [thread overview]
Message-ID: <20080909081713.GA18946@elte.hu> (raw)
In-Reply-To: <1220946154-15174-4-git-send-email-orenl@cs.columbia.edu>
* Oren Laadan <orenl@cs.columbia.edu> wrote:
> + /* for checkpoint in process context (from within a container)
> + the GS and FS registers should be saved from the hardware;
> + otherwise they are already sabed on the thread structure */
please use the correct comment style consistently throughout your
patches. The correct one is like this one:
> + /*
> + * for checkpoint in process context (from within a container),
> + * the actual syscall is taking place at this very moment; so
> + * we (optimistically) subtitute the future return value (0) of
> + * this syscall into the orig_eax, so that upon restart it will
> + * succeed (or it will endlessly retry checkpoint...)
> + */
incorrect/inconsistent ones are like these:
> + /* normally, no need to unlazy_fpu(), since TS_USEDFPU flag
> + * have been cleared when task was conexted-switched out...
> + * except if we are in process context, in which case we do */
> + /* restore TLS by hand: why convert to struct user_desc if
> + * sys_set_thread_entry() will convert it back ? */
> + /* FIX: add sanity checks (eg. that values makes
> + * sense, that we don't overwrite old values, etc */
(and there's many more examples throughout the series)
> +int cr_read_cpu_debug(struct cr_hdr_cpu *hh, struct task_struct *t)
> +{
> + /* debug regs */
> +
> + preempt_disable();
> +
> + if (hh->uses_debug) {
> + set_debugreg(hh->debugreg0, 0);
> + set_debugreg(hh->debugreg1, 1);
> + /* ignore 4, 5 */
> + set_debugreg(hh->debugreg2, 2);
> + set_debugreg(hh->debugreg3, 3);
> + set_debugreg(hh->debugreg6, 6);
> + set_debugreg(hh->debugreg7, 7);
> + }
> +
> + preempt_enable();
> +
> + return 0;
> +}
hm, the preemption disabling seems pointless here. What does it protect
against?
> +++ b/checkpoint/ckpt_arch.h
> @@ -0,0 +1,7 @@
> +#include <linux/ckpt.h>
> +
> +int cr_write_thread(struct cr_ctx *ctx, struct task_struct *t);
> +int cr_write_cpu(struct cr_ctx *ctx, struct task_struct *t);
> +
> +int cr_read_thread(struct cr_ctx *ctx);
> +int cr_read_cpu(struct cr_ctx *ctx);
please add 'extern' to prototypes in include files.
> @@ -15,6 +15,8 @@
> #include <linux/ckpt.h>
> #include <linux/ckpt_hdr.h>
>
> +#include "ckpt_arch.h"
> +
plsdntuseannyngabbrvtsngnrcd. [1]
"checkpoint_" should be just fine in most cases.
Ingo
[1] (please dont use annoying abbreviations in generic code)
next prev parent reply other threads:[~2008-09-09 8:18 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 7:42 [RFC v4][PATCH 0/9] Kernel based checkpoint/restart` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 1/9] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 2/9] General infrastructure for checkpoint restart Oren Laadan
[not found] ` <1220946154-15174-3-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 6:10 ` MinChan Kim
2008-09-10 6:10 ` MinChan Kim
2008-09-10 18:36 ` Oren Laadan
[not found] ` <48C813A0.2020404-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 22:54 ` MinChan Kim
2008-09-10 22:54 ` MinChan Kim
2008-09-11 6:44 ` Oren Laadan
[not found] ` <28c262360809101554l1faab2a9na6b9066a07747554-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-11 6:44 ` Oren Laadan
[not found] ` <28c262360809092310x244c0c8dvca8a6022c7d0d225-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-10 18:36 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 3/9] x86 support for checkpoint/restart Oren Laadan
[not found] ` <1220946154-15174-4-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 8:17 ` Ingo Molnar
2008-09-09 8:17 ` Ingo Molnar [this message]
[not found] ` <20080909081713.GA18946-X9Un+BFzKDI@public.gmane.org>
2008-09-09 23:23 ` Oren Laadan
2008-09-09 23:23 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 4/9] Memory management (dump) Oren Laadan
2008-09-09 9:22 ` Vegard Nossum
2008-09-10 7:51 ` MinChan Kim
2008-09-10 23:49 ` MinChan Kim
[not found] ` <28c262360809100051o24e69f1cp45b73201d9c748e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-10 23:49 ` MinChan Kim
2008-09-10 16:55 ` Dave Hansen
2008-09-10 17:45 ` Dave Hansen
2008-09-10 17:45 ` Dave Hansen
2008-09-10 18:28 ` Oren Laadan
2008-09-10 18:28 ` Oren Laadan
[not found] ` <48C811C5.9000102-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 21:03 ` Cleanups for [PATCH " Dave Hansen
2008-09-10 21:03 ` Dave Hansen
[not found] ` <1220946154-15174-5-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 9:22 ` [RFC v4][PATCH " Vegard Nossum
2008-09-10 7:51 ` MinChan Kim
2008-09-10 16:55 ` Dave Hansen
2008-09-10 21:38 ` Dave Hansen
2008-09-12 16:57 ` Dave Hansen
2008-09-10 21:38 ` Dave Hansen
2008-09-12 16:57 ` Dave Hansen
2008-09-09 7:42 ` [RFC v4][PATCH 5/9] Memory managemnet (restore) Oren Laadan
2008-09-09 16:07 ` Serge E. Hallyn
2008-09-09 23:35 ` Oren Laadan
[not found] ` <48C7082A.1050608-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 15:00 ` Serge E. Hallyn
2008-09-10 15:00 ` Serge E. Hallyn
[not found] ` <20080909160724.GA23397-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-09-09 23:35 ` Oren Laadan
2008-09-10 19:31 ` Dave Hansen
2008-09-10 19:48 ` Oren Laadan
2008-09-10 19:48 ` Oren Laadan
2008-09-10 20:49 ` Dave Hansen
2008-09-11 6:59 ` Oren Laadan
2008-09-11 6:59 ` Oren Laadan
[not found] ` <48C824A2.8050708-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 20:49 ` Dave Hansen
[not found] ` <1220946154-15174-6-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 16:07 ` Serge E. Hallyn
2008-09-10 19:31 ` Dave Hansen
2008-09-09 7:42 ` [RFC v4][PATCH 6/9] Checkpoint/restart: initial documentation Oren Laadan
[not found] ` <1220946154-15174-7-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 7:13 ` MinChan Kim
2008-09-10 7:13 ` MinChan Kim
2008-09-09 7:42 ` [RFC v4][PATCH 7/9] Infrastructure for shared objects Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 8/9] File descriprtors (dump) Oren Laadan
[not found] ` <1220946154-15174-9-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 8:06 ` Vegard Nossum
2008-09-09 8:23 ` Vegard Nossum
2008-09-11 5:02 ` MinChan Kim
2008-09-09 8:06 ` Vegard Nossum
2008-09-09 8:23 ` Vegard Nossum
[not found] ` <19f34abd0809090123y36c51395pfa694799f7a2afb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-10 2:01 ` Oren Laadan
2008-09-10 2:01 ` Oren Laadan
2008-09-11 5:02 ` MinChan Kim
2008-09-11 6:37 ` Oren Laadan
[not found] ` <28c262360809102202t73c12a09uc6edd5ce93ce36d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-11 6:37 ` Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 9/9] File descriprtors (restore) Oren Laadan
[not found] ` <1220946154-15174-10-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 16:26 ` Dave Hansen
2008-09-09 16:26 ` Dave Hansen
2008-09-10 1:49 ` Oren Laadan
2008-09-10 16:09 ` Dave Hansen
2008-09-10 18:55 ` Oren Laadan
2008-09-10 18:55 ` Oren Laadan
[not found] ` <48C727B6.9000700-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-10 16:09 ` Dave Hansen
2008-09-10 1:49 ` Oren Laadan
[not found] ` <1220946154-15174-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-09-09 7:42 ` [RFC v4][PATCH 1/9] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 2/9] General infrastructure for checkpoint restart Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 3/9] x86 support for checkpoint/restart Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 4/9] Memory management (dump) Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 5/9] Memory managemnet (restore) Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 6/9] Checkpoint/restart: initial documentation Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 7/9] Infrastructure for shared objects Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 8/9] File descriprtors (dump) Oren Laadan
2008-09-09 7:42 ` [RFC v4][PATCH 9/9] File descriprtors (restore) Oren Laadan
2008-09-09 18:06 ` [RFC v4][PATCH 0/9] Kernel based checkpoint/restart` Dave Hansen
2008-09-09 18:06 ` Dave Hansen
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=20080909081713.GA18946@elte.hu \
--to=mingo@elte.hu \
--cc=arnd@arndb.de \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orenl@cs.columbia.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.