From: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
To: users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org
Subject: Re: Deadlocks! help, please!
Date: Mon, 21 Jan 2008 14:01:29 +0900 (JST) [thread overview]
Message-ID: <20080121.140129.01311807.ryusuke@osrg.net> (raw)
In-Reply-To: <1200651072.2931.112.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Hello, Gábor
On Fri, 2008-01-18 at 19:11 +0900, Ryusuke Konishi wrote:
> Your log actually gave me a great hint!
>
> The following part of the log indicates that
> the device mapper faced starvation of a memory pool,
I found another possible cause for the starvation of a memory
pool. It is not a DM-related problem but a defection of a write
routine of NILFS.
And now I suspect that it's the true cause of your trouble.
Here I attach a test patch to fix the problem.
Could you try the patch ?
The patch can be applied as follows,
$ cd nilfs-2.0.0-testing-8
$ patch -p0 < patch_file
So, if rtorrent (or something else) hang again, then
send me a copy of /proc/slabinfo, please.
Thanks in advance,
--
Ryusuke Konishi
NILFS team NTT
http://www.nilfs.org/
Index: fs/segbuf.c
===================================================================
--- fs.orig/segbuf.c 2008-01-21 11:01:52.000000000 +0900
+++ fs/segbuf.c 2008-01-21 11:02:38.000000000 +0900
@@ -367,10 +367,10 @@
{
struct bio *bio;
- bio = bio_alloc(GFP_NOIO, nr_vecs);
+ bio = bio_alloc(GFP_NOWAIT, nr_vecs);
if (bio == NULL && (current->flags & PF_MEMALLOC)) {
while (!bio && (nr_vecs >>= 1))
- bio = bio_alloc(GFP_NOIO, nr_vecs);
+ bio = bio_alloc(GFP_NOWAIT, nr_vecs);
}
if (likely(bio)) {
bio->bi_bdev = sb->s_bdev;
Index: fs/kern_feature.h
===================================================================
--- fs.orig/kern_feature.h 2008-01-21 11:02:02.000000000 +0900
+++ fs/kern_feature.h 2008-01-21 11:09:33.000000000 +0900
@@ -339,6 +339,13 @@
(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
#endif
/*
+ * GFP_NOWAIT flag was introduced at linux-2.6.17
+ */
+#ifndef NEED_GFP_NOWAIT
+# define NEED_GFP_NOWAIT \
+ (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
+#endif
+/*
* mutex replaced semaphore since linux-2.6.16
*/
#ifndef NEED_INODE_SEMAPHORE
@@ -440,6 +447,10 @@
#define GFP_T gfp_t
#endif
+#if NEED_GFP_NOWAIT
+#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
+#endif
+
#if NEED_KMEM_CACHE_S
#define kmem_cache kmem_cache_s
#endif
next prev parent reply other threads:[~2008-01-21 5:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 21:25 Deadlocks! help, please! Gergely Gábor
2008-01-17 7:58 ` Ryusuke Konishi
[not found] ` <1200556717.3085.94.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-17 9:14 ` Ryusuke Konishi
[not found] ` <1200561294.3085.131.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-17 17:33 ` Gergely Gábor
2008-01-18 3:58 ` Ryusuke Konishi
[not found] ` <1200628693.2931.54.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-18 10:11 ` Ryusuke Konishi
[not found] ` <1200651072.2931.112.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-21 5:01 ` Ryusuke Konishi [this message]
[not found] ` <20080121.140129.01311807.ryusuke-sG5X7nlA6pw@public.gmane.org>
2008-01-21 23:00 ` Gergely Gábor
2008-01-22 3:02 ` Ryusuke Konishi
[not found] ` <1200970920.2844.59.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-02-05 9:28 ` Ryusuke Konishi
[not found] ` <20080205.182829.44149266.ryusuke-sG5X7nlA6pw@public.gmane.org>
2008-02-05 12:18 ` Gergely Gábor
2008-02-07 10:09 ` Gergely Gábor
2008-02-12 12:57 ` Ryusuke Konishi
[not found] ` <1202821077.9432.99.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-02-19 12:54 ` NILFS2 git repositories Ryusuke Konishi
2008-01-17 19:10 ` Deadlocks! help, please! Gergely Gábor
2008-01-25 11:46 ` Other strange things Gergely Gábor
2008-01-29 7:53 ` Ryusuke Konishi
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=20080121.140129.01311807.ryusuke@osrg.net \
--to=ryusuke-sg5x7nla6pw@public.gmane.org \
--cc=users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.