xfs
[Top] [All Lists]

RE: [PATCH 4/5] xfs: xfs_inode_free() isn't RCU safe

To: <xfs@xxxxxxxxxxx>
Subject: RE: [PATCH 4/5] xfs: xfs_inode_free() isn't RCU safe
From: "Alex Lyakas" <alex@xxxxxxxxxxxxxxxxx>
Date: Tue, 12 Apr 2016 11:56:35 +0300
Cc: <david@xxxxxxxxxxxxx>, <bbice@xxxxxxx>, "Shyam Kaushik" <shyam@xxxxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zadarastorage-com.20150623.gappssmtp.com; s=20150623; h=message-id:from:to:cc:subject:date:mime-version:importance; bh=IAHHqV+d4vgylOHmJwDQBd1WBTE86HeRfS7Zc/3en8s=; b=CyVdSuQRR22zNtmqw2uxrI2/p/s/7DiMbeeA1ftxe4n2h20h/0k4fz3yvQtCFIxmdE tGQiT57juWf+nROYCprODObagWJCQfb5MQtb1BsUQNI2VOBTkHRmQJbcugmiJX9V9w9k xvN2ahBeC8Fhs9Wn/wPJziJjBKuOWqeMMYTlO1NwA/lvnUVD77bq1AxqmRTxvCgGyhGu uBYHBuOeUapv2o2J2EaSvdPL5yXK0mo4gSgEJAqIQ55knU7vE0m7GQNYu9wf+T7m9q3q 0hLwnXO7prx6GG7/AbJvcJetf3depAqnfAExX2j7bOwUVU3lRw9Gz8DY+FLwJ1uXrxrG HJEg==
Importance: Normal
Hello Dave,
 
Looking at the patch, I see that now we call xfs_idestroy_fork() in RCU callback. This can do the following chain:
 
xfs_iext_destroy => xfs_iext_irec_remove => xfs_iext_realloc_indirect=> kmem_realloc => kmem_alloc => kmem_alloc => congestion_wait()
 
At least according to documentation, the RCU callback cannot block, since it may be called from softirq context. Is this fine?
 
Thanks,
Alex.
 
P.S.: I have submitted a patch called â[PATCH] xfs: optimize destruction of the indirection arrayâ, which changes xfs_iext_destroy to call only kmem_free(). But this patch got stuck in the spam filter of the mailing list, and Brent is working to release it from there.
 
 
 
<Prev in Thread] Current Thread [Next in Thread>