linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander H Duyck <alexander.duyck@gmail.com>
To: Yunsheng Lin <linyunsheng@huawei.com>,
	davem@davemloft.net, kuba@kernel.org,  pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Dumazet <edumazet@google.com>, Shuah Khan <shuah@kernel.org>,
	linux-mm@kvack.org,  linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v13 02/14] mm: move the page fragment allocator from page_alloc into its own file
Date: Wed, 14 Aug 2024 08:33:55 -0700	[thread overview]
Message-ID: <bc279009c4c3c901033e23601efcf9ed4da8743d.camel@gmail.com> (raw)
In-Reply-To: <20240808123714.462740-3-linyunsheng@huawei.com>

On Thu, 2024-08-08 at 20:37 +0800, Yunsheng Lin wrote:
> Inspired by [1], move the page fragment allocator from page_alloc
> into its own c file and header file, as we are about to make more
> change for it to replace another page_frag implementation in
> sock.c
> 
> As this patchset is going to replace 'struct page_frag' with
> 'struct page_frag_cache' in sched.h, including page_frag_cache.h
> in sched.h has a compiler error caused by interdependence between
> mm_types.h and mm.h for asm-offsets.c, see [2]. So avoid the compiler
> error by moving 'struct page_frag_cache' to mm_types_task.h as
> suggested by Alexander, see [3].
> 
> 1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowells@redhat.com/
> 2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956920@gmail.com/
> 3. https://lore.kernel.org/all/CAKgT0UdH1yD=LSCXFJ=YM_aiA4OomD-2wXykO42bizaWMt_HOA@mail.gmail.com/
> CC: David Howells <dhowells@redhat.com>
> CC: Alexander Duyck <alexander.duyck@gmail.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
> ---
>  include/linux/gfp.h                           |  22 ---
>  include/linux/mm_types.h                      |  18 ---
>  include/linux/mm_types_task.h                 |  18 +++
>  include/linux/page_frag_cache.h               |  31 ++++
>  include/linux/skbuff.h                        |   1 +
>  mm/Makefile                                   |   1 +
>  mm/page_alloc.c                               | 136 ----------------
>  mm/page_frag_cache.c                          | 145 ++++++++++++++++++
>  .../selftests/mm/page_frag/page_frag_test.c   |   2 +-
>  9 files changed, 197 insertions(+), 177 deletions(-)
>  create mode 100644 include/linux/page_frag_cache.h
>  create mode 100644 mm/page_frag_cache.c
> 
> 

...

> diff --git a/include/linux/page_frag_cache.h b/include/linux/page_frag_cache.h
> new file mode 100644
> index 000000000000..a758cb65a9b3
> --- /dev/null
> +++ b/include/linux/page_frag_cache.h
> @@ -0,0 +1,31 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef _LINUX_PAGE_FRAG_CACHE_H
> +#define _LINUX_PAGE_FRAG_CACHE_H
> +
> +#include <linux/log2.h>
> +#include <linux/types.h>
> +#include <linux/mm_types_task.h>
> +

Minor nit. These should usually be in alphabetical order. So
mm_types_task.h should be between log2.h and types.h.



  parent reply	other threads:[~2024-08-14 15:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240808123714.462740-1-linyunsheng@huawei.com>
     [not found] ` <20240808123714.462740-2-linyunsheng@huawei.com>
2024-08-09 11:08   ` [PATCH net-next v13 01/14] mm: page_frag: add a test module for page_frag Muhammad Usama Anjum
2024-08-09 12:29     ` Yunsheng Lin
     [not found] ` <20240808123714.462740-3-linyunsheng@huawei.com>
2024-08-14 15:33   ` Alexander H Duyck [this message]
2024-08-14 20:22   ` [PATCH net-next v13 02/14] mm: move the page fragment allocator from page_alloc into its own file Andrew Morton
     [not found] ` <20240808123714.462740-5-linyunsheng@huawei.com>
2024-08-14 15:49   ` [PATCH net-next v13 04/14] mm: page_frag: add '_va' suffix to page_frag API Alexander H Duyck
2024-08-15  2:59     ` Yunsheng Lin
2024-08-15 15:00       ` Alexander Duyck
2024-08-16 11:55         ` Yunsheng Lin
2024-08-19 15:54           ` Alexander Duyck
2024-08-20 13:07             ` Yunsheng Lin
2024-08-20 16:02               ` Alexander Duyck
2024-08-21 12:30                 ` Yunsheng Lin
     [not found] ` <20240808123714.462740-8-linyunsheng@huawei.com>
2024-08-14 16:13   ` [PATCH net-next v13 07/14] mm: page_frag: reuse existing space for 'size' and 'pfmemalloc' Alexander H Duyck
2024-08-15  3:10     ` Yunsheng Lin
2024-08-15 15:03       ` Alexander Duyck
2024-08-16 11:55         ` Yunsheng Lin
2024-08-19 16:00           ` Alexander Duyck
     [not found] ` <20240808123714.462740-9-linyunsheng@huawei.com>
2024-08-14 17:54   ` [PATCH net-next v13 08/14] mm: page_frag: some minor refactoring before adding new API Alexander H Duyck
2024-08-15  3:04     ` Yunsheng Lin
2024-08-15 15:09       ` Alexander Duyck
2024-08-16 11:58         ` Yunsheng Lin
     [not found] ` <20240808123714.462740-12-linyunsheng@huawei.com>
2024-08-14 21:00   ` [PATCH net-next v13 11/14] mm: page_frag: introduce prepare/probe/commit API Alexander H Duyck
2024-08-15  3:05     ` Yunsheng Lin
2024-08-15 15:25       ` Alexander Duyck
2024-08-16 12:01         ` Yunsheng Lin
2024-08-19 15:52           ` Alexander Duyck
2024-08-20 13:08             ` Yunsheng Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc279009c4c3c901033e23601efcf9ed4da8743d.camel@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linyunsheng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).