Message ID | 20240220-b4-zsmalloc-cleanup-v1-0-5c5ee4ccdd87@bytedance.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 78A97C48BC3 for <linux-mm@archiver.kernel.org>; Tue, 20 Feb 2024 06:53:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C169A6B0085; Tue, 20 Feb 2024 01:53:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC4486B008A; Tue, 20 Feb 2024 01:53:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8C766B0087; Tue, 20 Feb 2024 01:53:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9762B6B0082 for <linux-mm@kvack.org>; Tue, 20 Feb 2024 01:53:18 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5E5F01205A1 for <linux-mm@kvack.org>; Tue, 20 Feb 2024 06:53:18 +0000 (UTC) X-FDA: 81811265676.18.96500F6 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) by imf05.hostedemail.com (Postfix) with ESMTP id CF80E100008 for <linux-mm@kvack.org>; Tue, 20 Feb 2024 06:53:14 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=bytedance.com (policy=quarantine); spf=pass (imf05.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708411996; 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:content-transfer-encoding:in-reply-to: references; bh=/jIZTsl+I8LkCv+IAO3nL04qZXUePAD8MYJjbla5iZo=; b=InqX3RMhlMA5iRuUw6roGnaZUlQAVMlniwFRnPr+NNslIfyyJLrrA3I0cjJvus4NM1sitW V4jjVzOsLur2Wo+TuTcknfWZ2oQL07Q+gqkBPI3v1qNhfamvVFr1IV5QeOjCY+/CeaGGTE 0i2Dx6DuhwgjsHOAGnwAMejqeYvpwSU= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=bytedance.com (policy=quarantine); spf=pass (imf05.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708411996; a=rsa-sha256; cv=none; b=MxZ0YajcMimiDBaJVmgEJz7hwtrTOKPYcw23MEoHly2FuE3QRX3B5RcizFeKf5QRru/RxL I7y9lOHJnhgxUkuOi2R7X7duXHx9ZGa6lacDeIUwIi2E0s0MHZUdQdJMnG2kzvrMw9RNF8 OQQCj/ZEyGMlme0V9nqgUUYS9yarwbk= Subject: [PATCH 0/3] mm/zsmalloc: some cleanup for get/set_zspage_mapping() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-b4-tracking: H4sIAEtM1GUC/w3LwQqDMAwA0F+RnBeopRbc3yRdsIUYpcEdJv77enyHd4NLb+Lwnm7o8m3eDhuYXx OUSrYJts8wxBBTiDEgJ/z5TqpHwaJCdp245EBpXlbmzDAmkwtyJyt1XLtUn+cPJtXeZ2oAAAA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou <zhouchengming@bytedance.com> Date: Tue, 20 Feb 2024 06:52:59 +0000 Message-Id: <20240220-b4-zsmalloc-cleanup-v1-0-5c5ee4ccdd87@bytedance.com> To: nphamcs@gmail.com, Andrew Morton <akpm@linux-foundation.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, hannes@cmpxchg.org, yosryahmed@google.com, Minchan Kim <minchan@kernel.org> Cc: Chengming Zhou <zhouchengming@bytedance.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org X-Developer-Signature: v=1; a=ed25519-sha256; t=1708411986; l=1144; i=zhouchengming@bytedance.com; s=20231204; h=from:subject:message-id; bh=yJjdYMX6BDehTddWARepn2ys3Jf+gUjLRqGIZysR440=; b=3E03UvayTvmsSPw6C/NHdSEUGs1uauED/D/lL7MgvuRpiqEJ8Ps/jdHWZfuZj80aa7zgPnn9y LOe3amM2QuKCkfKzSc+eAksEkPDA7G8CNAJY287QAJxnv2sCWN18HXe X-Developer-Key: i=zhouchengming@bytedance.com; a=ed25519; pk=xFTmRtMG3vELGJBUiml7OYNdM393WOMv0iWWeQEVVdA= X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CF80E100008 X-Stat-Signature: 6cs4tz81ptdf536snz48i88aawhr9ath X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Rspam-User: X-Rspam: Yes X-HE-Tag: 1708411994-55741 X-HE-Meta: U2FsdGVkX18mAqao3X256Dg5ufI5fUNst8rRTxJBMhGs/QNdCVEizoQm7OTv29rF9o0KAvbcmqqmJ20AXIc3yqwmV/hoDqEKqKflaQ8D+Hbpfc0WYf9sk1EDOxLZvk/azboGO2/0EqNjvBB2pXr4SzISmlnrlpC30jW+AqSo/TQ5f/nGkCnxCEoWiqfNri3aaNYnGqk6Ziae1GkznCxd64fGBgryqoTT6cGGFcz3YTO1TEXeBspoWoiBz6yWzv0ybL+WPIGtmfE3GMvE2Vql5QEkBQ8Xhduwt60k5vDzh2OI2+B9x/MjKKamk1P3emuJ9A4aRn0BXwd420XTL4fawyW/HRi+tK9S8+GZGa67ObL4tUjHHODTa9UOWWolWt6lBjJJlVzv4I87zYfBQaqL7lHzpWq7q52gj6R0Ys2PQADSvbA1H3QurURXWcEuHFsWeA2WKuVOwbcJ9oBRxpWty2oy0bAXtPdCHR8oPhZvFxjvawMhHXtBwA6pg8Vmcml+fng+ZxiP+SMYQaZSEAU2Ik5F1XKcsIow/OfKeJFKF2JV1cG7QnXN98VpWdpw+4lDMn42dcgasIxEFNUtOAWXhHf5IICe5G/jL8z/tSOjsu+TYIg3f430BImZHCuSq+Hrl6u8z52vBeTLohEGqwr+bV3nSnjlJZTALtHRvbtaXzo6fNRGS3D9xKfKr6uj4i3lKzxsWA179/yhj0bKwENZEgG+HKHrJLGM988G6CZ90GdqVeAFBSlbgUrv9FNOX6OuYQV4TryDeg4SbFZODPNfE/DJjGO/gaZer5JzLaPXy6Kza8J6bk7Rt39WflRhd+tC+d8PRs4XTbEuhTaZwJlNCQ6glZ7CtAEwQ4Js7f7v6r2u/nSOWacsuQLfl+qMWpoATkIHVBLCE3Rnd7CMiNd5xHbZAVS8dTQwh9gYRMNjuCBW4XUMbjH90pjNw4OwBTlxgowmORx/up/SIB9zriL MdRO2LiM rV2iDOqGuWv4IyCldjpDmO/+q58IEn+IkFV+NfXF+ysYo9ao= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/zsmalloc: some cleanup for get/set_zspage_mapping()
|
expand
|
The discussion[1] with Sergey shows there are some cleanup works to do in get/set_zspage_mapping(): - the fullness returned from get_zspage_mapping() is not stable outside pool->lock, this usage pattern is confusing, but should be ok in this free_zspage path. - we seldom use the class_idx returned from get_zspage_mapping(), only free_zspage path use to get its class. - set_zspage_mapping() always set the zspage->class, but it's never changed after zspage allocated. [1] https://lore.kernel.org/all/a6c22e30-cf10-4122-91bc-ceb9fb57a5d6@bytedance.com/ Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> --- Chengming Zhou (3): mm/zsmalloc: remove set_zspage_mapping() mm/zsmalloc: remove_zspage() don't need fullness parameter mm/zsmalloc: remove get_zspage_mapping() mm/zsmalloc.c | 55 +++++++++++++------------------------------------------ 1 file changed, 13 insertions(+), 42 deletions(-) --- base-commit: 207636f0f52428f3b46540b212d6f93c6ac484cf change-id: 20240220-b4-zsmalloc-cleanup-560a4159bb6b Best regards,