Re: [PATCH] zram-swap: enable swap discard

2020-06-25 Thread Rui Salvaterra
Hi, Emil, On Thu, 25 Jun 2020 at 13:57, Emil Muratov wrote: > > Could you, please, describe you test case scenarios and measurements > where you've hit memory waste for zram dev when swap shrinks? I don't have a specific procedure to test this, but I believe I showed you proof that it's a good i

Re: [PATCH] zram-swap: enable swap discard

2020-06-25 Thread Rui Salvaterra
Hi, Emil, On Thu, 25 Jun 2020 at 10:05, Emil Muratov wrote: > > Hmm... that looks weird at first, > I was checking kernel counters at /sys/block/zram0/io_stat, > which is zram device for swap. And if there was positive counter for > discards for zram device while swap was not sending any discards

Re: [PATCH] zram-swap: enable swap discard

2020-06-24 Thread Rui Salvaterra
Hi, Emil, On Wed, 24 Jun 2020 at 20:30, Emil Muratov wrote: > > zram swap discard is enabled by default, no need to specify additional > option. Pls, check for example info output in > https://github.com/openwrt/openwrt/pull/1515 Unfortunately, that's not quite right. This has nothing to do with

[PATCH] zram-swap: enable swap discard

2020-06-23 Thread Rui Salvaterra
Zram block devices have supported trim/discard for over six years, let's enable it. This allows the zram device to actually free up allocated memory when it's marked as unused in the filesystem metadata, as explained in more detail in the original commit message [1]. [1] https://git.kernel.org/pu