From: Eric Sandall <eric@sandall.us>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Eric Sandall <eric@sandall.us>, David Kowis <dkowis@shlrm.org>,
linux-raid@vger.kernel.org
Subject: Re: mdadm memory leak?
Date: Sat, 9 Jul 2005 13:11:10 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.63.0507091309380.486@cerberus> (raw)
In-Reply-To: <17099.13342.229652.667901@cse.unsw.edu.au>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 6 Jul 2005, Neil Brown wrote:
> On Tuesday July 5, eric@sandall.us wrote:
>> Which kernel is that against? It doesn't apply against my 2.6.10-as7
>> nor David Kowis' 2.6.12.1 and 2.6.11.12 kernel source trees
>> (I don't even have the super_written function the patch is referring
>> to)?
>
> It was against ... 2.6.12-mm1 or similar I think. Looks like the bug
> didn't get to main-line until just before the fix, which it good.
>
> 2.6.10-as7 seems to have a different though related bug.
> It contains the patch:
> http://www.acm.cs.rpi.edu/~dilinger/patches/2.6.10/as7/linux-2.6.10-as7/051-md_sync_page_io_max_vecs.patch
>
> which contains:
> diff -Nru a/drivers/md/md.c b/drivers/md/md.c
> --- a/drivers/md/md.c 2005-01-22 00:16:02 -08:00
> +++ b/drivers/md/md.c 2005-01-22 00:16:02 -08:00
> @@ -332,29 +332,26 @@
> static int sync_page_io(struct block_device *bdev, sector_t sector, int size,
> struct page *page, int rw)
> {
> - struct bio bio;
> - struct bio_vec vec;
> + struct bio *bio = bio_alloc(GFP_KERNEL, 1);
> struct completion event;
> + int ret;
> +
> + bio_get(bio);
> ....
> + bio_put(bio);
> + return ret;
> }
>
> bio_alloc sets the refcount to 1.
> bio_get increments it to 2.
> bio_put sets it back to 1. But it never reaches zero.
>
> You want to get rid of that bio_get near the top of sync_page_io.
I've patched[0] my kernel with that and recompiled it, but haven't
rebooted into it yet as I have some processes running that I don't
want to kill until they've finished.
Should be good to go tomorrow, then I'll report back, thanks. :)
- -sandalle
[0] Removing only the bio_get(bio);, not applying the entire patch.
- --
Eric Sandall | Source Mage GNU/Linux Developer
eric@sandall.us | http://www.sourcemage.org/
http://eric.sandall.us/ | SysAdmin @ Inst. Shock Physics @ WSU
http://counter.li.org/ #196285 | http://www.shock.wsu.edu/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC0C9hHXt9dKjv3WERAqgFAJ9UsWg7gtm2aUv/rLtPnjsBrV6A7QCgww1F
r7s0Th0J5LMLXIkfdyv5G/8=
=tMC0
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2005-07-09 20:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-05 4:24 mdadm memory leak? David Kowis
2005-07-05 4:30 ` David Kowis
2005-07-05 4:59 ` Guy
2005-07-05 15:49 ` Eric Sandall
2005-07-05 15:56 ` David Kowis
2005-07-05 4:57 ` Neil Brown
2005-07-05 15:36 ` Eric Sandall
2005-07-05 21:08 ` Neil Brown
2005-07-05 22:04 ` Eric Sandall
2005-07-06 1:30 ` Neil Brown
2005-07-09 20:11 ` Eric Sandall [this message]
2005-07-17 4:52 ` Eric Sandall
2005-07-05 15:52 ` David Kowis
2005-07-05 21:23 ` Neil Brown
2005-07-05 21:50 ` David Kowis
2005-07-08 22:04 ` David Kowis
2005-07-08 23:15 ` Tyler
2005-07-09 4:20 ` David Kowis
2005-07-05 21:41 ` David Kowis
-- strict thread matches above, loose matches on Subject: below --
2005-07-06 16:09 Bailey, Scott
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=Pine.LNX.4.63.0507091309380.486@cerberus \
--to=eric@sandall.us \
--cc=dkowis@shlrm.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/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).