From patchwork Fri Apr 12 02:57:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13626702 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 2BA2FC4345F for ; Fri, 12 Apr 2024 02:30:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91B036B009F; Thu, 11 Apr 2024 22:30:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C88E6B009E; Thu, 11 Apr 2024 22:30:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 719E16B009D; Thu, 11 Apr 2024 22:30:04 -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 51CD06B009B for ; Thu, 11 Apr 2024 22:30:04 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id EE0EFC0837 for ; Fri, 12 Apr 2024 02:30:03 +0000 (UTC) X-FDA: 81999299886.02.7E86545 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf27.hostedemail.com (Postfix) with ESMTP id 1E0CD40004 for ; Fri, 12 Apr 2024 02:30:00 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712889002; 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=NRkhSVMQ6bwRp+dPYlaIdioHuMSmSeTYWWwt1p38Q+o=; b=fW2yc7vsMkde4yDcyuyi9j9Rtgd8G8scotm17uFmkhVLs8qSyJu3pTmexF3Il1LLtWQYG6 /vC0TMd4OT3md65JH1/LaYYllB//6go9Dtd311ANmosUd/NpD9goUO0bluBWqS0awDRULI G8tFB8mWXXYvZU8saVSUnRJk90a7iGI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712889002; a=rsa-sha256; cv=none; b=UCjQVW0cIbwwtDFsxdFQewSBsDIiSeAAV8jgnD7vw8UT1I5+Iz67WNsSJJkh46rVN3KFFB 4U1yDTT7Qzl5KZZI7RRc/A/1mp9n5zQ5oJ62bWnZsEU5ekJghpWOMH8eJZP4v9lF91Yb/v pt3BQz6fyWis7SgugY5mNNLt+g0ghQo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VG0nb2nCwzwRcq; Fri, 12 Apr 2024 10:26:59 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id A66F518006B; Fri, 12 Apr 2024 10:29:56 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Apr 2024 10:29:56 +0800 From: Kefeng Wang To: Andrew Morton CC: "Matthew Wilcox (Oracle)" , , , Kefeng Wang Subject: [PATCH v2 0/2] mm: batch mm counter updating in filemap_map_pages() Date: Fri, 12 Apr 2024 10:57:02 +0800 Message-ID: <20240412025704.53245-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm100001.china.huawei.com (7.185.36.93) X-Stat-Signature: 5gppbkkj136i1hi17aobictoehoa7mo3 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 1E0CD40004 X-Rspam-User: X-HE-Tag: 1712889000-29765 X-HE-Meta: U2FsdGVkX1/A5LqoGOLAhRnHkwcR/UDdYzgBlB8BUSf3HYRJKYfaLWPDzxO8MYhbDl+l0bWgXov26j/WmG5T7YFDZxbbsvbAOXrRCz3p4xGDI2TChQFXsXtmLhGnkZctnYw5QJOWQ0sUyI+yg2BBaQX5mhS54xV4ZzBglyUXc5wSwqOW/b0vRu11RlxGQ1xHtwb/lPtLW7G5syOl8BaSF5WUkViffM8EL63mPlr85zxIbFrNCsBPBOjoRBmKn/zeoDw4woqlZmJ0tekxtaR7NyREctAumCkpjou+cGj9lV+uCqe+RrYgyC7miXSrNkYFZtDaBH+gLInjOtjUx7qtPV3PxKq3kBdtoXW0LVuh8/UdQW/ao9sMuLZ4S+qm3FVXlPMTr+LhzBMoFuy892i6TBslYxL1cZmLgbiGZjKnLL8qiHCg7u8fJ/pJMaIMLvpRMhbk0LWmJcGt5dIWZuvpGatdz2oF2IXNfVMB2zmeOz5KEDxzC8/4O9OMyGLcjyTW5wsUJLosowYxYv5ypr72XuZyICb0CIvKRxNmC43qfyBltP7+Yj3T0xlfty//i7uWiaRaMSdnfOyxUXVMoFkYk/bHfyyqEwbEZhN5BVDGNG85j7fK2NvR8waRzlEW+dbrXcuaFtBohW6x3vcIcv3njF0MoJ6Hro05bjYFJP9X0cgpfnpxBZ8dLLx73feh4GPS5zdCJjFa4UTIGOU9Y9Jtg6FQR1JMAmZuDee4niAJYvdqn75wocYQGOYYfeyq7pri5fZk0seX7v5zd3xHchnRcHsyjoQNDhhOjKf97o8UgpUcxvXXahhFMOBz+VNm7OXlLnxQspgf6wz5BlPPtwdnHSCdaHWTOs6IHqkBUjxz/eKMxhjQa6vvn9qqPoORWurwFjNoqBepYoppZD8fdOMJ153DeAA/7DH4b4bQFNAiYXiOBMQsDWiyoR/fuCINJI/suuP9VyvCmZn1fFIWnU7 TWv9z5BM bozH03XXbdS/iBACEhCwR4HEGNL5f0sr7fR1n+Cqu/qXiqqeg3XPN1aGLBRZYhWJ9qHjRSKujQVDvONtfmsfZJeKn2vAZ7UuYY5w0BbyH/S1B/feCSQTmtjAiFRPlMDMT+7jE9cHifwmEOur3Sj15QyEPyb87T9xCzFPn 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: List-Subscribe: List-Unsubscribe: Let's batch mm counter updating to accelerate filemap_map_pages(). v2: - estimate folio type from caller and no need to return from set_pte_range() - use unsigned long for rss Kefeng Wang (2): mm: move mm counter updating out of set_pte_range() mm: filemap: batch mm counter updating in filemap_map_pages() mm/filemap.c | 14 ++++++++++---- mm/memory.c | 8 +++++--- 2 files changed, 15 insertions(+), 7 deletions(-)