gsmiller commented on PR #16145:
URL: https://github.com/apache/lucene/pull/16145#issuecomment-6227349071

   I've been trying to catch up on the conversation here, and I wonder if 
there's a relatively simple solution that would get this PR to a point it could 
be merged (and then potentially iterated on). What if we initialize 
`consecutiveHits` to `N - 1`? With this setup, we'd always probe on the first 
prefetch. If the page is hot, we immediately cut over to a "sampling mode" 
(i.e., probe every 64). If it's cold, `consecutiveHits` drops to zero 
immediately and has to pass the existing 1024 bar to gain confidence in moving 
to "sampling mode."
   
   For a warm file, we bypass the overhead of 1024 probes. For a cold, or mixed 
warm/code file, we will likely drop `consecutiveHits` to zero on that first 
prefetch and it will essentially stay under the 1024 bar as long as the file 
stays cold/mixed.
   
   Did we try this already? Apologies if we need. I wonder if it's a "good 
enough" version of this that could be merged? Thoughts? Hopefully this is a 
useful comment and not creating churn :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to