From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 BDDAC233933 for ; Mon, 20 Jul 2026 01:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784510823; cv=none; b=CiB7lRPPI5LrzOO0+X50W/zFjZcM1JXIPvqZbJ17lDR1YVTeDAkyTmNN03iISUW/g/KMqFlNpsEDQT9WzcXjuFpxcF7jLx4WIEZcvl6o+b3ndepEO8cSBsmlFyQ23D/bK1gpwIpInRAVeYw2DzMsCIBji91AU+JPplzifckCasA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784510823; c=relaxed/simple; bh=HGYuSPtjGaJQmKS1H4EHNovCQZ/qJMDtrtwwlCqhRsg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VbwdedkuZG0myrR3nyzYqo9cWhgUUi88PeAtFOwOjvS+So78bjqKC/yhc9PX51Co3ge6sEWBYm1a2ngocma/hfn/RKxhYP5jEjFb1NCPC7T9EJa7IbFw8uLlkzkyKm80CwCH05kFPog0iePD9tP0Zd70bv24f3dfiekaYsI6CW4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QgIa23Vb; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QgIa23Vb" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2ceb096e675so92589145ad.0 for ; Sun, 19 Jul 2026 18:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784510822; x=1785115622; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=BFiv0hXx9c1wz+9oCFT2VYuHi8ADjSyN7c0ptHnERB4=; b=QgIa23VbE8E8Hx9hJngW6nyLoC4C4gCVAeloWndSOJUW+yRmWzgqyeArDWv7Cb5bE6 DJHi/S7Ito4dKn/PvhVsV2ergid+bKZIODPukG04ErXPHrihEnJbS00Q3OTZZNfh6ysB lX7T7tpvG0UdUs6JHIXjTPVcBCZ1he6UEoxPOk9XM/wPTyzUrRbHIjjdmpt6//uvNzvA qZPLu8q9tKlIE7dTuOuttFT+gkY8M8+b9TtRpfyNU+gsYsiaHfMVBjB199IsmwUc59ZM Q63GUejT4iqHknx3P3sMdwQcJiJa9bpUK+M93J7Of+whFkSftierVnWcpkF+o1THXeF3 irOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784510822; x=1785115622; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BFiv0hXx9c1wz+9oCFT2VYuHi8ADjSyN7c0ptHnERB4=; b=MksYK1qRdRhg7ORgIG2Vhv242yKAUprcCJcXj+jWi5EnHe1giE2Pzfk8LnRYZWRBUj OtVUutwrlvfYRmS+Is76o9kOao0A/DSm5T6BJESHAwv76ZLVziKrIOSdYJAgq/Zi4nob 93kAdKAge4xZ83nNhOzHWExZL5BCCy89LmnNzxnbwGw4bUGj9Fbrq8f08v19VoQcIfJC i5P7pa7DoUBK+Kzh9mVIGAC6DQuTKIR1Qr8Rkb1s1DrXnazGDEp60F7Lu1M6Kjv6COnU z0hXE+C8jfBi70IZgO+1nV2oOJJh4lQ8a2NrPz/e7f8/BHlEss9VxUAuIN/BRP9KIVwn I24w== X-Forwarded-Encrypted: i=1; AHgh+RpOvx/ehwweKY+ixt2/ePvxh5efoNE+Uz7Zo4dvN62nR/jihJGsnzMqbf4QtTDu6RuoQXb0F5Y2nsgzGm0=@vger.kernel.org X-Gm-Message-State: AOJu0YzyB2cUzWyzGssr78u2WRwwQzFgOEPvfr8bQ79HPjWQHFTby/75 tIRifM8mMl8PNgSmh2q/YpATtisKxs4F7sLKDzlYEGAEbTB7shoBN3wm X-Gm-Gg: AfdE7ckLcd+ng6E9guyA0xLw8bxu8Jas2YFGQ1iUcf9dfYWQf4PKuBa3JxogXr3KyrK BLTY51W/Ril+DJW9Nogo2uQ7Uh38KeJWo3Hk8m8nECZ1PdrFENtahCTGZB5Y1ayeepvyfdVuqbr Wb97jQ802whVVrO/X53Zs+Q1zgDrSw3coom+XSUsBAPYwdNGdNJrtFDtJ3Ql2I+HRxbgQx3e+pS ZPakje38KRsKLIeshyVTkCvDaF18i4av/fZ0IxQFrW/5fvd/3hFpJ+khxzg6vB3DgGnkgcw40s5 /L/+Wtj0vnjQccDEPPRv12u/CBzXZ0eEYAusW/ECm87TX4ANCfnoXfW4xP0Zy1CeSYGYIWqNPBP zgeKm/CxJhynhZY+gsDWgqlyNphxN/bgeh9nDYSy7eU30c12CPXm6+kspIIuBXodCOIJfFjAX8a 3KB8x1HXPPqTaI9Ib+yZY+43BL7e0YT/5X/tAf4DZ8TFE= X-Received: by 2002:a17:903:2ec5:b0:2cc:77f3:a927 with SMTP id d9443c01a7336-2cf34961e63mr155206525ad.26.1784510821982; Sun, 19 Jul 2026 18:27:01 -0700 (PDT) Received: from [10.125.192.64] ([210.184.73.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cf347554a2sm48005765ad.73.2026.07.19.18.26.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jul 2026 18:27:01 -0700 (PDT) Message-ID: <7dbde343-fbbf-6a1d-1785-ebf9f5a04f6b@gmail.com> Date: Mon, 20 Jul 2026 09:26:50 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH v2 0/2] mm/zswap: Fixes and improves the zswap global shrinker To: Andrew Morton , Yosry Ahmed Cc: tj@kernel.org, hannes@cmpxchg.org, shakeel.butt@linux.dev, mhocko@kernel.org, mkoutny@suse.com, nphamcs@gmail.com, chengming.zhou@linux.dev, muchun.song@linux.dev, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Hao Jia References: <20260717085151.22822-1-jiahao.kernel@gmail.com> <20260717181839.c94d0335ccef0084707d3d85@linux-foundation.org> <20260717214031.8b22e9a37ea3b0c564b466f0@linux-foundation.org> From: Hao Jia In-Reply-To: <20260717214031.8b22e9a37ea3b0c564b466f0@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/7/18 12:40, Andrew Morton wrote: > On Fri, 17 Jul 2026 18:28:04 -0700 Yosry Ahmed wrote: > >>> >>> The [1/2] changelog lacks a description of how the flaw impacts users. >>> Please describe this fully and maintain that info within the >>> changelogging. This info helps -stable maintainers and others >>> understand why we're proposing a backport and helps myself and others >>> with timing decisions. >> >> The first line in the changelog should be sufficient imo: "Zswap >> writeback on hitting the pool limit is broken when memory cgroup is >> disabled" > > "broken"? Perhaps this means "fails to occur". > > But what is the userspace-visible impact? IOW, why are we proposing a > backport? > Perhaps the first paragraph of the commit1 message could be modified as follows? I have added a description of the issues that occur without this patch. Zswap writeback on hitting the pool limit fails to occur when memory cgroup is disabled, because mem_cgroup_iter() always returns NULL. Therefore, the global shrinker shrink_worker() always takes the !memcg branch. After MAX_RECLAIM_RETRIES empty walks, the worker simply gives up, so it fails to write back anything. As a result, once the pool reaches the zswap limit, every subsequent zswap shrink work run is a no-op. This leads to zswap store failures, forcing pages to bypass zswap and be written directly to the backing swap device, which can trigger issues such as LRU inversion. Thanks, Hao