Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3879279rwe; Mon, 17 Apr 2023 05:05:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZmH+/vijRdDJbejNXWoPCrwVcvEnYON8lSgVKOzzF56Sx8QOAqHZdxBY3B8X+1yfS9NqAh X-Received: by 2002:a05:6a20:428e:b0:ef:ef3d:6166 with SMTP id o14-20020a056a20428e00b000efef3d6166mr2980354pzj.32.1681733151681; Mon, 17 Apr 2023 05:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681733151; cv=none; d=google.com; s=arc-20160816; b=EUY8uvtezN9c6NTUiC6pcX1rDukamY9pb0M4OhcS1MoF392KT/Dz6qTfAmrHnnDypv Y0g3To+bNwdlTbqVhFr7dx05ptFAqEDXF24/AuQdYwC7T1a6i24QwiSGtqWRooC3bBZL aW+RjIkQulm0SB43v+lMKI+GIm0LDMoNk3NvRAmBMPTipwE9BdQK5fVdJe1e5i5A/E04 xg8ZL8pgtp6eQ9irWZAbxQlCb7dfDptaqzlMY4KQaJX9Z0Odq+GnKSyM8BH04lPxCSow BPDR6yGw9BZ3+PpV/52snzJy7g+NeZF0VDRxehEM4LH/eK8dIv4I0GkdUP6ZvAtWy9sr QExQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xvYzdosW+pl7hdpIOnke9mGqwsf21NWemxvx9QGqO7g=; b=l+P0uStpLU/BiA2HNTE5LOdojT9N/8+efp1d1JvhH6oJh4n2hh/nvrd2qcqtPjczuU o8XenYXEPibZZ35de7INZ7qz6ZPLBhEY7ufqZdca8UDgBYAeesDDUlT4H4zTPvH6Xn19 0wccKchnaLqwF/vfjij9YBM1DUiRkZhjkNT8X9SouxN4ECspNSySZ+6sBZgUyHKQm7P2 KnP3nN8JyPsqTmXP49LhW142+zOOu/uCjiXEnn8Tgnos5asdkZy+jvcc7hCaK00qtuBH cR9ZjqbyRa1ZxeL+vZn7cjrosTg9/iZKjniwcNu4hNQNb2AMcHTZAICzMht7s8jPqmEs qVOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=AJInmT4O; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a6553c2000000b00502f0410410si12298352pgr.472.2023.04.17.05.05.39; Mon, 17 Apr 2023 05:05:51 -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=@google.com header.s=20221208 header.b=AJInmT4O; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbjDQLot (ORCPT + 99 others); Mon, 17 Apr 2023 07:44:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjDQLor (ORCPT ); Mon, 17 Apr 2023 07:44:47 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64232E58 for ; Mon, 17 Apr 2023 04:43:50 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id fy21so20327840ejb.9 for ; Mon, 17 Apr 2023 04:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681731821; x=1684323821; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xvYzdosW+pl7hdpIOnke9mGqwsf21NWemxvx9QGqO7g=; b=AJInmT4OcLIEQY+GD2XQHALBCXIcHvQJqMLztaaCbt2SO/Qjzie0qsYDg/cMZin9NY i+Lk4tKMoh7EEmPZ234yP49QmA4o+SIAuUTzxNxk5qMrVekL0efcMGk4hzDS/ylir1tC jAYp9AOP1pS6eCFAkOLE91xVCTLgPtTpqUdZJuorzWUJj63up2vjB5qWYzloip/RjAA7 wAjI+BPQhckBSo+VJ3Iy+p1sTnszyTThRpn4Aguj4p7vYms28M3KeCefhPgVeqOxmX7C ERoJOyueRav2HAcqejybOPM2AUW4cyRpunPgnW/CEnsO8B5BmTAYT90WYhAhfzExYoxj x1Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681731821; x=1684323821; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xvYzdosW+pl7hdpIOnke9mGqwsf21NWemxvx9QGqO7g=; b=A+jvmdJwOmuGNMIPuDBI4nB39YlqYEmcsW/GMhfzGcmFuMvm26xv2snk40L3RYgN66 9bwHi8JqTVlqP89K4uv4aJkv10kdseJw7Nset9ZEKKc2CAtZGbg1Pa6qukqbXiTI0jlL 5TRUtIRsDjQKs2MxYlVfHrzwkq1QkzOUtclJE9aBhgcHYWYUr74bVrdqhLw1KQgsqfCJ 6WEf64yFhGPrlnGGl3AHWaxieIJE1SwQb0deqUhGg3jbvQaoPCvrdxZuNAvT41ZuqjFU JzTa0mDDJLKcFtPPacjvR8EPe2kdrV4/XmxukSJJ26Xrkel5r8ir5FU1OE+hqLzuTKd0 r3mg== X-Gm-Message-State: AAQBX9eWKyJr4hkLO3lUEx9EuSvK9F3h8yjIRE+QjYHnmEvABeBfKzAO 41JfgF6P1bNar0gy4Uy6RmgPYbP11uOCVp71z+olfQ== X-Received: by 2002:a17:906:48d4:b0:94f:1c69:f309 with SMTP id d20-20020a17090648d400b0094f1c69f309mr3146862ejt.15.1681731821217; Mon, 17 Apr 2023 04:43:41 -0700 (PDT) MIME-Version: 1.0 References: <20230304034835.2082479-4-senozhatsky@chromium.org> <20230417050140.1653593-1-senozhatsky@chromium.org> In-Reply-To: <20230417050140.1653593-1-senozhatsky@chromium.org> From: Yosry Ahmed Date: Mon, 17 Apr 2023 04:43:04 -0700 Message-ID: Subject: Re: [PATCH] zsmalloc: reset compaction source zspage pointer after putback_zspage() To: Sergey Senozhatsky Cc: Andrew Morton , Yu Zhao , Minchan Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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, On Sun, Apr 16, 2023 at 10:01=E2=80=AFPM Sergey Senozhatsky wrote: > > Fixup. I think the original patch landed in mm-stable already, so we might want a proper commit log and fixes tag. I suspect we want: Fixes: 5a845e9f2d66 ("zsmalloc: rework compaction algorithm") > > Reported-by: Yu Zhao > Signed-off-by: Sergey Senozhatsky Otherwise, LGTM. Reviewed-by: Yosry Ahmed > --- > 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 *p= ool, > if (fg =3D=3D ZS_INUSE_RATIO_0) { > free_zspage(pool, class, src_zspage); > pages_freed +=3D class->pages_per_zspage; > - src_zspage =3D NULL; > } > + src_zspage =3D NULL; > > if (get_fullness_group(class, dst_zspage) =3D=3D ZS_INUSE= _RATIO_100 > || spin_is_contended(&pool->lock)) { > -- > 2.40.0.634.g4ca3ef3211-goog >