From patchwork Wed Nov 27 13:53:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alice Ryhl X-Patchwork-Id: 13887051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC4BBD6ACD2 for ; Wed, 27 Nov 2024 13:53:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49F3B6B0082; Wed, 27 Nov 2024 08:53:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44EF46B0083; Wed, 27 Nov 2024 08:53:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33D5E6B0085; Wed, 27 Nov 2024 08:53:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 169976B0082 for ; Wed, 27 Nov 2024 08:53:48 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id C089AA1282 for ; Wed, 27 Nov 2024 13:53:47 +0000 (UTC) X-FDA: 82832017758.09.24DB4B6 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) by imf10.hostedemail.com (Postfix) with ESMTP id 541A5C0004 for ; Wed, 27 Nov 2024 13:53:43 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=hsb4fDml; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of 3aCRHZwkKCA8p0xrt6Dw0v33v0t.r310x29C-11zAprz.36v@flex--aliceryhl.bounces.google.com designates 209.85.128.74 as permitted sender) smtp.mailfrom=3aCRHZwkKCA8p0xrt6Dw0v33v0t.r310x29C-11zAprz.36v@flex--aliceryhl.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732715623; a=rsa-sha256; cv=none; b=m9w6AVNXOKW2kCHUl/Kh4S4sJz1UUSKwB4kijvqy/46VXYpbaE0m9r1gP0BxhslcnmVjAD eFokEAEdtqTTOutLB8GMkj4Y9c9On90Lv4/5Yea20eEMDW9S6KgptbY9hIzq2aDgMLd625 UG1xVkwKf65NcTLiLXpt4lOwtWo7njc= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=hsb4fDml; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of 3aCRHZwkKCA8p0xrt6Dw0v33v0t.r310x29C-11zAprz.36v@flex--aliceryhl.bounces.google.com designates 209.85.128.74 as permitted sender) smtp.mailfrom=3aCRHZwkKCA8p0xrt6Dw0v33v0t.r310x29C-11zAprz.36v@flex--aliceryhl.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732715623; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=LgK9zCbOe2BiCOOWFF1Icjmyl+tnwoEPsdpHpZDH+bk=; b=mqQs3lCP+NAiexnGfZZL1ow9Wsa1y6Mm7MAWhWFaQiaL7Eo7od7Bi0ln9TBNbooPFGvDuK R4tbOita6pizWdICb7ABlD+4eJcNmx1d1fFJLj/TSJvVEW8dLXZJUANPZenBqowcKQAFcm JyqX2ZoU2qvbwHSdJv0XG3baqtwyDd4= Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4349f32c9a6so26098125e9.3 for ; Wed, 27 Nov 2024 05:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1732715624; x=1733320424; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=LgK9zCbOe2BiCOOWFF1Icjmyl+tnwoEPsdpHpZDH+bk=; b=hsb4fDmlIWDlD0NpitKsI8ci7tHMDOB/xM0ecLkPiqjfobGdSzccV2WZL0UssY9Gdb g6i3I+HSrCyDQSoxEM78fU28D6SeKiDaPWhZDml6B9l0wnvCUKPxlwyDntpLjLaZjkaN mmeS1e13w3aIjzqcFkECS7EX3wEDslozxWV+53l9Ai80KELz/9duFF9wpBDZEc5EvEdH 0Gkqthx7HivPm2Iggp1C0lKp0lZdSzma68DW+WyU/pyr62b/5NtI5d/JXW1VCEpTad3s x8TMxorjanJyxk6RLQyQBnPj/RZk9l3le0Rt+C3tuN/EQy7EwpEmyX2IcK0663mox2M7 nSMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732715624; x=1733320424; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LgK9zCbOe2BiCOOWFF1Icjmyl+tnwoEPsdpHpZDH+bk=; b=aC1HruP71gVgNvzfIs6Hbkyxa1XA1TzSsq6NdIT5BrZQxSz6e42EjyQb72xXWeQk1W 7Pfitsedxt001aOla2womYkIWBZpfRNpg386C2V0bR3Rh0fkURPbKbTOBrewqJI3/K1z zyMyOXHYsgYDHsZNRS0Yn/a2Eyryp3g7dSUfJvLvl5aFyOGgRVgs0kIo2IEuv4InaI/M /EkGR6PA9XVzGpEgQeoDBqW2n2cd06m7qTxQgUjnXUOHJWedt1qN0dDY9wKPL+pZO9yu 9V51DkGsiv7/w3IFWJ3JxdbdOCdyJ6Nis8/0dxR+fx1mHGiqUzDrJLmj8KA319O1dMqc LR4w== X-Gm-Message-State: AOJu0Yzeoav4d58QWEdqXtEGjoVPzIQ0zqSpHmpoFTH/hPuWt569CaPt jpDfhxusG94j1Jjqc7RfPz7T7TDc5NmnywI/5wjG+6LGY3Sox/NJnJncUPJqTtLvXfed0FoQnYs KoJLJ3YTsHjyhBQ== X-Google-Smtp-Source: AGHT+IFX+RPxfsTxBF2uedBvPaPPaDfX+VfKCPL1ZkMBXNYt1hBypGVgbleoZsTSed9aiiG0gdgG0p5LlymEFoQ= X-Received: from wmee13.prod.google.com ([2002:a05:600c:218d:b0:434:9939:10da]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:4802:b0:382:3afd:126a with SMTP id ffacd0b85a97d-385c6ebe5f6mr2728312f8f.35.1732715624380; Wed, 27 Nov 2024 05:53:44 -0800 (PST) Date: Wed, 27 Nov 2024 13:53:29 +0000 Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAFgkR2cC/x3MSQqAMAxA0atI1gbaIIpeRVw4RA3YgVZFkN7d4 vIt/n8hchCO0BUvBL4lirMZuixg3ke7McqSDaSo0poaPMKF8XQeZ2cM2xNVu4wTVdRMNUPOfOB Vnn/ZDyl9UrmeYGIAAAA= X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=928; i=aliceryhl@google.com; h=from:subject:message-id; bh=VRWUvgzx7rYlrQvUSNUWj7CN6so9aLh1ETeRlJx8kcQ=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBnRyRdE2k0cYM4vlf6PjwbYqBZlP7G2DYBBCsPv 6HHr8havCuJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCZ0ckXQAKCRAEWL7uWMY5 Rre3EACa1v3Wq83Vg13daQF9vKZPS1RVOkozXkfGafrh2EVQ+igtHkTiIAuPqwFbV4D+gwgdu1e oQFXvgE1qGxVlJatPq8USmSHzxuGHgF16Rrg77Ns79SW3SGsCkpJWwSy6zj9Rn/7rOILbbb/i6w TbJHV26JfeUYHQ9BkbQb03Tf2vLYM4hqnQ/Ho+FIJ7RtAH9FWXZQhouiyofH7OAYZ3eDI6nq9rq Qoft8WZ1feNdEt407dNLZl0TSTjJnkF2m71D3QqMb0ufOUdIpq1HzGmo+TrDQAaqMvucDDIZFIy QTDAbaaOz7w9J4YvDqWEMX0tyZ+kZaWuy7dfFlRMjMFq6mUBhKJiOCiVGB1KAO0QDsguPJwxpD/ mphwOcEH6mGxAZQHgl2rMWZIHVGVTMJUQamh5r7iQDn7eiLPmAcWiVPR61NVjWIWn6YS8qphWpA McCqyU0GZDxHQoJyg62jmBGuJBQc2K3ax5poOH1aVfeWYYR5GsC6NsW/TN/R5UycYCjkHJEQ7t9 dJGktcH9O3MOeMObY+NG1aCyJ6GnyQApY9A4TcAqa1KRvZYEy6UKV3b+8uivOkngXRqjjt96tCj D9pL4n+f+2evX2UQfkd2FH0QVREPJgJZZaGzGZUcB33SzXZtxmOBqFPVyV8+uJkSVOLalKBggM/ mTAikKcM8vEccyg== X-Mailer: b4 0.13.0 Message-ID: <20241127-lru-stop-comment-v1-1-f54a7cba9429@google.com> Subject: [PATCH] mm/zswap: add LRU_STOP to comment about dropping the lru lock From: Alice Ryhl To: Johannes Weiner , Yosry Ahmed , Nhat Pham , Chengming Zhou , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Alice Ryhl X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 541A5C0004 X-Stat-Signature: 8cjgerwpps61mjn71jzeku4a1o8u48x5 X-HE-Tag: 1732715623-552250 X-HE-Meta: U2FsdGVkX1+v0v1FmvIp+xJm5aJIf4iLLqqbA+gwkqPnMNtxehrk+8cAdOQo/ZftbD6oueuLl5BcQm3/XsjEMRxR2EU+v26XTQjAhjPUretkC6L6ouC4hzEfyDuCD1733jOPF1intRb3eEW45/d4/ceDUiMt6BPC/uxXHaKhogA4k1OkcFgi7PKriqdW6k3Yg4g0K4I6c5skRHckrrrXT32V/5KfXG1V7gJV77ZilXIZ+N6c3V0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7WX92LLAzCWYkWVPL5X4aaJ1UL24goz53JJHGSZWb6bMsJRujPWVNGdGImVRWV6E98nbpkhS1W/VovpF/QazuyA/TnXbxEqtxVnyVfQTooMmOwCDtWr1/aLVsO7NRjMF6rW+klOx6+7/hU4BCeRsYdAMbMWTpdW3GsBj09sjLG3/jRgPyHkM+3K5dcVedKy2HZjNzENr8hNdlyK7NIA1rCpuOyeb+O1az2BxI66mNde+jRbHtzBVdiEz9hbWW5GsIuQa2RmybGvflP9yjxpkSSlgwY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000146, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This function has been able to return LRU_STOP since commit b49547ade38a ("mm/zswap: stop lru list shrinking when encounter warm region"). To reduce confusion, update the comment to also list LRU_STOP as an option. Signed-off-by: Alice Ryhl Acked-by: Johannes Weiner --- mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: aaf20f870da056752f6386693cc0d8e25421ef35 change-id: 20241127-lru-stop-comment-09dab2427b6e Best regards, diff --git a/mm/zswap.c b/mm/zswap.c index f6316b66fb23..9718c33f8192 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1156,7 +1156,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o /* * It's safe to drop the lock here because we return either - * LRU_REMOVED_RETRY or LRU_RETRY. + * LRU_REMOVED_RETRY, LRU_RETRY or LRU_STOP. */ spin_unlock(&l->lock);