From: Zhang Jingwang <yyalone@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: soft lockup when leaf and node bigger than 4KB
Date: Mon, 12 Oct 2009 17:55:47 +0800 [thread overview]
Message-ID: <4486336c0910120255p6388cc5dl3bf7154a418d068e@mail.gmail.com> (raw)
I make a btrfs use 'mkfs.btrfs -m single -l 16384 -n 16384 /dev/xxx'.
After mount it, I run a test script to create lots of files, then soft
lockup occurs.
After digging into the source code, I think there is a problem with
bio->bi_end_io.
when a bio is done, end_io function is called, it does following things:
1: put the bio into async thread waiting for checksum. (end_workqueue_bio)
2: check whether the bio can be checksum-ed. If not, put it back to
wait queue.(end_workqueue_fn)
3: If it can be checksum-ed, call end_bio_extent_readpage().
4: checksum the extent, set_extent_uptodate() and set uptodate flag of
the pages belong to the bio.(end_bio_extent_readpage)
But when checking whether the bio can be checksum-ed in step 2, it
examine the extent_range_uptodate() and uptodate flag of these pages
which is set in step 4. So I think there will be a endless loop here.
When we say a page is uptodate, we means its checksum is correct, but
we must ensure that all of the pages belongs to a btree node is
uptodate in order to calculate its checksum. So it's a logical
paradox.
I am new to btrfs and there may be some mistake about this problem.
Any comment is welcome and thanks for your time!
--
Zhang Jingwang
National Research Centre for High Performance Computers
Institute of Computing Technology, Chinese Academy of Sciences
No. 6, South Kexueyuan Road, Haidian District
Beijing, China
next reply other threads:[~2009-10-12 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 9:55 Zhang Jingwang [this message]
2009-10-12 12:50 ` soft lockup when leaf and node bigger than 4KB Chris Mason
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=4486336c0910120255p6388cc5dl3bf7154a418d068e@mail.gmail.com \
--to=yyalone@gmail.com \
--cc=linux-btrfs@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