From patchwork Tue Nov 7 13:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13448881 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 9FDD9C4167D for ; Tue, 7 Nov 2023 14:13:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20DF56B01FE; Tue, 7 Nov 2023 09:13:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1973B6B01FF; Tue, 7 Nov 2023 09:13:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 037ED6B0200; Tue, 7 Nov 2023 09:13:10 -0500 (EST) 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 E94266B01FE for ; Tue, 7 Nov 2023 09:13:10 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C369B40A71 for ; Tue, 7 Nov 2023 14:13:10 +0000 (UTC) X-FDA: 81431350140.07.1538475 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf27.hostedemail.com (Postfix) with ESMTP id 4BF8840010 for ; Tue, 7 Nov 2023 14:13:07 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699366388; 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=40UsECvJB6aNamsNaSmRhAWy99tvkGhr9Xggo/xn0ys=; b=I7qo38QJORxRNI5gvrZrWMe22M1PJ6Ic+9j0NK1sk/UoiUL/tjjMa+RO3asgVNpNQxXFuk c3UXJipJbLJ97p3ZpCRLLn4KK9S/M8K6JUQtv56vjf1I8YKtvfwbmhvE0y/cvsMbOWCwfi x+yriy+eEeHfUCXhiYYf3vWqk29prck= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699366388; a=rsa-sha256; cv=none; b=dStJM8guT4bcFIpEvjh4liKpd20pkYwshSTgr4mxldUCQ+1urwQSSExGGTA7XOJEsRt3hj GJKcoDHK9Q8PC0J3FwOdVv5srUJ23rrnVHenoSRy6Mm+prN6c0bqsdE85vWgVNXathYD6i pmcaJLVw9IxogHQ6vn3zZzMopSxRrwE= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SPqMp2Rz3z1P7mb; Tue, 7 Nov 2023 21:49:42 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 7 Nov 2023 21:52:51 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 0/6] mm: cleanup and use more folio in page fault Date: Tue, 7 Nov 2023 21:52:10 +0800 Message-ID: <20231107135216.415926-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 4BF8840010 X-Stat-Signature: 5i3g9bk11y79e9i3h5s7yiad4ho9s1ff X-Rspam-User: X-HE-Tag: 1699366387-914779 X-HE-Meta: U2FsdGVkX18iBuJMv+c6+plH8aAZ1XI5c9P80o/n/QfUn+E8zs17Y9XSuAE5NTMEDbapEo4kmlV/IZR9tHgaVCpsQj3RYV4mkzhXSqmFECHnLP7SDjDXqQQEpankljhgfjUWqgDOfsUECIB0SP9v23YO9v0WHHPkb1Zn7iNeXXk8IIm/m8BEjTvCEqaFV9lKABrdmiNzRn4qN7WmDlVfxJF4gWiOrqy1RetmOIYB120PLv20HHIaXkQt2TJQ4x/N86fT0TICYynrCrQyXAEhOspE2nLIML/hsWAet9s5b/cCTIO3E1k6GrWZdHFKscnNZ9z313w9oA4heXWo9vlU4jzIQnf8IU1ewbSLx+ydqXKoIfFAkbTsWk/lw11NzvP33LLfQhEUvI1qy9vGS5YtRk2oFzl8+gzgObGdgM94fguSlPk3iwAkQJgcKHeas9isUXyZM9aSTlHcQ1ssOCea7zGYUEOeGevX5UfKgzhKOiDcyOndn9BCH8eBxDSqmld2v79TlpW9DokWUz9bFRPqZNMyfuLcVT3YTUko5DOFhDLal7/DiL2vazLC58KQWuHOhvDtZesr26hzjFhl1G/Mj0jbKNRO1Tq44resksvwclQG8AFH2bEJge/DrbzcZ1CxK2hLNqP1iaPN6kwQ9oX+04aCgUOOOMxShG0ZkvPNfzVAf46b2JhScdJW5gVfsS4lzqC+juR8RTsRGpMvK5YRos1s3pFt6B01Sksct/z0N7BFMyDQ9OjATcmxJD6Dysdr+qJuEmxEnY6pyzA4nS0yiPZPmI+wMTurwKMgtXGlbl0sbm7mzIL/UBTsS8G3ZErKqptO44y7xhRpo6u1P7dJSbAaPENnQTu1VrHU6OIMx7U0FoFvt3f6pyG2AKS11j8GKxrh4+D7Yb+0RVHyibjX8bT6yHhJPD3qqeQIEge0aPArOqgqZsMOt+V+rncVnLgRNNsMeJwoWAjTwPCiLzg v3nnoGwo b5+sF0JTXim8kwgm5jOsE7Hkiwn+Wk1xiHlPfuhDiSNB+6JrPJIWOYbpGlROIf0ekcuBXyskn9zPufVXpv9wI96nGWnj5y7BqYvMKrliw+v5bk8OemBzT4Af71w== 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: Rename page_copy_prealloc() to folio_prealloc(), which is used by more functions, also do more folio conversion in page fault. Kefeng Wang (6): mm: ksm: use more folio api in ksm_might_need_to_copy() mm: memory: use a folio in validate_page_before_insert() mm: memory: rename page_copy_prealloc() to folio_prealloc() mm: memory: use a folio in do_cow_page() mm: memory: use folio_prealloc() in wp_page_copy() mm: memory: use folio_prealloc() in do_anonymous_page() include/linux/ksm.h | 4 +-- mm/ksm.c | 36 +++++++++++------------ mm/memory.c | 72 +++++++++++++++++++-------------------------- 3 files changed, 50 insertions(+), 62 deletions(-)