linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Manish Katiyar <mkatiyar@gmail.com>,
	linux-ext4@vger.kernel.org, mfasheh@suse.com, jlbec@evilplan.org
Subject: Re: [PATCH v2 2/3] jbd2: Add extra parameter in start_this_handle() to control allocation flags.
Date: Sun, 5 Jun 2011 23:21:13 -0400	[thread overview]
Message-ID: <20110606032113.GC7180@thunk.org> (raw)
In-Reply-To: <20110602095424.GA5718@quack.suse.cz>

On Thu, Jun 02, 2011 at 11:54:24AM +0200, Jan Kara wrote:
>   What happens is that direct reclaim sometimes does
> wait_on_page_writeback() (e.g. shrink_page_list()) or it explicitely waits
> for NR_WRITEBACK statistics to go below some threshold
> (throttle_vm_writeout()). And that is deadlockable if we hold i_mutex while
> doing this because we may need i_mutex to actually move the page from
> PageWriteback state...

We don't actully call set_page_writeback() until right before we
submit the page for writeback.  And we convert the unwritten extents
in a workqueue, which gets submitted after we call
end_page_writeback().  So I'm still not seeing a problem; sorry if I'm
being dense!

			    	      	  - Ted

> As I'm saying this, I've realized ext4 has this problem also with
> stable-pages patches because there we can wait for PageWriteback in
> grab_cache_page_write_begin() when we also hold i_mutex. So I think we'll
> have to come up with a way to convert unwritten extents without having to
> hold i_mutex. That's going to be interesting.
> 
> 								Honza
> -- 
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-06-06  3:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28  6:16 [PATCH v2 1/3] ext4: Fix missing acl release in error path in acl.c Manish Katiyar
2011-05-28  6:20 ` [PATCH v2 2/3] jbd2: Add extra parameter in start_this_handle() to control allocation flags Manish Katiyar
2011-05-31 11:22   ` Jan Kara
2011-05-31 22:27     ` Ted Ts'o
2011-06-02  9:54       ` Jan Kara
2011-06-06  0:12         ` Manish Katiyar
2011-06-06  3:21         ` Ted Ts'o [this message]
2011-06-08 14:10           ` Ted Ts'o
2011-06-17  6:32             ` Manish Katiyar
2011-06-20 14:32               ` Jan Kara
2011-06-20 14:40                 ` Manish Katiyar
2011-06-20 17:57                   ` Ted Ts'o
2011-06-20 18:08                     ` Manish Katiyar
2011-05-28  6:21 ` [PATCH v2 3/3] ext4: Fix ext4 to use pass jbd allocation flags if they can handle ENOMEM Manish Katiyar
2011-05-31 12:10   ` Jan Kara

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=20110606032113.GC7180@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=jlbec@evilplan.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=mkatiyar@gmail.com \
    /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).