On Sat, Feb 22, 2025 at 08:13:13PM +1300, Barry Song wrote: > On Sat, Feb 22, 2025 at 7:52 PM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > > > > On Sat, Feb 22, 2025 at 07:41:54PM +1300, Barry Song wrote: > > > > > > probably no, as an incompressible page might become compressible > > > after changing an algorithm. This is possible, users may swith an > > > algorithm to compress an incompressible page in the background. > > > > I don't understand the difference. If something is wrong with > > the system causing the compression algorithm to fail, shouldn't > > zswap just hobble along as if the page was incompressible? > > > > In fact it would be quite reasonble to try to recompress it if > > the admin did change the algorithm later because the error may > > have been specific to the previous algorithm implementation. > > > > Somehow, I find your comment reasonable. Another point I want > to mention is the semantic difference. For example, in a system > with only one algorithm, a dst_buf overflow still means a successful > swap-out. However, other errors actually indicate an I/O failure. > In such cases, vmscan.c will log the relevant error in pageout() to > notify the user. > > Anyway, I'm not an authority on this, so I’d like to see comments > from Minchan, Sergey, and Yosry.