Re: [PATCH 1/2] btrfs: reada: limit max works count

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

 



On Wed, Jan 20, 2016 at 10:16:27AM -0500, Chris Mason wrote:
> On Tue, Jan 12, 2016 at 03:46:26PM +0800, Zhao Lei wrote:
> > reada create 2 works for each level of tree in recursion.
> > 
> > In case of a tree having many levels, the number of created works
> > is 2^level_of_tree.
> > Actually we don't need so many works in parallel, this patch limit
> > max works to BTRFS_MAX_MIRRORS * 2.
> 
> Hi,
> 
> I don't think you end up calling atomic_dec() for every time that
> reada_start_machine() is called.  Also, I'd rather not have a global
> static variable to limit the parallel workers, when we have more than
> one FS mounted it'll end up limiting things too much.
> 
> With this patch applied, I'm seeing deadlocks during btrfs/066.    You
> have to run the scrub tests as well, basically we're just getting
> fsstress run alongside scrub.
> 
> I'll run a few more times with it reverted to make sure, but I think
> it's the root cause.

I spoke too soon, it ended up deadlocking a few tests later.  Sorry for
now I'm pulling all the reada patches.  We'll sort out bug fixes vs
cleanups in later rcs.

With all of the reada patches removed, the deadlocks are gone.

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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux