On 5/18/22 4:50 AM, Hao Xu wrote: >> This is known at compile time, so the compiler should already be doing >> that as it's a constant. >> >>>> + buf = page_address(bl->buf_pages[index]); >>>> + buf += off; >>>> + } >>> >>> I'm not familiar with this part, allow me to ask, is this if else >>> statement for efficiency? why choose one page as the dividing line >> >> We need to index at the right page granularity. > > Sorry, I didn't get it, why can't we just do buf = &br->bufs[tail]; > It seems something is beyond my knowledge.. The pages might not be contigious, we have to index from the right page. -- Jens Axboe