From: Roland McGrath <roland@redhat.com>
To: Edward Allcutt <edward@allcutt.me.uk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Randy Dunlap <rdunlap@xenotime.net>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>,
Dave Young <hidave.darkstar@gmail.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
"H. Peter Anvin" <hpa@zytor.com>, Oleg Nesterov <oleg@redhat.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Neil Horman <nhorman@tuxdriver.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: limit maximum concurrent coredumps
Date: Mon, 21 Jun 2010 18:23:03 -0700 (PDT) [thread overview]
Message-ID: <20100622012303.BD72E402AD@magilla.sf.frob.com> (raw)
In-Reply-To: Edward Allcutt's message of Monday, 21 June 2010 19:58:55 -0400 <1277164737-30055-1-git-send-email-edward@allcutt.me.uk>
A core dump is just an instance of a process suddenly reading lots of its
address space and doing lots of filesystem writes, producing the kinds of
thrashing that any such instance might entail. It really seems like the
real solution to this kind of problem will be in some more general kind of
throttling of processes (or whatever manner of collections thereof) when
they got hog-wild on page-ins or filesystem writes, or whatever else. I'm
not trying to get into the details of what that would be. But I have to
cite this hack as the off-topic kludge that it really is. That said, I do
certainly sympathize with the desire for a quick hack that addresses the
scenario you experience.
For the case you described, it seems to me that constraining concurrency
per se would be better than punting core dumps when too concurrent. That
is, you should not skip the dump when you hit the limit. Rather, you
should block in do_coredump() until the next dump already in progress
finishes. (It should be possible to use TASK_KILLABLE so that those dumps
in waiting can be aborted with a follow-on SIGKILL. But Oleg will have to
check on the signals details being right for that.)
That won't make your crashers each complete quickly, but it will prevent
the thrashing. Instead of some crashers suddenly not producing dumps at
all, they'll just all queue up waiting to finish crashing but not using any
CPU or IO resources. That way you don't lose any core dumps unless you
want to start SIGKILL'ing things (which oom_kill might do if need be),
you just don't die in flames trying to do nothing but dump cores.
Thanks,
Roland
next prev parent reply other threads:[~2010-06-22 1:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 23:58 Edward Allcutt
2010-06-22 1:23 ` Roland McGrath [this message]
2010-06-22 1:41 ` Andrew Morton
2010-06-22 8:49 ` KAMEZAWA Hiroyuki
2010-06-22 3:55 ` H. Peter Anvin
2010-06-22 8:44 ` Jiri Kosina
2010-06-22 8:56 ` Roland McGrath
2010-06-22 2:18 ` KOSAKI Motohiro
2010-06-23 15:57 ` Oleg Nesterov
2010-06-23 16:02 ` Oleg Nesterov
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=20100622012303.BD72E402AD@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=edward@allcutt.me.uk \
--cc=hidave.darkstar@gmail.com \
--cc=hpa@zytor.com \
--cc=jkosina@suse.cz \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nhorman@tuxdriver.com \
--cc=oleg@redhat.com \
--cc=rdunlap@xenotime.net \
--cc=schwidefsky@de.ibm.com \
--cc=viro@zeniv.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®