On Fri, Mar 18, 2022 at 12:51:14PM -0400, Brian Geffon wrote: > On Fri, Mar 18, 2022 at 12:41 PM Minchan Kim <minchan@xxxxxxxxxx> wrote: > > > > On Tue, Mar 15, 2022 at 10:22:21AM -0700, Brian Geffon wrote: > > > Today it's only possible to write back as a page, idle, or huge. > > > A user might want to writeback pages which are huge and idle first > > > as these idle pages do not require decompression and make a good > > > first pass for writeback. > > > > Hi Brian, > > > > I am not sure how much the decompression overhead matter for idle pages > > writeback since it's already *very slow* path in zram but I agree that > > it would be a good first pass since the memory saving for huge writing > > would be cost efficient. > > > > Just out of curiosity. Do you have real usecase? > > Hi Minchan, > Thank you for taking a look. When we are thinking about writeback > we're trying to be very sensitive to our devices storage endurance, > for this reason we will have a fairly conservative writeback limit. > Given that, we want to make sure we're maximizing what lands on disk > while still minimizing the refault time. We could take the approach > where we always writeback huge pages but then we may result in very > quick refaults which would be a huge waste of time. So idle writeback > is a must for us and being able to writeback the pages which have > maximum value (huge) would be very useful. Thanks for sharing the thought. It really make sense to me and would be great if it goes on the description.