Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2764988rwb; Mon, 7 Nov 2022 18:07:22 -0800 (PST) X-Google-Smtp-Source: AMsMyM4GEApJZ6QfulwNFyo/cJSko5tkhr20M0YwVobuK3ypVHe/V0yQKEjkWNagpMt4B3M5ZnV9 X-Received: by 2002:a50:8d5e:0:b0:458:e00e:5a85 with SMTP id t30-20020a508d5e000000b00458e00e5a85mr876487edt.171.1667873241947; Mon, 07 Nov 2022 18:07:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667873241; cv=none; d=google.com; s=arc-20160816; b=nPyx7Vq4+mrucPyPCvlUgNDlLwfZ/7wc9D0mQnbS3EO53w36lQUDV/Ryz4HJND5puu rp27seo6uCP7c4Op66/gOPj7PZ8f9ekLKmeJjnQr/XQhouA0SsDtZoY+cZ3DbOiMAC0k 7Lnb+GV+0kJzmrQbtzFi099WeEO0TbgyidHMxmbqqzBRbmaq0H8zy4S9prxBaeFdeR9S vtdBhvLmxM6OhpAFgMcXdMFchIb6Z2YITvB5p8Q4nUBDupfTFIETyBvPERukMci/E0c7 8MeI6dMr/EECUjYsuweWrQwEm/5HzqLJFahrWPQoGIuG6/NoSX6FA6jlVsEGDNfxAD1E 7GJQ== 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:dkim-signature; bh=+9NiTraJTVI3GZSgQulM4QdB39VgKWNnbTrt/IiQ+Zs=; b=h/vFW/F3zJvTud4WXc4Aq7if9Epaf3Pi94OWoY57Bij7aUwXR9LDrzaW1iXQRs9DxB 7enlDC9wc5mcxtUB1JrmhMJuX7tOdbOOmPr4vr56o51SxgDiEgy64w1s1JU+uaSgfhGP yLWfPsfHssETqt6IjNDN3XogzHf1FxhTrDoxYRxWW1t6EjkWc1QkZIZn/EZtM74KCZgP ih8PHqwh8oAD1JyjxZPP3WN66sWDfsmM86JDqKgkS3ryQt6UbTlgqUTskYd9eKRwtBbB VN00WWBWJlIz/asv0GtMdwCaVBwz/LjQ/cIpKNJm8ZyjTxRLVix+WHdDY13rdJkwdHdj 3sEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZPTfykv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a05640251c900b0045c97ee2b01si13163715edd.616.2022.11.07.18.07.00; Mon, 07 Nov 2022 18:07:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZPTfykv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232607AbiKHBFU (ORCPT + 91 others); Mon, 7 Nov 2022 20:05:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232517AbiKHBFR (ORCPT ); Mon, 7 Nov 2022 20:05:17 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D03CB20BE1 for ; Mon, 7 Nov 2022 17:05:16 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id b62so12090371pgc.0 for ; Mon, 07 Nov 2022 17:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+9NiTraJTVI3GZSgQulM4QdB39VgKWNnbTrt/IiQ+Zs=; b=ZPTfykv3GFLo2GZPuvohfWNbYYG1PB0gSDVQ7SQgnq5zL9xmlEXwcKOTOFdR1t6yP5 6sFjxRjPNbOpKCszIBZNELwVeWRE1cGMnsmIgWd5oTRdTLYRb84e+Odos42KCv6KtgXm 2QZXjS80ZNX6fUoo3yOgmoLezTu6Y2Cep31SQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+9NiTraJTVI3GZSgQulM4QdB39VgKWNnbTrt/IiQ+Zs=; b=2cM1gOYdq+i1lOzsrzy/qB3M4QQTl50MDgnY21EoYwoAJHQ58t9Qw5oPowp+9dEJkH fhbTJNwKwQ7hJBy4fwUACeqWqkLur8nFYY14G5If0h35/afR40XPE+Jwlyc+7ir8BxYm cdlmfnxzLMqXg3tQ5DlhGeSesTUHCUGufITXPJwFSHcVFUCXgRreip7vcWBIyhdKWCy9 BJswPDnDdUdmx2SUgCVd2cTnrxd4TxvazyrxZvYJ/Zx+IU9vkjzn7jHO5Zsek39PtRuw W/W+/lde+kNysZvMB/k3DeJyEc9DjmR/VkoII5u8yFaCux/jxlOk5ipLdHgA6p7OEE8U ERAA== X-Gm-Message-State: ACrzQf1Ex66ts9Cp01UobBbHCVNPtvySigHmuem9dROdXsVbWSBJrOGv xCuImBZDS4UTI1gwaHzWu1aWTA== X-Received: by 2002:a05:6a00:22cf:b0:56d:1c55:45d0 with SMTP id f15-20020a056a0022cf00b0056d1c5545d0mr50553101pfj.54.1667869516351; Mon, 07 Nov 2022 17:05:16 -0800 (PST) Received: from google.com ([240f:75:7537:3187:8d5d:1342:1172:9487]) by smtp.gmail.com with ESMTPSA id k17-20020a63ff11000000b0046f9f4a2de6sm4743649pgi.74.2022.11.07.17.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 17:05:15 -0800 (PST) Date: Tue, 8 Nov 2022 10:05:11 +0900 From: Sergey Senozhatsky To: Petr Vorel Cc: Minchan Kim , ltp@lists.linux.it, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Nitin Gupta , Sergey Senozhatsky , Jens Axboe , OGAWA Hirofumi , Martin Doucha , Yang Xu Subject: Re: [PATCH 0/1] Possible bug in zram on ppc64le on vfat Message-ID: References: <20221107191136.18048-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On (22/11/07 23:42), Petr Vorel wrote: [..] > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TINFO: /sys/block/zram1/mm_stat > 15859712 0 0 26214400 196608 242 0 > zram01 7 TBROK: "loop_read_mem_used_total /sys/block/zram1/mm_stat" timed out Looking at mm_stat_show(), mem_used can be 0 when mm_stat_show() is called on un-initialized device --- ... u64 orig_size, mem_used = 0; long max_used; ssize_t ret; memset(&pool_stats, 0x00, sizeof(struct zs_pool_stats)); down_read(&zram->init_lock); if (init_done(zram)) { mem_used = zs_get_total_pages(zram->mem_pool); zs_pool_stats(zram->mem_pool, &pool_stats); } ... --- Can you check if init_done() returns true in your tests?