From patchwork Tue Aug 8 02:47:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 13345613 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 77ADBEB64DD for ; Tue, 8 Aug 2023 02:49:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1BAB26B0075; Mon, 7 Aug 2023 22:49:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16B3B8D0002; Mon, 7 Aug 2023 22:49:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05A948D0001; Mon, 7 Aug 2023 22:49:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E998A6B0075 for ; Mon, 7 Aug 2023 22:49:01 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B840C809A5 for ; Tue, 8 Aug 2023 02:49:01 +0000 (UTC) X-FDA: 81099405282.04.13E0C85 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf06.hostedemail.com (Postfix) with ESMTP id E0D09180013 for ; Tue, 8 Aug 2023 02:48:58 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=none; spf=none (imf06.hostedemail.com: domain of xiujianfeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=xiujianfeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691462939; 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=UNmI7nAbF5QUpQjDfMlpRgUc57W2+H4HYylaIv7dhUM=; b=ytLqC0xbRJFhwRXY4V2JtoVE+P3HuDwlxE6JKLN8ybtKoYHeRfZ/cJwO39os4mcC83hViA me5ndULN57WYjF6nzLmPBdGQwmt2uJtEzoSe8y+FGQFleJkKx8sIe70pn2WBgE5mqqFKXP L0p+qG4C2Kif3sr+0FSlweE4Z8DVZu8= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; dmarc=none; spf=none (imf06.hostedemail.com: domain of xiujianfeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=xiujianfeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691462939; a=rsa-sha256; cv=none; b=wGgMOp3QmQFcamYlrF0r/f9BmtdxOg6Fo4VNUhQXAv4iMJW8GC08kNRK8rca7IVpJd/aAn JzWeS6Bv9X+W/dqPparNOYmeOUu8tyHr1iW7zoub4H6Mp8+QYwe4HnV64dH+1jugbbxBni jdpbAqVXACWVboOSL2ln31itb2edSSI= Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4RKd1F4s1gz4f3s6m for ; Tue, 8 Aug 2023 10:48:49 +0800 (CST) Received: from huaweicloud.com (unknown [10.67.174.26]) by APP4 (Coremail) with SMTP id gCh0CgA3x6kTrdFk53bIAA--.8844S4; Tue, 08 Aug 2023 10:48:52 +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] mm: zswap: update comment for struct zswap_entry Date: Tue, 8 Aug 2023 02:47:14 +0000 Message-Id: <20230808024714.292048-1-xiujianfeng@huaweicloud.com> X-Mailer: git-send-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2VsHNXmCfi9XmE2sLkpWOXSWDKkJtzqquneu7esh98JATY+0VmylMwuY6I8Hrvl838lky7dDh5MN81cxFAblCPaukOa7 BWRuDMde 89rMYoQ+5mvpYjWrVTWXoPlVvlaWYFvsOXZKBkRT7gg7z+4+1eXBQkOevjFN7D3VUighvtOLbcOHwiOmzE/u1cty9gQbql9D5YTor0A1JiRkjvD36Jrc/mDst2ZS7f/J82VaWstRp5ZWDJnp+2nseL2iVdtqhiaW6P+o5ASb36NTHdVUtjQL9OWyG5eRDBuVZIptu5W/EbwXJBzy83SVvcPgvYtz14ffe+R38p2SjGpJEpjY= 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 --- mm/zswap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/zswap.c b/mm/zswap.c index 5b56d38e7339..d7863c139c82 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 - the swap entry for the entry, include 'type' and 'offset' fields * 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(actually memcg) this entry belongs to * lru - handle to the pool's lru used to evict pages. */ struct zswap_entry {