From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH 1/3] Make sockets proper objhash objects and use checkpoint_obj() on them (v2)
Date: Wed, 09 Sep 2009 19:02:13 -0400 [thread overview]
Message-ID: <4AA833F5.3040706@librato.com> (raw)
In-Reply-To: <1252508756-4278-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Dan Smith wrote:
> This changes the checkpoint/restart procedure for sockets a bit. The
> socket file header is now checkpointed separately from the socket itself,
> which allows us to checkpoint a socket without arriving at it from a
> file descriptor. Thus, most sockets will be checkpointed as a result
> of processing the file table, calling sock_file_checkpoint(fd), which
> in turn calls checkpoint_obj(socket).
>
> However, we may arrive at some sockets while checkpointing other objects,
> such as the other end of an AF_UNIX socket with buffers in flight. This
> patch just opens that door, which is utilized by the next patch.
>
> Changes in v2:
> - If we attempt to checkpoint an orphan socket, create a struct socket
> to adopt it for the purposes of the checkpoint
>
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Looks good !
Did you also address this ?
https://lists.linux-foundation.org/pipermail/containers/2009-September/020385.html
-----
SH> Yes. On the struct sock. But what will drop the ref on the
SH> struct socket? Or has one of your later patches, not yet in
SH> ckpt-v17-dev, added that? Or, am I just missing a place where
SH> sock_put() will actually sock_release(sk->sk_socket)?
Hmm, I see what you mean. I can't find any path where sock_put() will
release the struct socket. What's weird is that there is a WARN_ON()
in af_unix.c:354 that should get tripped if we call sk_free() when we
still have a socket. I don't see that, but now I'm not sure why.
Perhaps what we should do is orphan the struct sock before we add it
to the hash and then graft it onto a new struct socket before
attaching it to a struct file?
-----
[The reason sk_free() expects no sk_socket is because the socket at
this point must have been released already via proto_ops->release().
The callback is assumed to orphan the socket].
Oren.
next prev parent reply other threads:[~2009-09-09 23:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 15:05 Track socket buffer owners Dan Smith
[not found] ` <1252508756-4278-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-09 15:05 ` [PATCH 1/3] Make sockets proper objhash objects and use checkpoint_obj() on them (v2) Dan Smith
[not found] ` <1252508756-4278-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-09 23:02 ` Oren Laadan [this message]
[not found] ` <4AA833F5.3040706-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-09-11 14:31 ` Dan Smith
[not found] ` <87d45xlfhz.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-09-11 19:46 ` Oren Laadan
2009-09-09 15:05 ` [PATCH 2/3] Add post-file deferqueue (v2) Dan Smith
[not found] ` <1252508756-4278-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-09 22:32 ` Oren Laadan
[not found] ` <4AA82D13.6040008-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-09-11 14:23 ` Dan Smith
[not found] ` <87hbv9lfup.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-09-11 19:43 ` Oren Laadan
2009-09-14 15:04 ` Oren Laadan
2009-09-09 15:05 ` [PATCH 3/3] Track socket buffer owners (v2) Dan Smith
[not found] ` <1252508756-4278-4-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-11 2:02 ` Serge E. Hallyn
[not found] ` <20090911020206.GA15845-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-11 14:31 ` Dan Smith
-- strict thread matches above, loose matches on Subject: below --
2009-09-02 18:22 [RFC] Sockets as proper objects and buffers with owners Dan Smith
[not found] ` <1251915760-20118-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-02 18:22 ` [PATCH 1/3] Make sockets proper objhash objects and use checkpoint_obj() on them (v2) Dan Smith
[not found] ` <1251915760-20118-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-03 0:32 ` Oren Laadan
[not found] ` <4A9F0E96.70106-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-09-03 15:21 ` Dan Smith
2009-09-03 5:40 ` Serge E. Hallyn
[not found] ` <20090903054058.GA7189-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-03 14:03 ` Dan Smith
[not found] ` <87eiqoyvkz.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-09-03 14:43 ` Serge E. Hallyn
[not found] ` <20090903144341.GA13182-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-03 15:08 ` Dan Smith
2009-09-03 14:46 ` 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=4AA833F5.3040706@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@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