From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH 2/2] Move ckpt_objhash_free() to before we destroy the deferqueues
Date: Tue, 9 Feb 2010 15:29:28 -0600 [thread overview]
Message-ID: <20100209212928.GB32513@us.ibm.com> (raw)
In-Reply-To: <1265736604-24194-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Well you can't quite do that bc fs/eventpoll.c:ep_items_restore()
will use ckpt_obj_fetch().
Would it be safe to make the order:
files_deferqueue()
ckpt_obj_hash_free()
deferqueue()
?
Though that's just waiting to bite us in the ankles whenever
we put something in general deferqueue which must ckpt_obj_fetch()...
-serge
Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> This makes the deferqueue cleanup function run after all the objects
> have been purged from the hash and thus gives us an opportunity to cleanup
> things that *must* happen after the last reference is dropped (such as
> unregister_netdev()).
>
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> checkpoint/sys.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/checkpoint/sys.c b/checkpoint/sys.c
> index f04b8b0..f739932 100644
> --- a/checkpoint/sys.c
> +++ b/checkpoint/sys.c
> @@ -223,6 +223,8 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
> if (ctx->kflags & CKPT_CTX_RESTART)
> restore_debug_free(ctx);
>
> + ckpt_obj_hash_free(ctx);
> +
> if (ctx->deferqueue)
> deferqueue_destroy(ctx->deferqueue);
>
> @@ -234,7 +236,6 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
> if (ctx->logfile)
> fput(ctx->logfile);
>
> - ckpt_obj_hash_free(ctx);
> path_put(&ctx->root_fs_path);
> ckpt_pgarr_free(ctx);
>
> --
> 1.6.2.5
>
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2010-02-09 21:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 17:30 Supporting patches for netns/netdev Dan Smith
[not found] ` <1265736604-24194-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 17:30 ` [PATCH 1/2] Make restore_obj() tolerate a preexisting object in the hash Dan Smith
[not found] ` <1265736604-24194-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 21:21 ` Serge E. Hallyn
[not found] ` <20100209212154.GA32513-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 21:24 ` Dan Smith
2010-02-09 17:30 ` [PATCH 2/2] Move ckpt_objhash_free() to before we destroy the deferqueues Dan Smith
[not found] ` <1265736604-24194-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 21:29 ` Serge E. Hallyn [this message]
[not found] ` <20100209212928.GB32513-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 21:32 ` Dan Smith
[not found] ` <877hqmhz80.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2010-02-09 21:42 ` Serge E. Hallyn
-- strict thread matches above, loose matches on Subject: below --
2010-02-09 21:11 Supporting patches for netns/netdev (v2) Dan Smith
[not found] ` <1265749870-13989-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-09 21:11 ` [PATCH 2/2] Move ckpt_objhash_free() to before we destroy the deferqueues Dan Smith
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=20100209212928.GB32513@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=danms-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