Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3856164rwj; Tue, 20 Dec 2022 02:57:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zn3/MvsX0Pl5OWLCx5SsHJYfLFhxDyzJ1hBnx1P/BVRmoXOuf8R3u9UUGQc+1yGin/8Vl X-Received: by 2002:a17:902:d650:b0:189:f86:f00 with SMTP id y16-20020a170902d65000b001890f860f00mr42374212plh.16.1671533824990; Tue, 20 Dec 2022 02:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671533824; cv=none; d=google.com; s=arc-20160816; b=HvxlkpYHxsTmMa4t68JlFMV3XnYE+EvWodENqGWhtu6sAy3LisjqlLPnIaKgh57Aay jcZMnVowGNXbFyjfGHADmV/BYPRS2KhjOxKmaHwES2fKxKQ6+a/JMtalxpp/kEXcp+8U i5LEuHuc0DhlZTYd3GTFccw1padodriMgs9r1PbsAkwotUwXnY6dLzz8x8IGTiLULsYw 9nxsUp9xtdIROAG6IyGHRmrXWSwaZeYQGmiSUQJoEEY1hF9RxurlVZzl540XPN53uF0w XOplK/K9Kwpsw/HS7Qalra5Dd7IKEmoOvPNhzBG0UfQgxQgCjgHcYLK30ZGSchbVQyQI +vCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=+/nXRv2CkqL6W5O+RblZMSknf/pBZF6KUzkp2E3JAZE=; b=v5okquA9syurrQcbttJ91Z1HxmEbIBcS92IfvOvwF4YAydh0VDJs74M6yMl2LcoStT NnK28js67OH9cVE2YKstPjbGJIlM/3vvuWSZOt3jakgWO2u38oJaIDgmg2NhUBjvvoLH AKp14v23Bb2J8/sWzn324v+7MRgadINbTylGmXL/pF8mEmpE1oPlbQsOCI1eWFkVFC6Y MV4pRWPhTp0oII1yD3l1W3/vwNoDncfNpkSlSMKn8Pli4Ct2z+cM0lkG2gTGK8wNp/rK I3N1+d63rf81rfOJ68o50SFeTmlveLO2TdqnIpM89v6mZ4r+jyA99C50cX7bMLt3ZAip PJsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=EBp4dCby; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=xSH9wgnl; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a170902a60c00b00176e21bab6asi570572plq.118.2022.12.20.02.56.55; Tue, 20 Dec 2022 02:57:04 -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=fail header.i=@alu.unizg.hr header.s=mail header.b=EBp4dCby; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=xSH9wgnl; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233199AbiLTKne (ORCPT + 70 others); Tue, 20 Dec 2022 05:43:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbiLTKnZ (ORCPT ); Tue, 20 Dec 2022 05:43:25 -0500 Received: from domac.alu.hr (domac.alu.hr [161.53.235.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26AA11836D for ; Tue, 20 Dec 2022 02:43:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id 9B76E604F2; Tue, 20 Dec 2022 11:43:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1671532994; bh=28aeNJcZhjH4Yc/hQCSZhSLXij8XcqFFnXNqh8P8y2M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=EBp4dCbynhsaxmTNbOQcgyE1FbKslOetKbsd5S9ZybFvV+jLNtnpaC/qYL1Ej0t2m mzGZimiLApSFx1XlUKIQvwRPQtAo8LOXtZSdsfsUCNSnz3eQ/qd7n2FNV7oYSfTpag 3Iwf00b13aDedmWjmzWnifM3JIOAiOYc+et7ase82JG7O7Xul4G/vONb4nlkZb96ak HBZ052XKTJFjcHTSYbzhLvnOyRYVNqJBlYSEGilbyZbqw3Jq67jicBlPA3roVR8f+O qbUz8bFL8x+bVyxjIitysyzFdU72VnT8QLoSbwVto0c9/70OZM2DevtfdP7s/pBUkQ Ag8ikGkVOoOOg== X-Virus-Scanned: Debian amavisd-new at domac.alu.hr Received: from domac.alu.hr ([127.0.0.1]) by localhost (domac.alu.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jzd7WZzt8pYI; Tue, 20 Dec 2022 11:43:12 +0100 (CET) Received: from [193.198.186.200] (pc-mtodorov.slava.alu.hr [193.198.186.200]) by domac.alu.hr (Postfix) with ESMTPSA id 008E7604F1; Tue, 20 Dec 2022 11:43:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1671532992; bh=28aeNJcZhjH4Yc/hQCSZhSLXij8XcqFFnXNqh8P8y2M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=xSH9wgnl4FggF4bm0pn6Ga1tcTGMT+PU2F7lssMixIyr4osrxrOklflRBlsRwkuB3 xlEqhENuFYkZ/BQrnkulLlA7SzO64EhS+4HiqnT0C/jpXIbd/g0acj+z6mxETc/VrJ LSRs5rr0FuFgMcUIXEtbi725e8Zyqwik8Nmqk2zLsCcf95eGFKcqm+4x+xx5tOjPoH 1fzNHa8MNfsdkBi5w2OOO5ZuowqDCimRtwuDmT+NknCWKdw2NPcmBbRinhh05iCbT1 zKG1aM7Dm5gBiTnyi06Ji/nLTr6iZUppj/v0zh8u5G46v9/xIgnTvBri4anhNvcJq/ 67FZopUYLWs5Q== Message-ID: Date: Tue, 20 Dec 2022 11:43:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: BUG: in squashfs_xz_uncompress() (Was: RCU stalls in squashfs_readahead()) Content-Language: en-US, hr To: "Elliott, Robert (Servers)" , Phillip Lougher , LKML , "Paul E. McKenney" Cc: "phillip.lougher@gmail.com" , Thorsten Leemhuis References: <9697fcf5-4213-3d5e-176a-e82d4bd07870@alu.unizg.hr> <02877aee-8c05-6534-8a91-94ba366d0276@squashfs.org.uk> From: Mirsad Todorovac In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,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 11/18/22 17:51, Elliott, Robert (Servers) wrote: > > >> -----Original Message----- >> From: Phillip Lougher >> Sent: Friday, November 18, 2022 12:11 AM >> To: Mirsad Goran Todorovac ; LKML > kernel@vger.kernel.org>; Paul E. McKenney >> Cc: phillip.lougher@gmail.com; Thorsten Leemhuis >> >> Subject: Re: BUG: in squashfs_xz_uncompress() (Was: RCU stalls in >> squashfs_readahead()) >> >> On 17/11/2022 23:05, Mirsad Goran Todorovac wrote: >>> Hi, >>> >>> While trying to bisect, I've found another bug that predated the >>> introduction of squashfs_readahead(), but it has >>> a common denominator in squashfs_decompress() and >> squashfs_xz_uncompress(). >> >> Wrong, the stall is happening in the XZ decompressor library, which >> is *not* in Squashfs. >> >> This reported stall in the decompressor code is likely a symptom of you >> deliberately thrashing your system. When the system thrashes everything >> starts to happen very slowly, and the system will spend a lot of >> its time doing page I/O, and the CPU will spend a lot of time in >> any CPU intensive code like the XZ decompressor library. >> >> So the fact the stall is being hit here is a symptom and not >> a cause. The decompressor code is likely running slowly due to >> thrashing and waiting on paged-out buffers. This is not indicative >> of any bug, merely a system running slowly due to overload. >> >> As I said, this is not a Squashfs issue, because the code when the >> stall takes place isn't in Squashfs. >> >> The people responsible for the rcu code should have a lot more insight >> about what happens when the system is thrashing, and how this will >> throw up false positives. In this I believe this is an instance of >> perfectly correct code running slowly due to thrashing incorrectly >> being flagged as looping. >> >> CC'ing Paul E. McKenney >> >> Phillip > > How big can these readahead sizes be? Should one of the loops include > cond_resched() calls? Please allow me to assert that 6.1.0+ kernel (this Berlin time 6 AM morning's build on on Torvalds' tree) built with CONFIG_KMEMLEAK=y, CONFIG_KASAN=y, CONFIG_LRU_GEN=y (multi-gen LRU) and CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=20 doesn't exhibit before seen RCU stalls even with such a low timeout as 20 ms. So I guess kudos go to the MG-LRU developers, or has Mr. Lougher done something efficient in the meantime. My $0.02! Thank you, Mirsad -- Mirsad Goran Todorovac Sistem inženjer Grafički fakultet | Akademija likovnih umjetnosti Sveučilište u Zagrebu -- System engineer Faculty of Graphic Arts | Academy of Fine Arts University of Zagreb, Republic of Croatia