From: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
To: Theodore Tso <tytso@mit.edu>
Cc: aneesh.kumar@linux.vnet.ibm.com, balbir@linux.vnet.ibm.com,
linux-ext4@vger.kernel.org
Subject: Re: [BUG][PATCH 1/4] ext3: fix a cause of __schedule_bug via blkdev_releasepage
Date: Mon, 15 Dec 2008 11:21:59 +0900 [thread overview]
Message-ID: <4945BF47.5090508@jp.fujitsu.com> (raw)
In-Reply-To: <20081212062148.GJ10890@mit.edu>
Ted-san,
Theodore Tso wrote:
> On Fri, Dec 12, 2008 at 09:54:18AM +0900, Toshiyuki Okajima wrote:
> > > To tell the truth, at first, I imagined the same patch as yours to fix this
> > > problem. But I have made another patch because I thought that ext3(or ext4)
> > > should not know the contents of the processing of journal_try_to_free_buffers
> > > in detail. (ext3 should not know there is a possibility to call
> > > journal_wait_for_transaction_sync_data from journal_try_to_free_buffers.)
>
> I agree, but ext3 doesn't need to know that. What my change did was
> to mask off the _GFP_WAIT flag, which prohibits the function it calls
> from blocking, because it knows that its caller is holding a spinlock.
>
> And actually, come to think of it. We can do even better; the right
> fix is to have blkdev_releasepage() mask off the _GFP_WAIT flag; this
> is the function which is taking spinlock, and by masking off the
> __GFP_WAIT flag, this is simply requesting all of the downstream
> functions not to block, but to do the best job they can do without
> blocking. It doesn't need to know whether it's going to call
> log_wait_commit(), or anything else; all it needs to do is request
> "please don't block".
> That means we only make the request once, in the function which is
> taking spinlock, so all of the per-filesystem implementations of
> release_metadata() don't need to know that its caller is holding a
> spinlock.
OK. I agree your last change.
I also think blkdev_releasepage must do something so that downstream
functions of it don't sleep. Masking off the _GFP_WAIT flag is the
easiest achievement of it.
Besides, I think it is not valid implementation that brings us a care
about ei->client_releasepage's sleeping.
Additional Information:
I did an easy test with your last change and then I haven't experienced
any errors.
Regards,
Toshiyuki Okajima
prev parent reply other threads:[~2008-12-15 2:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 11:06 [BUG][PATCH 1/4] ext3: fix a cause of __schedule_bug via blkdev_releasepage Toshiyuki Okajima
2008-12-08 14:01 ` Theodore Tso
2008-12-08 14:06 ` [PATCH -V2] ext3: provide function to release metadata pages under memory pressure Theodore Ts'o
2008-12-08 14:06 ` [PATCH -V2] ext4: " Theodore Ts'o
2008-12-12 0:54 ` [BUG][PATCH 1/4] ext3: fix a cause of __schedule_bug via blkdev_releasepage Toshiyuki Okajima
2008-12-12 6:21 ` Theodore Tso
2008-12-12 17:52 ` [PATCH -v3] vfs: add releasepages hooks to block devices which can be used by file systems Theodore Ts'o
2008-12-12 17:52 ` [PATCH -v3] ext3: provide function to release metadata pages under memory pressure Theodore Ts'o
2008-12-12 17:52 ` [PATCH -v3] ext4: " Theodore Ts'o
2008-12-17 15:39 ` [PATCH -v3] vfs: add releasepages hooks to block devices which can be used by file systems Jan Kara
2008-12-18 5:15 ` Toshiyuki Okajima
2008-12-18 13:12 ` Jan Kara
2008-12-18 14:54 ` Theodore Tso
2008-12-18 16:38 ` Jan Kara
2008-12-19 5:15 ` Toshiyuki Okajima
2008-12-26 5:01 ` Al Viro
2009-01-03 15:09 ` Theodore Ts'o
2009-01-03 15:09 ` [PATCH 1/3] add releasepage " Theodore Ts'o
2009-01-03 15:09 ` [PATCH 2/3] ext3: provide function to release metadata pages under memory pressure Theodore Ts'o
2009-01-03 15:09 ` [PATCH 3/3] ext4: " Theodore Ts'o
2009-01-05 8:16 ` [PATCH 1/3] add releasepage hooks to block devices which can be used by file systems Toshiyuki Okajima
2009-01-05 16:05 ` Theodore Tso
2009-01-06 4:07 ` Toshiyuki Okajima
2009-01-06 4:29 ` Theodore Tso
2008-12-15 2:21 ` Toshiyuki Okajima [this message]
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=4945BF47.5090508@jp.fujitsu.com \
--to=toshi.okajima@jp.fujitsu.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).