Re: [PATCH 2/6] kill-the-BKL/reiserfs: release the write lock before rescheduling on do_journal_end()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> When do_journal_end() copies data to the journal blocks buffers in memory,
> it reschedules if needed between each block copied and dirtyfied.
> 
> We can also release the write lock at this rescheduling stage,
> like did the bkl implicitly.
> 
> [ Impact: release the reiserfs write lock when it is not needed ]
> 
> Cc: Jeff Mahoney <jeffm@xxxxxxxx>
> Cc: Chris Mason <chris.mason@xxxxxxxxxx>
> Cc: Alexander Beregalov <a.beregalov@xxxxxxxxx>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> ---
>  fs/reiserfs/journal.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
> index 7976d7d..373d080 100644
> --- a/fs/reiserfs/journal.c
> +++ b/fs/reiserfs/journal.c
> @@ -4232,7 +4232,9 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
>  		next = cn->next;
>  		free_cnode(sb, cn);
>  		cn = next;
> +		reiserfs_write_unlock(sb);
>  		cond_resched();
> +		reiserfs_write_lock(sb);

There's 8 cond_resched()'s in the code - i'd suggest to introduce a 
helper for this - reiserfs_write_cond_resched(sb) or so?

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux