From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74EC937C10A for ; Fri, 17 Jul 2026 16:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784307372; cv=none; b=Lm+VJut7w0ERaKcC2SPuqUtaLgrJly6zky+1uiIz4I6YWfz158s/Dg2omUHEhbyXaijg90u53AiaAVKgXFBBELNGa+lY1bMRcENGvXSmb13lQG0LzqnsMJbpv97w16pgT/IyLafPFgJAXnXqn/2Yajs9i/XZRWLqVDQIE9jaV0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784307372; c=relaxed/simple; bh=YaHlt41/hvOJvLvitj/2kxV3NYCQuixNvOi36N10KU4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=rvwz4efSb0KTymvM2nGK293gDflMomNfTFondFYUrjNZcSFCuJQEYYcfIWdIs4Hn99keUxhrJN1tpxdXRQ29FF4lKAVygP4BMcJzqTESo7GFoGIrE9WqpvhDSe87Br91GQC7BRnrAvTYL0BjOANPA5Y/o9XznmBz8ju6wX4pbMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MUi2FbPm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MUi2FbPm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12EB91F00A3F for ; Fri, 17 Jul 2026 16:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784307371; bh=YaHlt41/hvOJvLvitj/2kxV3NYCQuixNvOi36N10KU4=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=MUi2FbPm3fwo7a8P3d5fdAYLmDCQg3kxkoNN5vhp7ggx/WyX66s8yJlZ1SBJIvh7i a2OL+Rhs7B+NX5vt40G3lXMuMlqgIdtHFnEbwxIPTNEmpF/g0rXnLVARMGVkYeINDw yPI2b4sWELW3OKh/WnsYhjrBsEMqT8aWBc9dQnE5GqK5otRTG60vTIm/KsD3sjhAUh i5uXe2WDauDfCFarcaHpNcfbmT4Z83XNC0iB1vTjLbUKmAL7gjYKX9Ecu7FzHEamLC GJYVIBoP1HI/Z7EJ8u0g79yTbG1sAx/Twt8wwbQ4p87vjktQs2l8r8jMsu3zuf2NSL jlXTp4boWMofQ== Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-92edb12cdf2so295432685a.3 for ; Fri, 17 Jul 2026 09:56:11 -0700 (PDT) X-Forwarded-Encrypted: i=1; AHgh+RqUblkn5L8iXFSIn7pJDzCeZfPfC7xB1z2qfGAImX+IGZGwQgtu17unB43qHEgltDWJO8pKo8t4NYmXVdI=@vger.kernel.org X-Gm-Message-State: AOJu0YyvYnH5VZyQiLDWl7s66GCDD04isUP7mktmq9Dxqa6f9rWI3kA8 l3u1YBMrxtB5ddYqIvycvIlxQfFJ4SCqdjWT/fc4RQLkcWtidbPjS/etgSZmkpsSqylCTlaZjvY AciGx6VMd4lPGmLWotA0xiLaZAKTDzK0= X-Received: by 2002:a05:620a:1988:b0:92e:5259:1154 with SMTP id af79cd13be357-930b3ecc422mr401488385a.39.1784307370342; Fri, 17 Jul 2026 09:56:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260714081510.16895-1-jiahao.kernel@gmail.com> <20260714081510.16895-3-jiahao.kernel@gmail.com> <2bc8e4f6-46a0-5b74-6eaa-59e7aef9227e@gmail.com> In-Reply-To: From: Yosry Ahmed Date: Fri, 17 Jul 2026 09:55:57 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AUfX_myUxG7G3wSjX3kFU7KHxWXdkDog2oSpDszGYJpxnIxoJbNXRcZjOxi9Vho Message-ID: Subject: Re: [PATCH 2/2] mm/zswap: Support batch writeback in shrink_memcg() To: Nhat Pham Cc: Hao Jia , akpm@linux-foundation.org, tj@kernel.org, hannes@cmpxchg.org, shakeel.butt@linux.dev, mhocko@kernel.org, mkoutny@suse.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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 17, 2026 at 9:50=E2=80=AFAM Nhat Pham wrote= : > > On Thu, Jul 16, 2026 at 1:35=E2=80=AFPM Yosry Ahmed wr= ote: > > > > > > It is a bit alarming that the store rejection rate is still 43% with > > batching, but we can worry about this later :) > > Yeah I think it's unavoidable at the time the global shrinker is > awaken, unfortunately :( We need to kick off shrinking way ahead of > time if we want to avoid this, especially since the rate of zswap out > is going to be faster than the rate of writeback (CPU vs IO). > > Sort of why we implement the proactive reclaimers :) Arguably, reclaim should wait for zswap writeback and retry, similar to how allocators wakeup kswapd and retry, instead of just skipping zswap. I was actually thinking about doing this at least for the memcg limit case, eliminate the sync shrink_memcg(1) call in zswap_store() and instead wakeup an async flusher and sleep. A problem for another day I guess :)