From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755573AbcFQM2W (ORCPT ); Fri, 17 Jun 2016 08:28:22 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:34553 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbcFQM2T (ORCPT ); Fri, 17 Jun 2016 08:28:19 -0400 Subject: Re: [PATCH] zram: update zram to use zpool To: Vitaly Wool , Minchan Kim References: <20160615231732.GJ17127@bbox> Cc: Geliang Tang , Nitin Gupta , Sergey Senozhatsky , Dan Streetman , LKML , Linux-MM From: "Austin S. Hemmelgarn" Message-ID: <8ffd0aab-1adb-17a9-3055-ad60c31f8eb6@gmail.com> Date: Fri, 17 Jun 2016 08:28:14 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-06-17 04:30, Vitaly Wool wrote: > Hi Minchan, > > On Thu, Jun 16, 2016 at 1:17 AM, Minchan Kim wrote: >> On Wed, Jun 15, 2016 at 10:42:07PM +0800, Geliang Tang wrote: >>> Change zram to use the zpool api instead of directly using zsmalloc. >>> The zpool api doesn't have zs_compact() and zs_pool_stats() functions. >>> I did the following two things to fix it. >>> 1) I replace zs_compact() with zpool_shrink(), use zpool_shrink() to >>> call zs_compact() in zsmalloc. >>> 2) The 'pages_compacted' attribute is showed in zram by calling >>> zs_pool_stats(). So in order not to call zs_pool_state() I move the >>> attribute to zsmalloc. >>> >>> Signed-off-by: Geliang Tang >> >> NACK. >> >> I already explained why. >> http://lkml.kernel.org/r/20160609013411.GA29779@bbox > > This is a fair statement, to a certain extent. I'll let Geliang speak > for himself but I am personally interested in this zram extension > because I want it to work on MMU-less systems. zsmalloc can not handle > that, so I want to be able to use zram over z3fold. I concur with this. It's also worth pointing out that people can and do use zram for things other than swap, so the assumption that zswap is a viable alternative is not universally correct. In my case for example, I use it on a VM host for temporary storage for transient SSI VM's. Making it more deterministic would be seriously helpful in this case, as it would mean I can more precisely provision resources on this particular system, and could better account for latencies in the testing these transient VM's are used for.