From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbbIOX2X (ORCPT ); Tue, 15 Sep 2015 19:28:23 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35474 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbbIOX2W (ORCPT ); Tue, 15 Sep 2015 19:28:22 -0400 Date: Wed, 16 Sep 2015 08:29:28 +0900 From: Minchan Kim To: Andrew Morton Cc: Luis Henriques , Nitin Gupta , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Message-ID: <20150915232928.GA18206@bbox> References: <1441737776-25280-1-git-send-email-luis.henriques@canonical.com> <20150910050351.GB9562@bbox> <20150915160700.3556a32f450a3319750c4271@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150915160700.3556a32f450a3319750c4271@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Andrew, On Tue, Sep 15, 2015 at 04:07:00PM -0700, Andrew Morton wrote: > On Thu, 10 Sep 2015 14:03:51 +0900 Minchan Kim wrote: > > > On Tue, Sep 08, 2015 at 07:42:56PM +0100, Luis Henriques wrote: > > > When the user supplies an unsupported compression algorithm, keep the > > > previously selected one (knowingly supported) or the default one (if the > > > compression algorithm hasn't been changed yet). > > > > > > Note that previously this operation (i.e. setting an invalid algorithm) > > > would result in no algorithm being selected, which means that this > > > represents a small change in the default behaviour. > > > > It seems it is hard for Andrew to parse so I will add more. > > Thanks ;) > > What's missing here is an understandable-by-andrew *reason* for the > patch. What's wrong with the old behaviour and why is the new > behaviour better? Oops, I said it in detail but it seems I got failed. For initializing zram, we need to set up 3 optional parameters in advance. 1. the number of compression streams 2. memory limitation 3. compression alrogithm Although user pass completely wrong value to set up for 1 and 2 parameters, it's okay because they have default value so zram will be initialized with the default value(Of course, when user pass wrong value via *echo*, sysfs returns -EINVAL so user can notice it). But 3 is not consistent with other optional parameters. IOW, If user pass wrong value to set up 3 parameter, zram's initialization would be failed unlike other optional parameters. So, this patch make them consistent.