From patchwork Tue Aug 8 06:20:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 13345726 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 BE2A8C001DB for ; Tue, 8 Aug 2023 06:22:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F9FF6B0071; Tue, 8 Aug 2023 02:22:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AA246B0074; Tue, 8 Aug 2023 02:22:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 171628D0001; Tue, 8 Aug 2023 02:22:46 -0400 (EDT) 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 052806B0071 for ; Tue, 8 Aug 2023 02:22:46 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BD2BD120466 for ; Tue, 8 Aug 2023 06:22:45 +0000 (UTC) X-FDA: 81099943890.19.FC9840C Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf29.hostedemail.com (Postfix) with ESMTP id 3FC9212000E for ; Tue, 8 Aug 2023 06:22:40 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; spf=none (imf29.hostedemail.com: domain of xiujianfeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=xiujianfeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691475762; a=rsa-sha256; cv=none; b=txN8TfPGgelKCgk6g1dlBaKfX5rwU9+UAZs4ud9MTRbglbJQ3cY3XJhNBMfKPxO5l/r0Ko dDZTM9AfIVJ17dvihYQTZ3toHentDoWmAPdwh5rRN4+KjRt8Sk9eUmtoVKFFLJVxa4GOuc iYFow2Sck/NRwiQ8/PpoH/VkHm6eWbQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=none (imf29.hostedemail.com: domain of xiujianfeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=xiujianfeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691475762; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=w9b3pyAF6piNXDOJeyjtKZiKHeY/qiI0LDSvP3UUMRs=; b=hI60ICBCE6I2WlciI91PlsEh2/7kFH5PaXPgc9/4bA6rA5kD9xKWf3KzVL+y/fAEsa6BP5 Y/+lqyM8R5I9ufkMfsQkKyGVOedV65BldzCupY1Pw8vBkS4t7opXut1DOTdX5OiJwiJMPc iBlTdTvKbG87cORa6A1VAY+XEAQDl/4= Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4RKjlq4tmcz4f403L for ; Tue, 8 Aug 2023 14:22:31 +0800 (CST) Received: from huaweicloud.com (unknown [10.67.174.26]) by APP4 (Coremail) with SMTP id gCh0CgA3xqgp39FkoFvUAA--.30412S4; Tue, 08 Aug 2023 14:22:34 +0800 (CST) From: Xiu Jianfeng To: sjenning@redhat.com, ddstreet@ieee.org, akpm@linux-foundation.org, vitaly.wool@konsulko.com Cc: linux-mm@kvack.org, xiujianfeng@huawei.com Subject: [PATCH -next v2] mm: zswap: update comment for struct zswap_entry Date: Tue, 8 Aug 2023 06:20:56 +0000 Message-Id: <20230808062056.292950-1-xiujianfeng@huaweicloud.com> X-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-CM-SenderInfo: x0lxyxpdqiv03j6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3FC9212000E X-Stat-Signature: p49t8xsgpo66ehmru773mwaf9jkrpcjb X-HE-Tag: 1691475760-78553 X-HE-Meta: U2FsdGVkX19L9vWr4E0Rj4y8e7bvHqi2l+uy+IrCnV0JDAhW4PDhCmZzp6rqyZevOV2hwTRiTIG3PMhNlYtdH36pLetrn9jHrgM15sJ1jArJsbNnTPartVwxW/x5r279UshbRXN1eIXniLqlWJcx+W+pQ00eSq0h5ksc+ToQrMNTGyRbefCmayXDMyCdVqXCyYrO5vxbQ+IeN/CyumwAzx7ZCmakpknWfnATaigaf/8P2lT/nQGsuRd4YYwuGFSDFO8UdhQKOUFLE9XE0Yb9GuN1j4rnJnKG8OfN+ix+FNf7nY3ztMWPUf5T1L0ittUt8ofs0dQjeT2ooyrsOl++t5iij7dqHGHeSIVqx/7j+oPCaW8/SB/cSCYr2WG33u56fUgo03FGUa3DjYZSHG1/Gib3ttFXvN+uJh/F28pCrOpolYcE1pMGlq2x3fFeO/g7NBkupdY+UaZTNZtVIDUZOHeFQUN/uBlRem6uFSN79KV6Y3e8N+wQ0iF+50jTrvnl8bcd8wod2gx4pTfj/imCKa2tfQJG8xdUqSk8ON2UK+toVEvqZxo4+Rf2xxcUkIn+4NCcNIitjcdjoaCQODXlfhj46bLn3J0Yu53my5Stg7CZjrx9VJbfTsMl5yJHRQT1GF3kbCXaW3toObU+mau+qrmSbo7WALeWpjY8t65UY9wvuEhtv5lyG4sSAqd6OT9U7L5om6ZyVwX7ULxfuMI8buf7tNDlj9T3o1DS8l5lUQPOwpTzu3cv6n9E1kKWMJuAwn/42Fwv6TzCyg42R18+1StSxIa455zycjjEKCrcJmx1bNIFrLHSp0suxPqO5JlSfLurlClKQMBCPsdTtp9JMUab2pczemfIMV3riOmca49tU6n4Ko5rfRnXry7QOq6VgHlUkiCC/m4szLV5/wZ7WHagEXmmQQ5+oHPuzYaKyMwKHeeo7AUEQX4I0+1fekM4OEysPlyVbJqs38DVLJC HLSPdzhf MKsbREP5nfVJG+m/FMyjgLosfanRnqkPWIdMo9+p92Qp/uU10VukmetgboZ1JSW5bfqD+UvfE05pbdjGQ2Qt74NZdFFvbM4tNT8QY3QfLgw1TIndw2a4TcJOeKz9E72MGM5yJE2oagQhSWtiaa5tcsYxbxa2yjJvN77wzrJnIlLgVJavKhiq/L/M3hzLpUYjvih5Oa0XAaIfPKPAYcNzieSVfg2liO9v6+HqNpxmc0vZP/AM= 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: From: Xiu Jianfeng Since commit 0bb488498c98 ("mm: zswap: remove zswap_header"), the 'offset' has been replaced by swpentry, update the comment for it, and also add comment for 'objcg'. Signed-off-by: Xiu Jianfeng Reviewed-by: Yosry Ahmed Acked-by: Nhat Pham --- v2: reword the comment --- mm/zswap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/zswap.c b/mm/zswap.c index 5b56d38e7339..1e17f11a7896 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -182,7 +182,7 @@ struct zswap_pool { * page within zswap. * * rbnode - links the entry into red-black tree for the appropriate swap type - * offset - the swap offset for the entry. Index into the red-black tree. + * swpentry - associated swap entry, the offset indexes into the red-black tree * refcount - the number of outstanding reference to the entry. This is needed * to protect against premature freeing of the entry by code * concurrent calls to load, invalidate, and writeback. The lock @@ -195,6 +195,7 @@ struct zswap_pool { * pool - the zswap_pool the entry's data is in * handle - zpool allocation handle that stores the compressed page data * value - value of the same-value filled pages which have same content + * objcg - the obj_cgroup that the compressed memory is charged to * lru - handle to the pool's lru used to evict pages. */ struct zswap_entry {