Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1218565rwb; Wed, 9 Nov 2022 14:42:47 -0800 (PST) X-Google-Smtp-Source: AMsMyM5qt61VnipHWlrsvqqPAaDBwhahryOYdOK0blVZoCtFdA1rScF5aXDBI7o4YPI5krJ168RX X-Received: by 2002:a17:907:9622:b0:77a:4bfe:d6df with SMTP id gb34-20020a170907962200b0077a4bfed6dfmr1926668ejc.396.1668033767392; Wed, 09 Nov 2022 14:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668033767; cv=none; d=google.com; s=arc-20160816; b=MkqqWNKO6eErhG6VLrRGDhsADyOa9Z1Y5Nf8o8M9xJR13PX4TTRjIAIZri25R7qbxL r+5T62bYQuEG+lJt2bleHe5O7XAwsYVJdGt7PiqveVw5DTwTBUsR2CVprghp6sAhn/0J vP8J+jw4tx1STNKu0WpjA80+FIlm5xQxOTWn4zc265M/r5OobS8ENKyDv5SNJYdXntKU z4sNJhbSj+j1EeSblVlLB5sA6tEFb/1UclnoeIdou63qw9jLEBy1RjtGLUH3sm8T7quY 3d2pjPtjXAfEa0vBgmRMNTOEJYsnD4Fj7it72ELllMDSCZ1S2SBMPdvESZAT95/Y00I+ QoNw== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=7urUNskayTd1SGPbO2jRA+qHJ9m4P64m8g/fnY2xxEc=; b=dEje5ydkEG9wFWNFYvD9TzfAn8TBtf7nSdsqhs1K2vxWdoScx+OCrXef71kJUecCdp VD38DUs4Q4GccwRbZwv7ryJMHJpX2JbG/cvDrDZu4/TaC33ydkuVuW5MBWz2tcs+nOqI rtYs+AR1Il71jFLAX9Za7T779+I7DALtQRd15z0amn0EwDB9i0EWWFzZ7EyopKQrzvqZ fWnmwboAmqozmwuPBG01bTUyuq0UV9GpFQhhmdd1EBNyWJIwADx0n6S9flcKrjnnW2x+ 50Ejt+f9n0rCjioZUZF+Ie0Ag4te98ErdrwISAtEr2H7DxCW3bTgJBFZRBMLKKwp4UF4 iU+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=P8uXFlGh; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a508742000000b00458c130870esi14561829edv.385.2022.11.09.14.42.26; Wed, 09 Nov 2022 14:42:47 -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=@suse.cz header.s=susede2_rsa header.b=P8uXFlGh; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbiKIWIK (ORCPT + 92 others); Wed, 9 Nov 2022 17:08:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbiKIWIJ (ORCPT ); Wed, 9 Nov 2022 17:08:09 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39BBF2D771; Wed, 9 Nov 2022 14:08:08 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DDD1F337BA; Wed, 9 Nov 2022 22:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668031686; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7urUNskayTd1SGPbO2jRA+qHJ9m4P64m8g/fnY2xxEc=; b=P8uXFlGhXKDLvAC/8peds9cZpAHDUAwEzRuseDyVYNHKwSPR/HYHBUm9H7Ur1a2lUIcyeH qT4u4B91xFS9SKUsVBIJnSptB0p8Gm7WNZE8i+HHSIn+IFg3omAQSUapC/n6puNDwZkdU2 DAA/cr+hKvUlUwIoVE3nDVMIJM/Vz94= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668031686; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7urUNskayTd1SGPbO2jRA+qHJ9m4P64m8g/fnY2xxEc=; b=2KI7jo8WCBbi0rC6LB2o4uN2Dx9AP/bVharrGirY9awbEubefsqGuks6uGs9nzzo3qkxyK BFrH3x45c+mNGaAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5AB4A139F1; Wed, 9 Nov 2022 22:08:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GbG1FMYkbGM/GQAAMHmgww (envelope-from ); Wed, 09 Nov 2022 22:08:06 +0000 Date: Wed, 9 Nov 2022 23:08:04 +0100 From: Petr Vorel To: Sergey Senozhatsky Cc: Minchan Kim , ltp@lists.linux.it, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Nitin Gupta , Jens Axboe , OGAWA Hirofumi , Martin Doucha , Yang Xu Subject: Re: [PATCH 0/1] Possible bug in zram on ppc64le on vfat Message-ID: Reply-To: Petr Vorel 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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Hi Sergey, Minchan, all, > 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? I'm sorry, it took me some time to find machine where I'd be compile kernel. Yes, init_done() returns non-zero (1), code goes into if clause and sets mem_used. I'll check also for mem_used value. Kind regards, Petr