On Sat, Aug 10, 2024 at 11:11:07PM -0400, Waiman Long wrote:
That's why I was suggesting that you replace the division byUnless I'm missing something chunk_size cannot be zero before thechunk_size is initialized as
division because that's the first thing we check upon entry into
this function.
ps.chunk_size = job->size / (ps.nworks * load_balance_factor);
chunk_size will be 0 if job->size < (ps.nworks * load_balance_factor). If
min_chunk is 0, chunk_size will remain 0.
DIV_ROUND_UP. That should ensure that ps.chunk_size is not zero.