Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3516309rwe; Sun, 16 Apr 2023 22:16:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ZheYwJj7j3mgbXpaHoi4yyOtanx+fzVHgVA4ioSt/nd3e4iMyQysb7lZMi57GdMMHL5NJl X-Received: by 2002:a17:903:2111:b0:19a:b869:f2f8 with SMTP id o17-20020a170903211100b0019ab869f2f8mr8375313ple.21.1681708585556; Sun, 16 Apr 2023 22:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681708585; cv=none; d=google.com; s=arc-20160816; b=my+6bxe/+GJgJuW0ndoC/FRsMCxB3zxNB0XDO38kdhjxHLalJShrSf4o+njqYDG79h BkrR7hcoioigGZCr1aSTD1dhg0e4QlXkcJunqA2qPUcPa/j1nUATAnEQIfnisYHfVKM8 TyDd+imj2ivyiSWTHG4Tt9Bndjc6X1BaRQE2tZhCXTQChZdkhnLRb9GFFaLm6Y+Zs8S4 TfqIWr3Se6df5v82oSgne/NQw7rJltM131X6/piPgtdIQLQH7JnuZCT0CC8a10tXvm0Z 2hLBeIMrrDdgh0v2r/69zrqdaxlS4D7r7VE4x9BXIOOFHrvIwMihBK9nBQQwcOOeI3+J +vLQ== 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:date:subject:cc:to:from :dkim-signature; bh=bS4Pkg0HE5+UxYA0hiruUQ00ilsEPgdYXH5UV1O8hIk=; b=r1/lRWHvWSamxSUzooUdh4R3zleJQPV5+TdVIEk/lU5Zae7taek3NPmOf9Y3A5qt/1 0OFCPpESVNSVUOZWKjlsSbfQx24kbPuuvk8mq06LaV4jeli8z/GEG+Z0kEGTJEEW/tdw 2q0+WphjnIJHDOWnik6ejckK6vFwBBXMijjaa9Ts/+1neR+2F1ckiiPz4QemGZrvr97U 62D/0DEK6H0xTyCRnJFPc9P4gylap7zSY7+Cba0RXUhKstD4uRDZOX2VGxvAKuWvbkO7 3erMQu3oijFux4NzuE2TUBmLgQB86Q4Miq4Q5ERLDYfe5yXStFFCnRiUkhVrHspIFibd R3oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HzynEqYH; 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 jk22-20020a170903331600b0019931c82e24si10733093plb.195.2023.04.16.22.16.11; Sun, 16 Apr 2023 22:16:25 -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=@chromium.org header.s=google header.b=HzynEqYH; 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 S229941AbjDQFBx (ORCPT + 99 others); Mon, 17 Apr 2023 01:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjDQFBx (ORCPT ); Mon, 17 Apr 2023 01:01:53 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBDE10D8 for ; Sun, 16 Apr 2023 22:01:52 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2472dc49239so700254a91.1 for ; Sun, 16 Apr 2023 22:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1681707711; x=1684299711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bS4Pkg0HE5+UxYA0hiruUQ00ilsEPgdYXH5UV1O8hIk=; b=HzynEqYHkWXVtxmpOKeHNyA59TmKbC48BgADQgAoicyyonNQRXqBtqety7oevIB4mO kWKoXOGUb43q9ItRNjf2w/tVUpztvMbeF/eCrjFRlTI/ywnZR+UYUGr9q22sca3LhHsf ASX7P+o6OaOaL52hSvqJvffIalsVnc2QJSpW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681707711; x=1684299711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bS4Pkg0HE5+UxYA0hiruUQ00ilsEPgdYXH5UV1O8hIk=; b=jNB17VTKbONSCQavQSxW5T8s2yp4tGcZuY2+zuXYUiz4jouGRzhlOJfUSGe4RX9g9j ggXLr7KWQgehK355OuZwtEYzySTCr8755TBAxecUMDajjHSw7dK1qGI0vz4grD/aTaHW xHB8M5+CnCsGx0fYUHdHC9wTh7QAxKZezg21PELWTh08Kp75yqX/4oKOCKcfI0SXqOoq 7YWLISgCkR+Nd6rA8zb0eBVyn/JbkznJCFNFX8Vg2q2Mw81ogTo8Lmmfgae0o0rn20bD HbBW+ebEn+HWZYpXzYUdTS1/1s67acoKwyAuornnE0Edw9getk7KwKEiTq30/t6oeCko ACYg== X-Gm-Message-State: AAQBX9eCrSQFDbzNShuMOEloXu66+rKVIg0ehZ2YWUM+aSnY7fZRybfp Xx5Zo5p2BfT5TmBkQGAHORkdgA== X-Received: by 2002:a05:6a00:23c8:b0:623:e4d2:d13e with SMTP id g8-20020a056a0023c800b00623e4d2d13emr21214550pfc.34.1681707711595; Sun, 16 Apr 2023 22:01:51 -0700 (PDT) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:97ac:e7c:d412:5251]) by smtp.gmail.com with ESMTPSA id p15-20020aa7860f000000b005810c4286d6sm6661977pfn.0.2023.04.16.22.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 22:01:51 -0700 (PDT) From: Sergey Senozhatsky To: Andrew Morton Cc: Yu Zhao , Minchan Kim , Yosry Ahmed , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: [PATCH] zsmalloc: reset compaction source zspage pointer after putback_zspage() Date: Mon, 17 Apr 2023 14:01:40 +0900 Message-ID: <20230417050140.1653593-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230304034835.2082479-4-senozhatsky@chromium.org> References: <20230304034835.2082479-4-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,T_SCC_BODY_TEXT_LINE 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 Fixup. Reported-by: Yu Zhao Signed-off-by: Sergey Senozhatsky --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index aea50e2aa350..cc81dfba05a0 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2239,8 +2239,8 @@ static unsigned long __zs_compact(struct zs_pool *pool, if (fg == ZS_INUSE_RATIO_0) { free_zspage(pool, class, src_zspage); pages_freed += class->pages_per_zspage; - src_zspage = NULL; } + src_zspage = NULL; if (get_fullness_group(class, dst_zspage) == ZS_INUSE_RATIO_100 || spin_is_contended(&pool->lock)) { -- 2.40.0.634.g4ca3ef3211-goog