Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp230367iob; Mon, 2 May 2022 17:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+xGM2346MYG/9yRxja8sXHSM7J5OX0EMeTGJ43R2kPBL45XnKwvSqIm8jbyEQ+3tvZCFn X-Received: by 2002:a63:7457:0:b0:3ab:224c:fef4 with SMTP id e23-20020a637457000000b003ab224cfef4mr12085592pgn.149.1651539323791; Mon, 02 May 2022 17:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651539323; cv=none; d=google.com; s=arc-20160816; b=zviArwXcrH09Vno2+tPdID+pytf10Ntldc/PpXmCKPZsSNQzRXCi5xkzJltFzQxOx9 LaqTKhbrWmbgOMTpSGNU7nATiLXNxI49bAKAUjJ3tIVu8jz1DO8bQUe8g7e222s5jKgS Q1N92igfqP2h50iW1RkgAtmL7JPfT3O9WUOyHCKZVEuhduD1U6+BplEqEGejqC7BnBKG m2KfXn66D3kuGwNDG7intz3obH+tHbvN6Nt18ofYqopXFewVO5jUjDkCcP7R0Kb2MKbb rQRck408u3cJn7RfEmffFXC1h5Kv8Po5ms/SWGsuIZPvsuVyDn95scND70vQOOQRNX+U 0lfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=km1RYLI1CobmrVkQO++1orn+WmYu8I6YnJXKOV3FSOQ=; b=UeBipZKouqUsZPVNXZmDp9vw6fWH0uSihD8sCGFdzz68W05ujVPgnArwiYp5glfTfI 8Y+llFhgXHbpivjW/42pQJISV4TsJFvIWdZZr705DIMKalKIxd8N73gTIIEWaDeohy4N 61So3jPsBq8SUNomUnDVz/RzAd68eo7JyIvUBFXeZeDPQg9L/P9HkSDU6p9cAF5DJ3xt 5+9PCZPr76LC4uU0kHXelNOxOlZA+lAn4FIuj2IQ8UMQfh6sbRnOKYMEeb6mIqAeGMgH fGHP+HZKzDfjpOY5xySSBCeI0pkXxWay7NzEg8N9BjFdKdL0Ht+b/jodJLDEf07Vr156 B95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="dB62/6N/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w62-20020a638241000000b003ab5d468636si16615860pgd.548.2022.05.02.17.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="dB62/6N/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 316AD25D; Mon, 2 May 2022 17:41:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385624AbiEBSP1 (ORCPT + 99 others); Mon, 2 May 2022 14:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241230AbiEBSPZ (ORCPT ); Mon, 2 May 2022 14:15:25 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EC56DDC; Mon, 2 May 2022 11:11:55 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id e24so13331455pjt.2; Mon, 02 May 2022 11:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=km1RYLI1CobmrVkQO++1orn+WmYu8I6YnJXKOV3FSOQ=; b=dB62/6N/AupbAvnvnbYkc9o1gznuQKe5diiYys5TCW2fVoV0Z/PzlNNr0Vd3GZMsUu qv1m927BQ+WhuiRYLRPMXcUo+iGGzNcEUNBgvLpU196Uy2BKVJlhvhPSF5PqDMYX0fHG fbZi/rZV1blQmJcCKvTxPKd4hhJ0Wvt2vc2qVaWxN70gr2CMYt5JL84AmxcEEVA4WTdB PBZ9+NXWAl+ziAvI8YGOop1tGSAvqIi6anAsm6hsqCItEmUzNxCEXJk8IoON6l56iWhQ NqNxKUbwAM5/sBrcKAMSprHgc5LoWBtkWjaOZBAbfR163HJxBwZ4K5sHHtinVZ91VxlY SziA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=km1RYLI1CobmrVkQO++1orn+WmYu8I6YnJXKOV3FSOQ=; b=2Bk5ijOIZ//P47QXau8fZTZ6G9oZ32lZfcKrWWBbOJue9Y4Zea8CWC2N4GjfDH/Ghi kHj+4pqaocUCMS7UID8MFUaydmye6SiNjKSsxJUOkSS9aB3IR7sJ4fSzi3TEpiG61bX8 MinU+eWGuNJTqYCCO5GOYiCjgVwJlZiC/42ZNlqi2YaMkbtW3OYHmwBQbM1UonMa2ec4 XVYEG/7vvNMRltS1w9JKR6RDDfZhGvgFi6O7kRr3Wc4SDtlruNa7WymlFCLBwqEKDhXn JDo9J7JOryi6+e8pWAsW+M2a4lz0rWXcvmqzsCB1OHUcXYSfeDe5VZ6WSodNvqv24LP6 wQSQ== X-Gm-Message-State: AOAM5327YXearednqChIwavcYovgkjkE931azChRAY7OXBWBbcNXy2JK e/UfcOgryUh7cl38wWtvSP3RDpbOLg0= X-Received: by 2002:a17:90a:170c:b0:1dc:20c4:6354 with SMTP id z12-20020a17090a170c00b001dc20c46354mr409558pjd.113.1651515114454; Mon, 02 May 2022 11:11:54 -0700 (PDT) Received: from google.com ([2620:15c:211:201:4d84:d37e:584f:bdbc]) by smtp.gmail.com with ESMTPSA id r10-20020a170902c7ca00b0015e8d4eb246sm4920428pla.144.2022.05.02.11.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 11:11:53 -0700 (PDT) Sender: Minchan Kim Date: Mon, 2 May 2022 11:11:51 -0700 From: Minchan Kim To: Aleksey Romanov Cc: Sergey Senozhatsky , "ngupta@vflare.org" , "linux-block@vger.kernel.org" , "axboe@chromium.org" , kernel , "linux-kernel@vger.kernel.org" , "mnitenko@gmail.com" , Dmitry Rokosov Subject: Re: [PATCH v2] zram: remove double compression logic Message-ID: References: <20220427100345.29461-1-avromanov@sberdevices.ru> <20220428200107.hz65qvxf2aoz27q2@cab-wsm-0029881> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220428200107.hz65qvxf2aoz27q2@cab-wsm-0029881> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Aleksey, On Thu, Apr 28, 2022 at 08:01:12PM +0000, Aleksey Romanov wrote: > Thanks for the reply! > > On Wed, Apr 27, 2022 at 08:30:16PM +0900, Sergey Senozhatsky wrote: > > On (22/04/27 13:03), Alexey Romanov wrote: > > > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c > > > index cb253d80d72b..4be6caf43b1d 100644 > > > --- a/drivers/block/zram/zram_drv.c > > > +++ b/drivers/block/zram/zram_drv.c > > > @@ -1153,9 +1153,8 @@ static ssize_t debug_stat_show(struct device *dev, > > > > > > down_read(&zram->init_lock); > > > ret = scnprintf(buf, PAGE_SIZE, > > > - "version: %d\n%8llu %8llu\n", > > > + "version: %d\n%8llu\n", > > > version, > > > - (u64)atomic64_read(&zram->stats.writestall), > > > (u64)atomic64_read(&zram->stats.miss_free)); > > > up_read(&zram->init_lock); > > > > I think this also has to bump `version` to 2, since format of the > > file has changed. > > Yes, I'll do that in the next patch. > > Minchan, do you have any suggestions on this patch? > I want to fix Sergey suggestion and sumbit next patch. You need to remove zs_free in the path "Compression failed" Since we don't have double compression, we don't need QUEUE_FLAG_STABLE_WRITES so you could remove QUEUE_FLAG_STABLE_WRITES, too. Thanks.