Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1512671rwb; Wed, 26 Jul 2023 13:49:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4sAR1/sayX5yIJ8rX3wM6ULOehij0Ra0/FwXB6s+R3GKxeEBojI0InVU38ytScDcLFVk9 X-Received: by 2002:a05:6a20:8f01:b0:132:d09f:1716 with SMTP id b1-20020a056a208f0100b00132d09f1716mr649826pzk.2.1690404572423; Wed, 26 Jul 2023 13:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690404572; cv=none; d=google.com; s=arc-20160816; b=saHa1q+gOq5ms/5fQ+WTwSkEs5IR6ObQF0f79h354PtQLP9FZFKd4S/2GbqYjaTSpo nEXjiCUVD6Wksbya5araK045mF4o6/5ME8/nyrpb84nGj6yQODhl21D7tqGcDrFYor33 vtye8QYA2RYOU3t/MdlscbtE5vB14XEVPmfD09RA5Nc3Zb2R8vcH9jKfjV9T1wVkPt47 zRG9nXEInybeD0caLxF1XJ5vihfq5mfoeCSKcGNv4WBJI9v6N3/x2gQW0J8aqubYvcTJ cK+S+XnHlo3Vjjfk0VyGZuMeIoy/UcRAKjK0NWd8dj+Z/SHJBB7+bxtuJOFY7Go6fwQ2 +Yeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=B46qLyQJ0RLJG3V0owLH7AhzKF9F7MAxul4nuhS+mlc=; fh=aI2X8mnDPmAsBV8hrJrZpPc5hbfQ01GHZWmt3YMpj+c=; b=w+xkylC2xZfCP/Eg8ovdxEqe1HzK76aYJNDLFKVGJyFEZIUSn6P2f7l5rE50diBmbG 9soBDnMLpedL5OT4txLgDUXsRms/gTjtcjV9NzFnx5vP9HoA22RRebv3FyQQmK5lWVZJ xgOpHqQJFWayrVQa08SbQ8PJINcnn0+I3DDj3b331pUsD2+Q3dKfbo2imUvHplZl7lT/ /wSf+H+bvXOgQaCBq5qzGeS9m8UdvrOZOtZ4cMLrC1DmboJKKLR52f4Eak79iK5tRV3v oxrUCs6rQ6tC07qsxcwUTTLP5gTj6XIjpHZom62/17Fj3StyAkRnz7dvVP5aYrXG7NIA RBRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=BAp862XD; 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 c64-20020a633543000000b00563e0a0b2e1si886732pga.451.2023.07.26.13.49.18; Wed, 26 Jul 2023 13:49:32 -0700 (PDT) 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=@linux-foundation.org header.s=korg header.b=BAp862XD; 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 S230355AbjGZUSn (ORCPT + 99 others); Wed, 26 Jul 2023 16:18:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjGZUSk (ORCPT ); Wed, 26 Jul 2023 16:18:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10F5D198D for ; Wed, 26 Jul 2023 13:18:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A3B6661CBE for ; Wed, 26 Jul 2023 20:18:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F0FDC433C8; Wed, 26 Jul 2023 20:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1690402719; bh=MMioSWLe0J+F5cA3VOGFUM/YW6sX+D23b5MfVPZqMwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BAp862XDg5jm4GYl6C/MPJCbU0NcJd6qPBVRi+my42pt/DpGQq+SWl6YIT7fPp2PL HcTDTo7GooY8BqKKq/e9K45b7acdnf/8e4JgzivN0rxkQUcPLhm+263tGJc5Oa2wxs G7HZ6q+3UPSjZyikhKl7/dD9hL3rjG9tai4JLO+c= Date: Wed, 26 Jul 2023 13:18:22 -0700 From: Andrew Morton To: Andrew Yang (=?UTF-8?B?5qWK5pm65by3?=) Cc: "senozhatsky@chromium.org" , "bigeasy@linutronix.de" , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "linux-mm@kvack.org" , wsd_upstream , Casper Li (=?UTF-8?B?5p2O5Lit5qau?=) , "minchan@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "matthias.bgg@gmail.com" , "angelogioacchino.delregno@collabora.com" Subject: Re: [PATCH] zsmalloc: Fix races between modifications of fullness and isolated Message-Id: <20230726131822.22ac039ee4c696ea0726b510@linux-foundation.org> In-Reply-To: <42f1209a686404ffd0f9dff05ed10a8d23383a11.camel@mediatek.com> References: <20230721063705.11455-1-andrew.yang@mediatek.com> <20230726031846.GJ955071@google.com> <42f1209a686404ffd0f9dff05ed10a8d23383a11.camel@mediatek.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, 26 Jul 2023 06:59:20 +0000 Andrew Yang (楊智強) wrote: > > Have you observed issues in real life? That commit is more than a > > year > > and a half old, so I wonder. > > > Yes, we encountered many kernel exceptions of > VM_BUG_ON(zspage->isolated == 0) in dec_zspage_isolation() and > BUG_ON(!pages[1]) in zs_unmap_object() lately. > This issue only occurs when migration and reclamation occur at the > same time. With our memory stress test, we can reproduce this issue > several times a day. We have no idea why no one else encountered > this issue. BTW, we switched to the new kernel version with this > defect a few months ago. Ah. It's important that such information be in the changelog! I have put this info into my copy of the v1 patch's changelog. I have moved the v1 patch from the mm-unstable branch into mm-hotfixes-unstable, so it is staged for merging in this -rc cycle. I have also added a cc:stable so that the fix gets backported into kernels which contain c4549b871102. I have added a note-to-self that a v2 patch is expected.