On Tue, May 28, 2024 at 12:44:19PM +0200, Zaslonko Mikhail wrote: > > But I'm still wondering if we do not go 4 pages as buffer, how much > > performance penalty would there be? > > > > One of the objective is to prepare for the incoming sector perfect > > subpage compression support, thus I'm re-checking the existing > > compression code, preparing to change them to be subpage compatible. > > > > If we can simplify the behavior without too large performance penalty, > > can we consider just using one single page as buffer? > > Based on my earlier estimates, bigger buffer provided up to 60% performance for inflate and up to 30% for > deflate on s390 with dfltcc support. > I don't think giving it away for simplification would be a good idea. 60% and 30% sound like significant gain, I agree this takes precedence over code simplification. Eventually the s390 optimized case can be moved to a separate function if the conditions are satisfied so it's not mixed with the page-by-page code.