On Sun, Mar 21, 2021 at 04:06:07PM +0800, Zhu Yanjun wrote: > > > > You are reporting 4k pages, if max_segment is larger than 4k there is > > > > no such thing as "too big" > > > > > > > > I assume it is "too small" because of some maths overflow. > > > > > > 459 while (n_pages && page_to_pfn(pages[0]) == paddr) { > > > 460 if (prv->length + PAGE_SIZE > > > > max_segment) <--it max_segment is big, n_pages is zero. > > > > What does n_pages have to do with max_segment? > > With the following snippet > " > struct ib_umem *region; > region = ib_umem_get(pd->device, start, len, access); > > page_size = ib_umem_find_best_pgsz(region, > SZ_4K | SZ_2M | SZ_1G, > virt); > " Can you please stop posting random bits of code that do nothing to answer the question? > IMHO, you can reproduce this problem in your local host. Uh, no, you need to communicate effectively or stop posting please. Jason