On Fri, 2018-06-15 at 18:09 +0300, Michael S. Tsirkin wrote: > On Mon, Jun 11, 2018 at 11:18:57AM -0400, nilal@xxxxxxxxxx wrote: > > From: Nitesh Narayan Lal <nilal@xxxxxxxxxx> > > + write_seqlock(&guest_page_lock); > > + while (idx < MAX_FGPT_ENTRIES) { > > + unsigned long pfn = free_page_obj[idx].pfn; > > + unsigned long pfn_end = free_page_obj[idx].pfn + > > + free_page_obj[idx].pages - > > 1; > > + bool prev_free = false; > > + > > + while (pfn <= pfn_end) { > > It seems like this can be MAX_FGPT_ENTRIES^2 so 1000000 cycles in the > inner-most loop in the worst case, all with interrupts disabled and > all > kind of MM locks held. This kind of latency likely won't be > acceptable > to the MM crowd even if it only happens once in a while. That makes me wonder if instead of spending time making this code perfect, it would make time to also implement a prototype of your bitmap page hinting idea, and compare the two. This project is probably at the "50% effort" stage, and the bitmap page hinting approach seems like an interesting possible different tradeoff... -- All Rights Reversed.
Attachment:
signature.asc
Description: This is a digitally signed message part