From patchwork Wed Jun 8 14:40:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12873595 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 D5984C433EF for ; Wed, 8 Jun 2022 14:40:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A33E6B007B; Wed, 8 Jun 2022 10:40:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 651046B007E; Wed, 8 Jun 2022 10:40:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 519E26B0080; Wed, 8 Jun 2022 10:40:36 -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 35D446B007B for ; Wed, 8 Jun 2022 10:40:36 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CFDE8141B for ; Wed, 8 Jun 2022 14:40:35 +0000 (UTC) X-FDA: 79555329630.06.7CA1E60 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf30.hostedemail.com (Postfix) with ESMTP id F1C5D80034 for ; Wed, 8 Jun 2022 14:40:34 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LJ8ws5ZS6zgbgq; Wed, 8 Jun 2022 22:38:37 +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; Wed, 8 Jun 2022 22:40:26 +0800 From: Miaohe Lin To: CC: , , , Subject: [PATCH v2 0/3] A few cleanup and fixup patches for swap Date: Wed, 8 Jun 2022 22:40:28 +0800 Message-ID: <20220608144031.829-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: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: F1C5D80034 X-Stat-Signature: h4zju94t611cayzw9xqbe76daf6q7hg4 X-Rspam-User: 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.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam08 X-HE-Tag: 1654699234-315028 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 cleaup patch to remove unneeded swap_cache_info statistics, and two bugfix patches to avoid possible data races of inuse_pages and so on. More details can be found in the respective changelogs. Thanks! --- v2: collect Reviewed-by tag per David drop patch "mm/swapfile: avoid confusing swap cache statistics" add a new patch to remove swap_cache_info statistics per David Many thanks David for review and comment. --- Miaohe Lin (3): mm/swapfile: make security_vm_enough_memory_mm() work as expected mm/swapfile: fix possible data races of inuse_pages mm/swap: remove swap_cache_info statistics mm/swap_state.c | 17 ----------------- mm/swapfile.c | 14 +++++++++----- 2 files changed, 9 insertions(+), 22 deletions(-)