Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-31 Thread Dongsheng Yang
在 8/1/2025 12:17 AM, Mikulas Patocka 写道: On Tue, 29 Jul 2025, Dongsheng Yang wrote: Just a suggestion for performance improvement: when you hold a spinlock a you need to allocate some memory, you must drop the spinlock, allocate it with GFP_NOIO, reacquire the spinlock and recheck the state.

Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-31 Thread Mikulas Patocka
On Tue, 29 Jul 2025, Dongsheng Yang wrote: > > > > Just a suggestion for performance improvement: when you hold a > > > > spinlock a you need to allocate some memory, you must drop the > > > > spinlock, allocate it with GFP_NOIO, reacquire the spinlock and > > > > recheck the state. You can

Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-29 Thread Dongsheng Yang
在 7/29/2025 5:23 AM, Mikulas Patocka 写道: Hi On Fri, 25 Jul 2025, Dongsheng Yang wrote: * get_n_vecs: what if "data" is not page-aligned? is that possible? Yes, it's possible, so I am using DIV_ROUND_UP() to calculate the n_vecs. DIV_ROUND_UP is not sufficient - suppose that "data" is 0xf00

Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-28 Thread Mikulas Patocka
Hi On Fri, 25 Jul 2025, Dongsheng Yang wrote: > > * get_n_vecs: what if "data" is not page-aligned? is that possible? > Yes, it's possible, so I am using DIV_ROUND_UP() to calculate the n_vecs. DIV_ROUND_UP is not sufficient - suppose that "data" is 0xf00 and "len" is 0x200. DIV_ROUND_UP(len, P

Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-24 Thread Dongsheng Yang
在 7/25/2025 12:48 AM, Mikulas Patocka 写道: On Tue, 15 Jul 2025, Dongsheng Yang wrote: Hi Mikulas, This is V4 for dm-pcache, please help to review. Hi The mempool operations seem ok. Here are some comments: * backing_req_cache and backing_bvec_cache should be static Thanx * get_

Re: [PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-24 Thread Mikulas Patocka
On Tue, 15 Jul 2025, Dongsheng Yang wrote: > Hi Mikulas, > This is V4 for dm-pcache, please help to review. Hi The mempool operations seem ok. Here are some comments: * backing_req_cache and backing_bvec_cache should be static * get_n_vecs: what if "data" is not page-aligned? is that

[PATCH v4 00/11] dm-pcache – persistent-memory cache for block devices

2025-07-15 Thread Dongsheng Yang
Hi Mikulas, This is V4 for dm-pcache, please help to review. Code: https://github.com/DataTravelGuide/linux tags/pcache_v4 Changelogs V4 from V3: - go back to use mempool for allocation of cache_key and backing_dev_req. - introduce backing_bvec_cache and ba