> > > One interesting data point would be to see what the cost is for > > > breaking this up into a loop where you only process some fixed > > > number of pages and running it with cond_resched() so you can avoid > introducing latency spikes. > > > > As per the patch above, it's not using kmap_atomic() and hence > > preemption & page_fault are not disabled. Do we still need to explicitly call > cond_resched() in this case? > > #justAsking > > Didn't see this answered on the list, but the answer is yes because the kernel > may not have CONFIG_PREEMPTION enabled. Ok. This is addressable. Prathu has already spin off v2. If at all there is any scope for spinning v3, this would be taken care. Thanks for the clarification.