From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Oren Laadan <orenl@cs.columbia.edu>,
containers@lists.linux-foundation.org,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [RFC][PATCH 2/2] first callers of process_deny_checkpoint()
Date: Fri, 10 Oct 2008 10:41:49 +0200 [thread overview]
Message-ID: <48EF154D.6000600@fr.ibm.com> (raw)
In-Reply-To: <20081009190406.1B257119@kernel>
Dave Hansen wrote:
> These are just a few simple examples of things we know we can't
> checkpoint now. There are plenty more, but this should give
> everyone an idea how this will look in practice.
>
>
> Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
> ---
>
> linux-2.6.git-dave/fs/aio.c | 7 +++++++
> linux-2.6.git-dave/ipc/mqueue.c | 3 +++
> linux-2.6.git-dave/net/socket.c | 5 +++++
> 3 files changed, 15 insertions(+)
>
> diff -puN fs/aio.c~no-checkpointing-for-sockets fs/aio.c
> --- linux-2.6.git/fs/aio.c~no-checkpointing-for-sockets 2008-10-09 11:56:58.000000000 -0700
> +++ linux-2.6.git-dave/fs/aio.c 2008-10-09 11:56:58.000000000 -0700
> @@ -19,6 +19,7 @@
>
> #define DEBUG 0
>
> +#include <linux/checkpoint.h>
> #include <linux/sched.h>
> #include <linux/fs.h>
> #include <linux/file.h>
> @@ -1663,6 +1664,8 @@ asmlinkage long sys_io_submit(aio_contex
> if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp)))))
> return -EFAULT;
>
> + process_deny_checkpointing(current);
> +
> ctx = lookup_ioctx(ctx_id);
> if (unlikely(!ctx)) {
> pr_debug("EINVAL: io_submit: invalid context id\n");
> @@ -1742,6 +1745,8 @@ asmlinkage long sys_io_cancel(aio_contex
> if (unlikely(!ctx))
> return -EINVAL;
>
> + process_deny_checkpointing(current);
> +
> spin_lock_irq(&ctx->ctx_lock);
> ret = -EAGAIN;
> kiocb = lookup_kiocb(ctx, iocb, key);
> @@ -1796,6 +1801,8 @@ asmlinkage long sys_io_getevents(aio_con
> struct kioctx *ioctx = lookup_ioctx(ctx_id);
> long ret = -EINVAL;
>
> + process_deny_checkpointing(current);
> +
> if (likely(ioctx)) {
> if (likely(min_nr <= nr && min_nr >= 0 && nr >= 0))
> ret = read_events(ioctx, min_nr, nr, events, timeout);
> diff -puN ipc/mqueue.c~no-checkpointing-for-sockets ipc/mqueue.c
> --- linux-2.6.git/ipc/mqueue.c~no-checkpointing-for-sockets 2008-10-09 11:56:58.000000000 -0700
> +++ linux-2.6.git-dave/ipc/mqueue.c 2008-10-09 11:56:58.000000000 -0700
> @@ -14,6 +14,7 @@
> */
>
> #include <linux/capability.h>
> +#include <linux/checkpoint.h>
> #include <linux/init.h>
> #include <linux/pagemap.h>
> #include <linux/file.h>
> @@ -655,6 +656,8 @@ asmlinkage long sys_mq_open(const char _
> char *name;
> int fd, error;
>
> + process_deny_checkpointing(current);
> +
> error = audit_mq_open(oflag, mode, u_attr);
> if (error != 0)
> return error;
> diff -puN net/socket.c~no-checkpointing-for-sockets net/socket.c
> --- linux-2.6.git/net/socket.c~no-checkpointing-for-sockets 2008-10-09 11:56:58.000000000 -0700
> +++ linux-2.6.git-dave/net/socket.c 2008-10-09 11:56:58.000000000 -0700
> @@ -87,6 +87,7 @@
> #include <linux/audit.h>
> #include <linux/wireless.h>
> #include <linux/nsproxy.h>
> +#include <linux/checkpoint.h>
>
> #include <asm/uaccess.h>
> #include <asm/unistd.h>
> @@ -1236,6 +1237,8 @@ asmlinkage long sys_socket(int family, i
> if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
> flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
>
> + process_deny_checkpointing(current);
> +
> retval = sock_create(family, type, protocol, &sock);
> if (retval < 0)
> goto out;
> @@ -2130,6 +2133,8 @@ asmlinkage long sys_socketcall(int call,
> a0 = a[0];
> a1 = a[1];
>
> + process_deny_checkpointing(current);
> +
> switch (call) {
> case SYS_SOCKET:
> err = sys_socket(a0, a1, a[2]);
That seems to be a good idea.
There isn't a risk of a big propagation of this function all around the
kernel code ? Especially if there are partial support for a specific
resource ? I mean we are able to checkpoint ipv4/tcp sockets, (yeah I
like socket examples :) ) , but not other protocols so we have to remove
from sys_socket the process_deny_checkpoint and add it to all others
protocols.
next prev parent reply other threads:[~2008-10-10 8:43 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 19:04 [RFC][PATCH 1/2] Track in-kernel when we expect checkpoint/restart to work Dave Hansen
2008-10-09 19:04 ` [RFC][PATCH 2/2] first callers of process_deny_checkpoint() Dave Hansen
2008-10-09 19:04 ` Dave Hansen
2008-10-09 19:43 ` Serge E. Hallyn
[not found] ` <20081009194350.GA31214-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-09 20:54 ` Dave Hansen
2008-10-09 20:54 ` Dave Hansen
2008-10-10 8:46 ` Ingo Molnar
2008-10-10 8:46 ` Ingo Molnar
2008-10-10 13:17 ` Rafael J. Wysocki
2008-10-10 14:54 ` Ingo Molnar
2008-10-10 19:53 ` Rafael J. Wysocki
[not found] ` <200810102153.45174.rjw-KKrjLPT3xs0@public.gmane.org>
2008-10-10 19:53 ` Ingo Molnar
2008-10-10 19:53 ` Ingo Molnar
2008-10-10 20:40 ` Len Brown
[not found] ` <20081010195339.GA509-X9Un+BFzKDI@public.gmane.org>
2008-10-10 20:40 ` Len Brown
2008-10-10 22:57 ` Rafael J. Wysocki
2008-10-10 22:57 ` Rafael J. Wysocki
[not found] ` <20081010145422.GE11695-X9Un+BFzKDI@public.gmane.org>
2008-10-10 19:53 ` Rafael J. Wysocki
[not found] ` <200810101517.17809.rjw-KKrjLPT3xs0@public.gmane.org>
2008-10-10 14:54 ` Ingo Molnar
2008-10-11 13:48 ` Pavel Machek
2008-10-11 15:00 ` Ingo Molnar
[not found] ` <20081011134803.GA1483-+ZI9xUNit7I@public.gmane.org>
2008-10-11 15:00 ` Ingo Molnar
[not found] ` <20081010084614.GA319-X9Un+BFzKDI@public.gmane.org>
2008-10-10 13:17 ` Rafael J. Wysocki
2008-10-11 13:48 ` Pavel Machek
2008-10-10 10:27 ` Cedric Le Goater
2008-10-10 10:27 ` Cedric Le Goater
2008-10-09 19:43 ` Serge E. Hallyn
2008-10-10 8:41 ` Daniel Lezcano
2008-10-10 8:41 ` Daniel Lezcano [this message]
2008-10-10 10:17 ` Cedric Le Goater
2008-10-10 10:17 ` Cedric Le Goater
2008-10-10 14:04 ` Serge E. Hallyn
2008-10-10 16:45 ` Greg Kurz
2008-10-10 17:13 ` Serge E. Hallyn
[not found] ` <1223657132.10017.42.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-10-10 17:13 ` Serge E. Hallyn
2008-10-10 17:28 ` Dave Hansen
2008-10-10 17:28 ` Dave Hansen
2008-10-13 8:20 ` Greg Kurz
2008-10-13 8:20 ` Greg Kurz
[not found] ` <20081010140430.GA14640-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-10-10 16:45 ` Greg Kurz
[not found] ` <48EF2BAB.1010009-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-10 14:04 ` Serge E. Hallyn
2008-10-10 8:20 ` [RFC][PATCH 1/2] Track in-kernel when we expect checkpoint/restart to work Greg Kurz
2008-10-10 8:20 ` Greg Kurz
2008-10-10 8:37 ` Daniel Lezcano
[not found] ` <48EF144D.1050906-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-10 8:47 ` Greg Kurz
2008-10-10 8:47 ` Greg Kurz
2008-10-10 10:11 ` Oren Laadan
2008-10-10 14:59 ` Ingo Molnar
2008-10-10 16:33 ` Dave Hansen
2008-10-10 16:33 ` Dave Hansen
2008-10-10 10:11 ` Oren Laadan
2008-10-10 14:59 ` Ingo Molnar
2008-10-10 15:17 ` Oren Laadan
2008-10-10 15:28 ` Ingo Molnar
[not found] ` <48EF7211.2000303-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-10 15:28 ` Ingo Molnar
2008-10-10 16:34 ` Greg Kurz
2008-10-10 16:34 ` Greg Kurz
2008-10-10 17:18 ` Chris Friesen
[not found] ` <48EF8E77.8050000-ZIRUuHA3oDzQT0dZR+AlfA@public.gmane.org>
2008-10-13 8:18 ` Greg Kurz
2008-10-13 8:18 ` Greg Kurz
[not found] ` <1223885897.4404.5.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-10-13 16:46 ` Serge E. Hallyn
2008-10-13 16:46 ` Serge E. Hallyn
[not found] ` <1223656489.10017.33.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-10-10 16:36 ` Dave Hansen
2008-10-10 16:36 ` Dave Hansen
2008-10-10 20:57 ` Daniel Lezcano
2008-10-10 20:57 ` Daniel Lezcano
2008-10-10 17:18 ` Chris Friesen
[not found] ` <20081010145934.GF11695-X9Un+BFzKDI@public.gmane.org>
2008-10-10 15:17 ` Oren Laadan
[not found] ` <1223626834.8787.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-10-10 8:37 ` Daniel Lezcano
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=48EF154D.6000600@fr.ibm.com \
--to=dlezcano@fr.ibm.com \
--cc=arnd@arndb.de \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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.