From: Marc MERLIN <marc@merlins.org>
To: Eric Wheeler <bcache@lists.ewheeler.net>
Cc: linux-bcache@vger.kernel.org, kent.overstreet@gmail.com
Subject: Re: Bcache still unstable for me (memory problems)
Date: Tue, 8 Mar 2016 15:52:52 -0800 [thread overview]
Message-ID: <20160308235252.GB27437@merlins.org> (raw)
In-Reply-To: <alpine.LRH.2.11.1603072014250.11530@mail.ewheeler.net> <alpine.LRH.2.11.1603071926171.11530@mail.ewheeler.net>
On Mon, Mar 07, 2016 at 07:56:56PM +0000, Eric Wheeler wrote:
> Strange about memory allocation issues. Do you have
> /proc/sys/vm/min_free_kbytes set to something like $((256*1024)) ? Is this
> a multi-socket machine with all memory plugged into only one CPU?
gargamel:/mnt/mnt# cat /proc/sys/vm/min_free_kbytes
19712
Should I change it?
> I'm curious though, why was registration called a second time? Was the
> drive external? Could udev be re-registering the device?
Yeah, this puzzled me.
The filesystem was already mounted, I made a long copy via btrfs send,
it failed before the end, I came back a day or so later, so the copy
failed, restarted it, and then the kernel crashed.
It seems that accessing the filesystem (that was already mounted) caused
bcache to register the cache device then?
I have no idea why though.
This is kind of weird:
[ 86.612756] bcache: register_bdev() registered backing device md5
[ 102.097299] bcache: bch_journal_replay() journal replay done, 41 keys in 4 entries, seq 22200
[ 102.124135] bcache: register_cache() registered cache device dm-4
[ 102.151653] bcache: register_bdev() registered backing device dm-1
[ 102.221977] bcache: bch_cached_dev_attach() Caching dm-1 as bcache1 on set 0226553a-37cf-41d5-b3ce-8b1e944543a8
[ 102.253183] bcache: register_bcache() error opening /dev/md5: device already registered
[86240.547242] bcache: bch_journal_replay() journal replay done, 0 keys in 2 entries, seq 215862
[86242.109874] bcache: bch_cached_dev_attach() Caching md5 as bcache0 on set 5bc072a8-ab17-446d-9744-e247949913c1
[86242.141648] bcache: register_cache() registered cache device sdh2
[86253.186416] bcache: register_bcache() error opening /dev/sdh2: device already registered
So clearly on this boot too, it got registered late (20h-ish after boot)
> You might find where the registration is being done and prevent it from
> running automatically. At least that might solve the re-registration
> problem.
Right.
> As for the memory allocation issue, the backtrace indicates that this is a
> registration-time problem, not a runtime issue. I'm guessing it is one of
> the threads attempting to proceed after a memory allocation error similar
> to the writeback thread issue you had last time which was fixed by adding
> some locking around the initialization.
Makes snese.
On Mon, Mar 07, 2016 at 08:35:00PM +0000, Eric Wheeler wrote:
> Looking at the stack trace, bch_cache_set_alloc() appears to fail doing a
> kzalloc() and returns NULL. This causes register_cache_set() to return
> "cannot allocate memory" but that error path isn't handled without my
> upstream commit that went to Jens.
>
> Marc,
>
> Do you have this patch?
> https://bitbucket.org/ewheelerinc/linux/commits/a7044848050ac60e178798d20ea8a3ef2be36bc7?at=master
I got the other patches you sent me last time, but didn't end up with
this one, sorry if you sent it to me and I dropped it.
I'll apply it now, thanks.
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
next prev parent reply other threads:[~2016-03-08 23:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 14:45 Bcache still unstable for me (memory problems) Marc MERLIN
2016-03-07 19:56 ` Eric Wheeler
2016-03-07 20:35 ` [PATCH] " Eric Wheeler
2016-03-08 23:52 ` Marc MERLIN [this message]
2016-03-09 3:59 ` Eric Wheeler
2016-03-09 20:55 ` Marc MERLIN
-- strict thread matches above, loose matches on Subject: below --
2016-03-08 23:04 Richard Bade
2016-03-09 3:51 ` Eric Wheeler
2016-03-10 1:34 ` Eric Wheeler
2016-03-10 2:15 ` Marc MERLIN
2016-03-10 15:29 ` Marc MERLIN
2016-03-10 15:41 ` Christoph Nelles
2016-03-10 15:47 ` Marc MERLIN
2016-03-24 21:25 ` Marc MERLIN
2016-03-25 3:52 ` Eric Wheeler
2016-03-21 0:05 ` Richard Bade
2016-03-21 0:46 ` Marc MERLIN
2016-03-21 0:52 ` Richard Bade
2016-03-25 3:59 ` Eric Wheeler
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=20160308235252.GB27437@merlins.org \
--to=marc@merlins.org \
--cc=bcache@lists.ewheeler.net \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.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 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).