Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225582

Re: [PATCH v2] zram: introduce comp algorithm fallback functionality

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Minchan Kim <minchan@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] zram: introduce comp algorithm fallback functionality
Date Wed, 16 Sep 2015 01:30:02 +0200
Message-ID <q97PI-3EC-1@gated-at.bofh.it> (permalink)
References <q6w7U-4dc-21@gated-at.bofh.it> <q72hr-bR-5@gated-at.bofh.it> <q97wm-3i4-19@gated-at.bofh.it>
X-Original-To Andrew Morton <akpm@linux-foundation.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Is2lZnNfmDlCdRwSEU5qEg7XPQRjWEUGhh/61KldBD0=; b=jsYuaqlEKOXyn7/PhJ5JR91AQ8YBsoZtcRg1bgoOIm0v3IL4TJQ2IqUnknhkIFMdPu M9oP8Ewios5rpaPxPIlj6WSwAu08Z/PiKhTvu7doiNhkVuAngqjJoc4njqDEGFESdU/I +3XW8LKJDcRFZA1iQX9ounIYAk34ljCOuvy4MF3rcOpPAwtkJt6f1wkSlMYk/SY5AvpQ 5dXibs2MoxHLBTs3RYqDdwwATl6vOBMvE7idYPfsZgJMHR7uKQkyOxeYWQjKXU27k9Nk KDkKdKq7nMSiMqO9ygwhEMxJuCaGM1+Vu2mr3MOJUWuK7+HqyLdE2HGlpkb1+ZHlqcw+ qSiQ==
X-Received by 10.66.62.197 with SMTP id a5mr13569058pas.73.1442359701543; Tue, 15 Sep 2015 16:28:21 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc Luis Henriques <luis.henriques@canonical.com>, Nitin Gupta <ngupta@vflare.org>, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, linux-kernel@vger.kernel.org
X-Original-Date Wed, 16 Sep 2015 08:29:28 +0900
X-Original-Message-ID <20150915232928.GA18206@bbox>
X-Original-References <1441737776-25280-1-git-send-email-luis.henriques@canonical.com> <20150910050351.GB9562@bbox> <20150915160700.3556a32f450a3319750c4271@linux-foundation.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1225582

Show key headers only | View raw


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 <minchan@kernel.org> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] zram: introduce comp algorithm fallback functionality Luis Henriques <luis.henriques@canonical.com> - 2015-09-08 20:50 +0200
  Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-09 02:50 +0200
  Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Minchan Kim <minchan@kernel.org> - 2015-09-10 07:10 +0200
    Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-10 07:40 +0200
      Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Minchan Kim <minchan@kernel.org> - 2015-09-10 08:00 +0200
    Re: [PATCH v2] zram: introduce comp algorithm fallback  functionality Andrew Morton <akpm@linux-foundation.org> - 2015-09-16 01:10 +0200
      Re: [PATCH v2] zram: introduce comp algorithm fallback functionality Minchan Kim <minchan@kernel.org> - 2015-09-16 01:30 +0200

csiph-web