linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kailas Joshi <kailas.joshi@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Jiaying Zhang <jiayingz@google.com>
Subject: Re: Help on Implementation of EXT3 type Ordered Mode in EXT4
Date: Sat, 13 Feb 2010 14:13:17 +0530	[thread overview]
Message-ID: <38f6fb7d1002130043s54e61e74jcc3297aeeac294b0@mail.gmail.com> (raw)
In-Reply-To: <20100212200726.GD5337@thunk.org>

On 13 February 2010 01:37,  <tytso@mit.edu> wrote:
> On Fri, Feb 12, 2010 at 08:52:15AM +0530, Kailas Joshi wrote:
>> Won't this get fixed by performing early reservations as mentioned in
>> my scheme? We are reserving required credits in the path of write
>> system call and these will be kept reserved until transaction commit.
>> So, the journal space for allocation at commit will be guaranteed.
>
> Yes, if you account for these separately.  One challenge is
> over-estimating the needed credits will be tricky.  If we go down this
> path, be sure that the bonnie style write(fd, &ch, 1) in a tight loop
> doesn't end up reserving a separate set of credits for each write
> system call to the same block.  (It can be done; if the DA block is
> already instantiated, you can assume that credits have already been
> reserved.)
Okay

>> Sorry, I didn't understand why processes need to be suspended.
>> In my scheme, I am issuing magic handle only after locking the current
>> transaction.  AFAIK after the transaction is locked, it can receive the
>> block journaling requests for already created handles(in our case, for
>> already reserved journal space), and the new concurrent requests for
>> journal_start() will go to the new current transaction. Since, the
>> credits for locked transaction are fixed (by means of early
>> reservations) we can know whether journal has enough space for the new
>> journal_start(). So, as long as journal has enough space available,
>> new processes need now be stalled.
>
> But while you are modifying blocks that need to go into the journal
> via the locked (old) transaction, it's not safe to start a new
> transaction and start issuing handles against the new transaction.
>
> Just to give one example, suppose we need to update the extent
> allocation tree for an inode in the locked/committing transaction as
> the delayed allocation blocks are being resolved --- and in another
> process, that inode is getting truncated or unlinked, which also needs
> to modify the extent allocation tree?  Hilarty ensues, unless you use
> a block all attempts to create a new handle (practically speaking, by
> blocking all attempts to start a new transaction), until this new
> delayed allocation resolution phase which you have proposed is
> complete.
Okay. So, basically process stalling is unavoidable as we cannot
modify a buffer data in past transaction after it has been modified in
current transaction.
Can we restrict the scope for this blocking? Blocking on
journal_start() will block all processes even though they are
operating on mutually exclusive sets of metadata buffers. Can we
restrict this blocking to allocation/deallocation paths by blocking in
get_write_access() on specific cases(some condition on buffer)? This
way, since all files will use commit-time allocation, very few(sync
and direct-io mode) file operations will be stalled.

I am not sure whether this is feasible or not. Please let me know more on this.

Thanks & Regards,
Kailas
--
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

  reply	other threads:[~2010-02-13  8:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  5:45 Help on Implementation of EXT3 type Ordered Mode in EXT4 Kailas Joshi
2010-02-09 16:05 ` Jan Kara
2010-02-09 17:41   ` tytso
     [not found]     ` <38f6fb7d1002102301x278c3ddt153f570dd1423074@mail.gmail.com>
2010-02-11  7:32       ` Kailas Joshi
2010-02-11 19:56         ` tytso
2010-02-12  3:22           ` Kailas Joshi
2010-02-12 20:07             ` tytso
2010-02-13  8:43               ` Kailas Joshi [this message]
2010-02-15 15:00                 ` Jan Kara
2010-02-16 10:10                   ` Kailas Joshi
2010-02-16 13:10                     ` Jan Kara
2010-02-16 14:18                       ` tytso
2010-02-17 15:37                         ` Kailas Joshi
     [not found]                           ` <38f6fb7d1003182023j5513640csdc797adb49393ea0@mail.gmail.com>
2010-03-22 16:52                             ` Jan Kara
2010-03-23 10:41                               ` Kailas Joshi
2010-03-29 15:45                                 ` Jan Kara
2010-04-17  4:42                                   ` Kailas Joshi

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=38f6fb7d1002130043s54e61e74jcc3297aeeac294b0@mail.gmail.com \
    --to=kailas.joshi@gmail.com \
    --cc=jack@suse.cz \
    --cc=jiayingz@google.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).