Message ID | 20160606161245.GC29910@e104818-lin.cambridge.arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 06/06/2016 11:12 AM, Catalin Marinas wrote: > On Mon, Jun 06, 2016 at 04:13:34PM +0200, Christoph Hellwig wrote: >> I've got a few reports of this over the weekend, but it still doesn't >> make much sense to me. >> >> Could it be that kmemleak can't deal with the bio_batch logic? I've >> tried to look at the various bio and biovec number entries in >> /proc/slabinfo, and while they keep changing a bit during the >> system runtime there doesn't seem to be a persistent increase >> even after lots of mkfs calls. > > I think the reported leaks settle after about 10-20min (2-3 kmemleak > periodic scans), so checking /proc/slabinfo may not be sufficient if > the leak is not growing. The leaks also do not seem to disappear, > otherwise kmemleak would no longer report them (e.g. after kfree, even > if they had been previously reported). The leak is definitely not related to mkfs. At the moment, my system has been up about 26 hours, and has generated 162 of these leaks without ever doing a single mkfs. In addition, the box say idle for almost 12 of those hours. Larry -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jun 06, 2016 at 11:06:05PM -0500, Larry Finger wrote: > The leak is definitely not related to mkfs. At the moment, my system has > been up about 26 hours, and has generated 162 of these leaks without ever > doing a single mkfs. In addition, the box say idle for almost 12 of those > hours. That makes sense only if you are using ext4 that's doing discards/write_zero at runtime. Either way, can you please give the patch from Shaun a try? -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/block/blk-lib.c b/block/blk-lib.c index 23d7f301a196..3bf78b7b74cc 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -15,7 +15,7 @@ static struct bio *next_bio(struct bio *bio, int rw, unsigned int nr_pages, struct bio *new = bio_alloc(gfp, nr_pages); if (bio) { - bio_chain(bio, new); + bio_chain(new, bio); submit_bio(rw, bio); }