Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp472121lqz; Sat, 30 Mar 2024 05:01:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbD0G7aq/kfJUI/p/5oqLAaBQJ6s3aQRnv4cakPzEHBnYDP81mfiXJiLygBdRqNPygIuef0WbrkwkSv8LMMlW7x7xRApOvu4uUmy6KJQ== X-Google-Smtp-Source: AGHT+IGMerCKFy+/Jmw+l1JBthg2YoZPDl3uTcHBFlqJrtwaxCjGt2uQDuZS1hgbN5qmn+EWC6LC X-Received: by 2002:a05:6a00:1992:b0:6e7:47e2:d8ed with SMTP id d18-20020a056a00199200b006e747e2d8edmr4679312pfl.26.1711800090234; Sat, 30 Mar 2024 05:01:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711800090; cv=pass; d=google.com; s=arc-20160816; b=XtMZ98LF23BW/f17JBYj8GfIRdFg/HxUMgYrvcraybFXAOa2KpET2lgC0hNiyOchqO zfkLrKdqXXZrR0/oaA0lCT8b6askK64LbTEA0MrpUuVqm4NFDwHAlSzkeiHMsTkAeoZC QifH0ygk2NsfZZw/v9UGcs16PWZzuvFbVl9D0Mn4O9Nth1e1T5Bq5ywCjpdkmL+kPkDg 90/zMXUBb2p4v3gpn9CQGeOcrQTu5CCjOUukY+21Rn5ZOJGv8ISE7h1e/VU1x8KqpekL oAbrdoAOeGfHteU7Ad4CjZFFoLEgrkEsWvfbhJlYVSaFVIddISPkjtD1YAUehGvW94L1 xV0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=gx8unO59ZYnQM7w4Lk8oP3wDsxOiguYYkYYZiuyQyqo=; fh=Oa/sM/lVRKk63FMXlJbxNhZA5kLJriGEL7QCeN3aoUs=; b=q+HnhePRwVTCRZMc7XaIn/Yc1C5aulcL3JpTbCOI6hI6HxRXJ0j5kBFfRsOCVD/t9b ZCyVU7I2wKrakYvSNyEWWTkktIUACqmLygbMCCv3UaPyNygqnGFGaGDyEkACS5slJEZc WbY1YCu8mxmmhPaMI+Focv1LEJ+zOzFhBDAjOo+ElIYhn4SPtfszY6d9NleoyJNbqMND CVVNA4r1esQnZNUu1rFVApzrFdBAOXzU6VjY7M9rAIn7YNDXo34X0/hip+gBX2oZ1GlM 9xKkpvW1qK5P//aRNK4wyvE+WT7u2er1ZrzFalk6hdg1yR3PFuWcVqQHmhwtI+XUzBFg hlow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-125719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jw20-20020a056a00929400b006e6ca7264b0si5855897pfb.42.2024.03.30.05.01.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 05:01:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-125719-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DF34D2830FA for ; Sat, 30 Mar 2024 12:01:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15947381B9; Sat, 30 Mar 2024 12:01:22 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B29FB1E896; Sat, 30 Mar 2024 12:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711800081; cv=none; b=WJbbV270t/ooVwRu27l3kpbpO/LNp3fBVfRjqDSUiCBL1/yhmqeX05AdQ5vC9vo421dyQlYdRNrAG/3dLmqvHvHH3IOXbqbnkcRGS5ljWtW9WpuJVFyUYBq7iefT2u8Y2EsHJMJjqK0UHGQnJZOlWMwRiKLeHwXjs5A0t2k/zBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711800081; c=relaxed/simple; bh=fT3FnLwhlqo35Pj+pAK551GXQXi8alEtZAKvfSYeaHU=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=Gysezl9oW2wx2m1NIwuS5aCuwl7HEGn2RtF3oLAyvdICdI9EdoKb99h/KeqXZzq3y49d/36QaSMvGlijVKast3vaki1kT/opXa8XfqWWufE7zSFpHwMOXGVeeMdlmccqp9Eb+dtVlMhV0NpG4fjzqbWHbE5Lf0g0516IE1P/Sc0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4V6G542s8Wz29lQT; Sat, 30 Mar 2024 19:58:32 +0800 (CST) Received: from dggpemm500005.china.huawei.com (unknown [7.185.36.74]) by mail.maildlp.com (Postfix) with ESMTPS id A15F21A0172; Sat, 30 Mar 2024 20:01:14 +0800 (CST) Received: from [10.69.30.204] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sat, 30 Mar 2024 20:01:14 +0800 Subject: Re: [PATCH RFC 01/10] mm: Move the page fragment allocator from page_alloc into its own file To: Christophe Leroy , "davem@davemloft.net" , "kuba@kernel.org" , "pabeni@redhat.com" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Howells , Andrew Morton , "linux-mm@kvack.org" References: <20240328133839.13620-1-linyunsheng@huawei.com> <20240328133839.13620-2-linyunsheng@huawei.com> From: Yunsheng Lin Message-ID: <9e03b278-aaeb-d11c-d2e0-d45ca5e97346@huawei.com> Date: Sat, 30 Mar 2024 20:01:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500005.china.huawei.com (7.185.36.74) On 2024/3/30 1:19, Christophe Leroy wrote: > > > Le 28/03/2024 à 14:38, Yunsheng Lin a écrit : >> Inspired by [1], but use free_unref_page() to replace free_the_page() >> instead of __free_pages(), use VM_BUG_ON() to catch that we can use >> free_unref_page() directly, also add its own header file. >> >> As the API is only used by the networking, it may make sense to >> move it to the networking directory like the page_pool does in the >> future if we can make the free_unref_page() callable outside of the >> mm subsystem. And we can utilize that to decouple the 'struct page' >> in the networking subsystem in the future. > > I'm wondering if this page fragment allocator could replace the page > fragment allocator used in powerpc to allocate fragment of pages for > page tables. From a quick glance, it seems possible. If there are potential users other than the networking for this API, we can keep it in mm subsystem for now as this patch does and see how thing will evolve. > > See arch/powerpc/mm/pgtable-frag.c > > Christophe >