Re:Re: [PATCH v2] dm-crypt: refactor buffer allocation retry handling
Runyu Xiao <[email protected]>
| Newsgroups | dev.linux.lists.dm-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <AKUAOgCbKob6dT5QSeghvqqJ.3.1786457290705.Hmail.220255722@seu.edu.cn> |
Hi Mikulas, Thanks for reviewing this. I initially interpreted the goto retry path as being reachable after bio_alloc_lock was acquired. After rechecking mempool_alloc() in v6.1.66, I found that it returns NULL only without __GFP_DIRECT_RECLAIM. With that flag set, it waits and retries when the pool is empty. The first allocation failure happens before bio_alloc_lock is acquired, while the later allocation is performed with the mutex held and does not take the NULL retry path in normal process context. Therefore, I cannot justify the suspected double acquisition, and the refactoring provides no functional benefit. I will drop this patch. Regards, Runyu