Re: [PATCH] erofs: remove erofs_dev_context->rwsem
xtex <[email protected]>
| Newsgroups | org.ozlabs.lists.linux-erofs,org.kernel.vger.linux-kernel |
|---|---|
| Organization | AstraFall |
| Message-ID | <[email protected]> |
Hi, On Sunday, August 16, 2026 11:06:05 AM China Standard Time Gao Xiang wrote: > Hi Bingwu, > > On Sun, Aug 16, 2026 at 10:00:12AM +0800, Bingwu Zhang wrote: > > From: Bingwu Zhang <[email protected]> > > > > devs->tree is only modified in initialization and > > destruction code paths and will never be concurrent > > with data reading. Thus there is no need to guard > > idr_alloc/idr_find with a rwsem. > > Thanks for the patch. > > In principle, yes, but it's also no problem to leave it as-is in case > some use cases later need adjust the device_info of a dev for example > at runtime. > > Or if it causes any noticeable performance penalty, that will be one > reason to drop it now. Thanks for the reply. I don't think it caused any notice performance difference so it looks good to me to keep the rwsem. Thanks, Bingwu Zhang > > Thanks, > Gao Xiang > > > Signed-off-by: Bingwu Zhang <[email protected]>