From patchwork Sat Jun 25 09:28:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12895279 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 9B1D1C43334 for ; Sat, 25 Jun 2022 09:28:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 146988E028E; Sat, 25 Jun 2022 05:28:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F7806B0123; Sat, 25 Jun 2022 05:28:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F273D8E028E; Sat, 25 Jun 2022 05:28:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E4BC36B0122 for ; Sat, 25 Jun 2022 05:28:23 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B9F0F33EA3 for ; Sat, 25 Jun 2022 09:28:23 +0000 (UTC) X-FDA: 79616232486.30.1D7E557 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf30.hostedemail.com (Postfix) with ESMTP id 004778000A for ; Sat, 25 Jun 2022 09:28:22 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LVTBR14TTz1KC0w; Sat, 25 Jun 2022 17:26:07 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 25 Jun 2022 17:28:17 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , , , Subject: [PATCH v2 0/7] A few cleanup patches for khugepaged Date: Sat, 25 Jun 2022 17:28:09 +0800 Message-ID: <20220625092816.4856-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656149303; 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=3S4IYH3rORjzgPfdwFpMjU+jGRo2Dj1nGsy3rIRN454=; b=BWpBn5NU0xhMFPEvS87cJWSfDtxxRZXiADm/WPc1cQFMAUyFlpABXvkVC8y+m19+rRilcG eSLi8ubxdh6ftCYtroRjb4kRWRtmRWaWWki5KzM8Nlw3dn3p7p/4IBLuzeTeBSpgIQR2rG LdhGkfsfn9BfqEIYAKXcAHjRtZX/aRI= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656149303; a=rsa-sha256; cv=none; b=3sbk7seV4vGcn0htLqm2jj9p1SK9m84Z34QPEb4uqCEMY773x8tzoGcB9O5FArsZgjAc31 iHxkGZaytiIcNUMNcjbVezGJqnor9UcklZS/ICUr7GrSL8syxgQ3Q943BW8czagNQ19cVl tPzHoVBsNNW/aEJjjBBBeXNqmSa/rs4= X-Rspamd-Queue-Id: 004778000A Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: doau8mwef6ukf6zhypems5g648onki7d X-HE-Tag: 1656149302-536136 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: Hi everyone, This series contains a few cleaup patches to remove unneeded return value, use helper macro, fix typos and so on. More details can be found in the respective changelogs. Thanks! --- v2 rebase on linux-next-20220624 collect Reviewed-by tag per Yang Shi, Zach. Thanks. tweak commit log of 1/7 avoid relocking mmap_sem and adjust "swapped_in++" in 2/7 add comment for nr_none and NR_SHMEM in 4/7 align args with the opening brace in 5/7 and 6/7 do free_swap_cache before put_page in 7/7 --- Miaohe Lin (7): mm/khugepaged: remove unneeded shmem_huge_enabled() check mm/khugepaged: stop swapping in page when VM_FAULT_RETRY occurs mm/khugepaged: trivial typo and codestyle cleanup mm/khugepaged: minor cleanup for collapse_file mm/khugepaged: use helper macro __ATTR_RW mm/khugepaged: remove unneeded return value of khugepaged_add_pte_mapped_thp() mm/khugepaged: try to free transhuge swapcache when possible include/linux/swap.h | 5 ++ mm/khugepaged.c | 137 ++++++++++++++++++++----------------------- mm/swap.h | 5 -- 3 files changed, 69 insertions(+), 78 deletions(-)