Commit 49f19710512c825aaea73b9207b3a848027cda1d hints at thecurrent solution not being the final one, yet the advertised (for 2.6.22)change apparently never happened. However, it seems to me thatflushing a potentially huge (it terms of time to completion) batchasynchronously is no really good idea. Instead, I'd think that adding tothe batch should be prevented in asynchronous contexts altogether, orthings should properly nest. As a positive side effect, disabling interruptsin the batch handling - in particular around the submission of the batch -could also be avoided, reducing interrupt latency (perhaps significantlyin some case).

Likewise I would think that the flush out of vmalloc_sync_one() isn'tappropriate, and it should rather be avoided for the set_pmd() there toget into the batching code altogether.

(Background to this: After adding lazy mmu mode support in our forwardported tree, we've actually been hit by these calls out of kmap_...(), asoriginally I didn't pay much attention to these and didn't care to synchronizebatch addition and flushing with asynchronous operations.)