Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp722427rdb; Mon, 29 Jan 2024 16:58:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmZ2PRcE4IypMEFMn5U0X2NfPBlJDXsPECH6iS4IHHNmcyPH2U/AkNtcXtJFPOYhrrJj5Y X-Received: by 2002:a17:906:179b:b0:a35:51b1:c757 with SMTP id t27-20020a170906179b00b00a3551b1c757mr4928814eje.38.1706576295720; Mon, 29 Jan 2024 16:58:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706576295; cv=pass; d=google.com; s=arc-20160816; b=pb7vtbo2ZY/hcMMyl3nJ1sfvfwAIcN4o1vZY4XWhhO+THTbRt2CvYuBmQMuC/GsHbZ IZJ5YUMwdIW4m7yN0+1MhelLHvTyKx0YXkcxFk3F1q5Av8psPGdg9+henu/EyCPptAK3 F8ZweVZ4qeDKNuYG0/f2hnjXnp111rBgNIpxtkdpU05vpKaOrX+QBdb4ju0YPpI8u/sQ anZwfVi2ZOMovszXxk6XWk6qIdIYUOWd0OH+0r+DxWFS3K1D4m+yQovWiK2EswMBw8hs QwblPi+FmuOJiJsSfqyaNEsHWfdKzUwPcPfgis9oiZUmKYAHbDrO97W8BAcIPa3a/MCU vjsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:date:dkim-signature; bh=vehqthCnPjetgrYtj1oh6HOMUQNvBhhq4E/y9/quWI8=; fh=G0uv2DKB17e5YFjNbJphjKGbejnJ2vx7m1Bfunb3nHk=; b=ehw8T908B4UaJEwDzvD5l1lcObyQfGIsbpk+jKkpYzKcee8eQ8NTkitEzDXgW5Qf85 1h34AV+vCh7d0Tw3woSsLG8YseFYBYXyuQ+bzSasIrnViKqioafq/WJV2eN9vnhwkC1Q Jp1sH0/6BdqzzOaIq9SIOhJBW50hu2do9ItanyOINeHLmz2d7iq9py+jO/wL67X2MTW4 n90onSa2x0ZHSvU6dWewTyR+KE497RlBshJZ3+2146yhLvIpdGMk8ccaqTPTww1l95+k UjzuMlNGjqt6amCcwwRKkylbljYAoi8I3vjByLervRpuGuHHuDW1q2Q1ld77A3Diid+B Ijsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bFrtjSpt; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-43701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id oy8-20020a170907104800b00a34a63b22b7si3850792ejb.1001.2024.01.29.16.58.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 16:58:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bFrtjSpt; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-43701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 729501F23628 for ; Tue, 30 Jan 2024 00:58:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D25592C85F; Tue, 30 Jan 2024 00:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="bFrtjSpt" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C8111E89A for ; Tue, 30 Jan 2024 00:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706576289; cv=none; b=SQnRCjVxAyKiXsSr2v2Lr6BvOZbMsMO6SaRmgNjfNgQwD2n6kukHx55UkSExnganX29t9gphOcD/WM+JRSmcHehw2+A4+098/JEm/2PtsHILYPdCDTGsBIfqoYKrKDWxgBZvwaJm4rGpjlMQuAZtk+ZYx9ggSIFdLnurf/iNsHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706576289; c=relaxed/simple; bh=vehqthCnPjetgrYtj1oh6HOMUQNvBhhq4E/y9/quWI8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=X9CPHi8tctz+zRQi89DyKIHFbuBUw7Xb7wdps2GfHsmcPxkcAk5kx81niD/DTUH3yHgoCeRhYHfsYifJ/kokkk2K+O846D3C2NZUsGv3y4C55LRKvLJq9kPWzItiCc3yMc5DjiGQLLy81kgEyE50mtVz/JtwL5C54tgQdKJRLd0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=bFrtjSpt; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-5eba564eb3fso70641737b3.1 for ; Mon, 29 Jan 2024 16:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706576286; x=1707181086; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=vehqthCnPjetgrYtj1oh6HOMUQNvBhhq4E/y9/quWI8=; b=bFrtjSpt5UamRoEjZMFtgYUlBt3LCN/qxtpegnfoh1T6t58Zon7MA03q4ezavNNwX5 EeWab4NLbwcYiTLH1D+nAfAbTy3MGOHPf990PGXPzKSK2zvJ8QyOCS3L0KDGwS4kRKY4 zPjFc14Zt6JkZD9dMdR+jGUjwig+RA1luMfXIhQ1Y32KqCNztdy6MAKDIgU9dEt/Ntmv pDsvPJPy9t1kWPu8LULxwR1yqggzrM4gPjzIu0HxtUy7f/f9Wtq8QrIf3RfvoiNtOmnA dXbuOvsA+IlOzPgEbq2ZUQMmroU2eingzswY3bAFJixxWj0J370XJdMLinZhqYRovyEX +urg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706576286; x=1707181086; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=vehqthCnPjetgrYtj1oh6HOMUQNvBhhq4E/y9/quWI8=; b=ENwwh2Ws/uUUoaFh5ASeMityyIebgVhlkWwMhxhYKDw4cVzeLbytJO4vEdWnwpyoQb 7r/2mv77LLGLMCBqgUsyGve5O/E2E0rXc0uYQ4kL5rmgPpHtAao+OeYmZIZUniyz1G/k 20lqQiVi6asRmsGhQv7rUy1+32k7U/8xImtzD/0S2tWnWagVOIDN4eVK/35WbNb0CfNJ JYX3h4pF52JjFfm3KFOoManD03rfIzXjHZMV1zUVbepyyMGm1HNYcy9LWo6osHBCF7lB dTU1lHitK3hWF7Tr4qgJQ7wMghn40RaT6tEdB4JwZuDl2mGrzvH4LsPNCAO+hfY/qJ4L A8jQ== X-Gm-Message-State: AOJu0Yw3+OSgWRvwbYAUjPoWNz/gyl/ZApJZ9/r2j4gdKBEQxMH96L2i LO5wAOn2No8DOd3M1bMqc0MgnNcdYGkd5kOrxXobunWJ97Y9s1ZEJouITyN9w6zlBceBmOYPZya m0/tVgrs9qp5F5S1OEg== X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a05:690c:38a:b0:5de:9c9f:3ee4 with SMTP id bh10-20020a05690c038a00b005de9c9f3ee4mr2266697ywb.6.1706576286454; Mon, 29 Jan 2024 16:58:06 -0800 (PST) Date: Tue, 30 Jan 2024 00:58:04 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240126-zswap-writeback-race-v2-0-b10479847099@bytedance.com> <20240126-zswap-writeback-race-v2-1-b10479847099@bytedance.com> Message-ID: Subject: Re: [PATCH v2 1/3] mm/zswap: don't return LRU_SKIP if we have dropped lru lock From: Yosry Ahmed To: Nhat Pham Cc: Chengming Zhou , Johannes Weiner , Andrew Morton , Chris Li , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2024 at 04:12:54PM -0800, Nhat Pham wrote: > On Mon, Jan 29, 2024 at 4:09=E2=80=AFPM Yosry Ahmed wrote: > > > > On Sun, Jan 28, 2024 at 01:28:49PM +0000, Chengming Zhou wrote: > > > LRU_SKIP can only be returned if we don't ever dropped lru lock, or > > > we need to return LRU_RETRY to restart from the head of lru list. > > > > > > Otherwise, the iteration might continue from a cursor position that > > > was freed while the locks were dropped. > > > > Does this warrant a stable backport? >=20 > IUC, the zswap shrinker was merged in 6.8, and we're still in the RC's > for 6.8, right? If this patch goes into 6.8 then no need? > Otherwise, yeah it should go to 6.8 stable IMHO. For some reason I thought the shrinker went into v6.7, my bad. Then I guess it should only go into v6.8.