From: Catalin Marinas <catalin.marinas@arm•com>
To: Frederic Weisbecker <fweisbec@gmail•com>
Cc: Mandeep Singh Baines <msb@google•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:48:34 +0000 [thread overview]
Message-ID: <1233665314.1568.46.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20090203004141.GA22718@nowhere>
On Tue, 2009-02-03 at 01:41 +0100, Frederic Weisbecker wrote:
> Right. BTW, I wonder how it behaves in case of suspend to disk.
> But changing the state to TASK_INTERRUPTIBLE wouldn't change it in this case since the
> signals are only sent to userpace threads to freeze them.
>
> Kernel threads try to freeze by themselves.
>
> But for such very long schedule_timeout, will the hibernation wait for kmemleak
> to wake up and then try_to_freeze() before suspend to disk?
I haven't added anything to kmemleak for this. Does something like below
look feasible?
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -88,6 +88,7 @@
#include <linux/errno.h>
#include <linux/uaccess.h>
#include <linux/string.h>
+#include <linux/freezer.h>
#include <asm/sections.h>
#include <asm/processor.h>
@@ -1070,8 +1071,11 @@ static int kmemleak_scan_thread(void *arg)
mutex_unlock(&scan_mutex);
/* wait before the next scan */
- while (timeout && !kthread_should_stop())
+ while (timeout && !kthread_should_stop()) {
+ if (try_to_freeze())
+ break;
timeout = schedule_timeout_interruptible(timeout);
+ }
}
pr_info("kmemleak: Automatic memory scanning thread ended\n");
Thanks.
--
Catalin
next prev parent reply other threads:[~2009-02-03 12:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 11:27 next-20090202: task kmemleak:763 blocked for more than 120 seconds 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 [this message]
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 ` next-20090202: task kmemleak:763 blocked for more than 120 seconds Catalin Marinas
2009-02-03 11:57 ` 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=1233665314.1568.46.camel@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm$(echo .)com \
--cc=a.beregalov@gmail$(echo .)com \
--cc=fweisbec@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=msb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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