From: dann frazier <dannf@hp.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, eteo@redhat.com
Subject: Re: [PATCH] Fix soft lockups/OOM issues w/ unix garbage collector
Date: Mon, 1 Dec 2008 13:17:04 -0700 [thread overview]
Message-ID: <20081201201703.GA15884@colo.lackof.org> (raw)
In-Reply-To: <20081126.153243.85669383.davem@davemloft.net>
On Wed, Nov 26, 2008 at 03:32:43PM -0800, David Miller wrote:
> From: dann frazier <dannf@dannf.org>
> Date: Wed, 26 Nov 2008 10:04:02 -0700
>
> > This is an implementation of David Miller's suggested fix in:
> > https://bugzilla.redhat.com/show_bug.cgi?id=470201
> >
> > It has been updated to use wait_event() instead of
> > wait_event_interruptible().
> >
> > Paraphrasing the description from the above report, it makes sendmsg()
> > block while UNIX garbage collection is in progress. This avoids a
> > situation where child processes continue to queue new FDs over a
> > AF_UNIX socket to a parent which is in the exit path and running
> > garbage collection on these FDs. This contention can result in soft
> > lockups and oom-killing of unrelated processes.
> >
> > Signed-off-by: dann frazier <dannf@hp.com>
>
> Applied, thanks a lot Dann.
I was asked if this patch may introduce blocking during operations on
non-blocking sockets. Should we update wait_for_unix_gc (and its
callers) to something like this?
int wait_for_unix_gc(bool can_block)
{
if (!can_block)
return gc_in_progress ? -EWOULDBLOCK : 0;
wait_event(unix_gc_wait, gc_in_progress == false);
return 0;
}
--
dann frazier
next prev parent reply other threads:[~2008-12-01 20:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 22:03 soft lockups/OOM after unix socket fixes dann frazier
2008-11-25 23:17 ` [PATCH] Fix soft lockups/OOM issues w/ unix garbage collector dann frazier
2008-11-26 5:19 ` David Miller
2008-11-26 17:04 ` dann frazier
2008-11-26 23:32 ` David Miller
2008-12-01 20:17 ` dann frazier [this message]
2008-12-01 21:16 ` David Miller
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=20081201201703.GA15884@colo.lackof.org \
--to=dannf@hp.com \
--cc=davem@davemloft.net \
--cc=eteo@redhat.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).