From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Dave Hansen
<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: [RFC v2][PATCH 01/10] Infrastructure for work postponed to the end of checkpoint/restart
Date: Tue, 14 Apr 2009 02:16:03 -0400 [thread overview]
Message-ID: <49E42A23.4030404@cs.columbia.edu> (raw)
In-Reply-To: <20090413180459.GA18467-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Serge E. Hallyn wrote:
> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>
>> Serge E. Hallyn wrote:
>>> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
>>>> --- a/checkpoint/Makefile
>>>> +++ b/checkpoint/Makefile
>>>> @@ -2,8 +2,8 @@
>>>> # Makefile for linux checkpoint/restart.
>>>> #
>>>>
>>>> -obj-$(CONFIG_CHECKPOINT) += sys.o objhash.o \
>>>> +obj-$(CONFIG_CHECKPOINT) += sys.o objhash.o deferqueue.o \
>>>> checkpoint.o restart.o \
>>>> ckpt_task.o rstr_task.o \
>>>> ckpt_mem.o rstr_mem.o \
>>>> - ckpt_file.o rstr_file.o
>>>> + ckpt_file.o rstr_file.o \
>>> ?
>>>
>>>> +int cr_deferqueue_add(struct cr_ctx *ctx, cr_deferqueue_func_t function,
>>>> + unsigned int flags, void *data, int size)
>>>> +{
>>>> + struct cr_deferqueue *wq;
>>>> +
>>>> + wq = kmalloc(sizeof(wq) + size, GFP_KERNEL);
>>>> + if (!wq)
>>>> + return -ENOMEM;
>>>> +
>>>> + wq->function = function;
>>>> + wq->flags = flags;
>>>> + memcpy(wq->data, data, size);
>>>> +
>>>> + cr_debug("adding work %p function %p\n", wq, wq->function);
>>>> + list_add_tail(&ctx->deferqueue, &wq->list);
>>>> + return 0;
>>>> +}
>>> Shouldn't the deferqueue be protected by a spinlock here?
>> Not until we implement concurrent checkpoint/restart. At the moment
>> it's one task at a time the can access it.
>
> That's too bad. I think this woudl be better done as a single
> simple patch addin ga new generic deferqueue mechanism for all
> to use, with a per-queue spinlock protecting both _add and
> _run
Fair enough. Would you like to take a stab at it ?
Oren.
next prev parent reply other threads:[~2009-04-14 6:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 12:31 [RFC v2][PATCH 00/10] sysv SHM checkpoint/restart Oren Laadan
[not found] ` <1239107503-21941-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-07 12:31 ` [RFC v2][PATCH 01/10] Infrastructure for work postponed to the end of checkpoint/restart Oren Laadan
[not found] ` <1239107503-21941-2-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-13 15:35 ` Serge E. Hallyn
[not found] ` <20090413153504.GA15846-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-13 15:49 ` Oren Laadan
[not found] ` <49E35F25.5070501-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-13 18:04 ` Serge E. Hallyn
[not found] ` <20090413180459.GA18467-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-14 6:16 ` Oren Laadan [this message]
[not found] ` <49E42A23.4030404-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-14 17:14 ` Serge E. Hallyn
2009-04-14 22:48 ` Serge E. Hallyn
2009-04-07 12:31 ` [RFC v2][PATCH 02/10] ipc: allow allocation of an ipc object with desired identifier Oren Laadan
[not found] ` <1239107503-21941-3-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-14 18:08 ` Serge E. Hallyn
2009-04-07 12:31 ` [RFC v2][PATCH 03/10] ipc: helpers to save and restore kern_ipc_perm structures Oren Laadan
[not found] ` <1239107503-21941-4-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-14 21:55 ` Serge E. Hallyn
2009-04-07 12:31 ` [RFC v2][PATCH 04/10] sysvipc-shm: checkpoint Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 05/10] sysvipc-shm: restart Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 06/10] sysvipc-shm: export interface from ipc/shm.c to delete ipc shm Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 07/10] sysvipc-shm: correctly handle deleted (active) ipc shared memory Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 08/10] sysvipc-msg: make 'struct msg_msgseg' visible in ipc/util.h Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 09/10] sysvipc-msq: checkpoint Oren Laadan
2009-04-07 12:31 ` [RFC v2][PATCH 10/10] sysvipc-msq: restart Oren Laadan
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=49E42A23.4030404@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@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