From: Catalin Marinas <catalin.marinas@arm.com>
To: Mandeep Singh Baines <msb@google.com>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
"Alexander Beregalov" <a.beregalov@gmail.com>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: next-20090202: task kmemleak:763 blocked for more than 120 seconds.
Date: Tue, 03 Feb 2009 12:31:44 +0000 [thread overview]
Message-ID: <1233664304.1568.39.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20090202215740.GA26550@google.com>
On Mon, 2009-02-02 at 13:57 -0800, Mandeep Singh Baines wrote:
> The hung_task timeout is now 480 seconds because of sys_sync:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fb822db465bd9fd4208eef1af4490539b236c54e
>
> But are there are really any other tasks which call
> schedule_timeout_uninterruptibl() for with a timeout >480 seconds?
>
> Right now kmemleak appears to be the only exception. (A quick grep didn't turn
> anything up.) And it is trivial to change kmemleak to use INTERRUPTIBLE.
> Might even be a nice feature. You could stop it faster that way.
I changed the code as below as it makes more sense:
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1044,6 +1044,7 @@ static int kmemleak_scan_thread(void *arg)
while (!kthread_should_stop()) {
struct kmemleak_object *object;
+ signed long timeout = jiffies_scan_wait;
mutex_lock(&scan_mutex);
@@ -1069,7 +1070,8 @@ static int kmemleak_scan_thread(void *arg)
mutex_unlock(&scan_mutex);
/* wait before the next scan */
- schedule_timeout_uninterruptible(jiffies_scan_wait);
+ while (timeout && !kthread_should_stop())
+ timeout = schedule_timeout_interruptible(timeout);
}
pr_info("kmemleak: Automatic memory scanning thread ended\n");
--
Catalin
next prev parent reply other threads:[~2009-02-03 12:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 11:27 Alexander Beregalov
2009-02-02 14:53 ` Catalin Marinas
2009-02-02 15:14 ` Frédéric Weisbecker
2009-02-02 15:15 ` Frédéric Weisbecker
2009-02-02 21:57 ` Mandeep Singh Baines
2009-02-03 0:41 ` Frederic Weisbecker
2009-02-03 12:48 ` Catalin Marinas
2009-02-03 20:52 ` Frederic Weisbecker
2009-02-06 16:02 ` next-20090202: task kmemleak:763 blocked for more than 120seconds Catalin Marinas
2009-02-03 12:31 ` Catalin Marinas [this message]
2009-02-03 11:57 ` next-20090202: task kmemleak:763 blocked for more than 120 seconds Alexander Beregalov
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=1233664304.1568.39.camel@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=a.beregalov@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=msb@google.com \
/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®