> But could we just apply your patch only to the dsunit>=chunksize
> case to fulfill your exist use case? I mean we still ignore
> `dsunit` if dsunit!=chunksize and warn out users explicitly (
> `dsunit` doesn't work due to dsunit!=chunksize).

Agree.
I will update patch.


________________________________________
From: Gao Xiang <hsiang...@linux.alibaba.com>
Sent: Thursday, August 21, 2025 18:03
To: Su, Friendy; linux-erofs@lists.ozlabs.org
Cc: Mo, Yuezhang; Palmer, Daniel (SGC)
Subject: Re: [PATCH v1] erofs-utils: mkfs: Implement 'dsunit' alignment on 
blobdev

On 2025/8/21 17: 36, Friendy. Su@ sony. com wrote: > Hi, Gao, > >> But if there 
is some deduplciated chunks in the logical dsunit >> boundary, don't align it 
at all since there is no real benefit. >> Although I'm still not




On 2025/8/21 17:36, friendy...@sony.com wrote:
> Hi, Gao,
>
>> But if there is some deduplciated chunks in the logical dsunit
>> boundary, don't align it at all since there is no real benefit.
>> Although I'm still not sure what's the default behavior of `dsunit`
>> for chunks.
>
> Exactly, if `--chunksize=4096 --dsunit=512`, any 4K deduplicated will cause 
> PMD map failure.  Can we consider the following countermeasure as default 
> behavior:
>
> 1. In man page, describe 'chunksize' and 'dsunit' should be collaborated to 
> achieve the best performance.

Agreed, we should mention that in the manpage:

>
> 2. At runtime, if chunksize < dsunit,
>    prompt alert message, tell user it is better set chunksize=dsunit. But 
> still format with user set options.
>    The benefit is user can still set as desired. Current, for the use cases 
> we can imagine, chunksize=dsunit is best. But maybe users have their own use 
> cases, it is better let users do what they really wanted.

But could we just apply your patch only to the dsunit>=chunksize
case to fulfill your exist use case? I mean we still ignore
`dsunit` if dsunit!=chunksize and warn out users explicitly (
`dsunit` doesn't work due to dsunit!=chunksize).

I really need to think about chunksize != dsunit cases, but
since you don't have such urgent need, let's keep the old `ignore`
behavior for now...

Thanks,
Gao XIang

>
>
> If mkfs.erofs force to align every 2M, even there is only 4K not deduplicated 
> in 2M, the 4K actually still occupies 2M.
> 0, 2M(only 4K data new, others all deduplicated), 4M........
> Space usage efficiency is same as chunksize=dsunit=2M.
>
>
> Best Regards
> Friendy
>


Reply via email to