mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: miklos@szeredi.hu
Cc: netdev@vger.kernel.org, ebiederm@xmission.com,
	akpm@linux-foundation.org, viro@ftp.linux.org.uk,
	alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH resend] rewrite AF_UNIX garbage collector, fixes race
Date: Wed, 11 Jul 2007 19:29:40 -0700 (PDT)	[thread overview]
Message-ID: <20070711.192940.21926073.davem@davemloft.net> (raw)
In-Reply-To: <E1I61UT-0006Gk-00@dorka.pomaz.szeredi.hu>

From: Miklos Szeredi <miklos@szeredi.hu>
Date: Wed, 04 Jul 2007 11:49:41 +0200

> Throw out the old mark & sweep garbage collector and put in a
> refcounting cycle detecting one.
> 
> The old one had a race with recvmsg, that resulted in false positives
> and hence data loss.  The old algorithm operated on all unix sockets
> in the system, so any additional locking would have meant performance
> problems for all users of these.
> 
> The new algorithm instead only operates on "in flight" sockets, which
> are very rare, and the additional locking for these doesn't negatively
> impact the vast majority of users.
> 
> In fact it's probable, that there weren't *any* heavy senders of
> sockets over sockets, otherwise the above race would have been
> discovered long ago.
> 
> The patch works OK with the app that exposed the race with the old
> code.  The garbage collection has also been verified to work in a few
> simple cases.
> 
> See comments inside patch for the description of the algorithm.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

This looks good, patch applied and I'll get this into the
2.6.23 merge window.

Once this sits around for a while and we feel super-confident
with it we can consider a backport into -stable.


  parent reply	other threads:[~2007-07-12  2:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04  9:49 Miklos Szeredi
2007-07-11  5:12 ` David Miller
2007-07-11  5:25   ` Andrew Morton
2007-07-11  6:41     ` Miklos Szeredi
2007-07-11  6:51       ` David Miller
2007-07-11  7:04         ` Miklos Szeredi
2007-07-11  7:06           ` David Miller
2007-07-11  7:32             ` Miklos Szeredi
2007-07-12  2:29 ` David Miller [this message]
2007-07-12  9:55   ` Miklos Szeredi

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=20070711.192940.21926073.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /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

all inboxes | Powered by JetHome®