Re: [PATCH v11 4/4] xfs: replace mrlock_t with rw_semaphores

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

 



On Mon, Oct 12, 2020 at 10:44:38PM +0200, Pavel Reichl wrote:
> 
> 
> On 10/12/20 6:04 PM, Brian Foster wrote:
> > ...
> >> @@ -2863,8 +2875,20 @@ xfs_btree_split(
> >>  	args.done = &done;
> >>  	args.kswapd = current_is_kswapd();
> >>  	INIT_WORK_ONSTACK(&args.work, xfs_btree_split_worker);
> >> +	/*
> >> +	 * Update lockdep's ownership information to reflect that we
> >> +	 * will be transferring the ilock from this thread to the
> >> +	 * worker.
> >> +	 */
> > 
> > Can we update this comment to explain why we need to do this? E.g., I'm
> > assuming there's a lockdep splat somewhere down in the split worker
> > without it, but it's not immediately clear where and so it might not be
> > obvious if we're ever able to remove this.
> 
> Hi, would something like this work for you?
> 
> 	/*
> +	 * Update lockdep's ownership information to reflect that we
> +	 * will be transferring the ilock from this thread to the
> +	 * worker (xfs_btree_split_worker() run via queue_work()).
> +	 * If the ownership transfer would not happen lockdep would
> +	 * assert in the worker thread because the ilock would be owned
> +	 * by the original thread.
> +	 */
> 

That doesn't really answer the question. Do you have a record of the
lockdep error message that occurs without this state transfer, by
chance?

Brian

> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux