[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3987ae0f-cbfc-1066-c78f-c5c6efc570ed@arm.com>
Date: Mon, 20 Jan 2020 12:13:38 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Wei Yang <richardw.yang@...ux.intel.com>, akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
rientjes@...gle.com
Subject: Re: [Patch v2 4/4] mm/page_alloc.c: extract commom part to check page
On 01/20/2020 08:34 AM, Wei Yang wrote:
> During free and new page, we did some check on the status of page
> struct. There is some common part, just extract them.
Makes sense.
>
> Besides this, this patch also rename two functions to keep the name
> convention, since free_pages_check_bad/free_pages_check are counterparts
> of check_new_page_bad/check_new_page.
This probably should be in a different patch.
>
> Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
> ---
> mm/page_alloc.c | 49 ++++++++++++++++++++++++-------------------------
> 1 file changed, 24 insertions(+), 25 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index a7b793c739fc..7f23cc836f90 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1025,36 +1025,44 @@ static inline bool page_expected_state(struct page *page,
> return true;
> }
>
> -static void free_pages_check_bad(struct page *page)
> +static inline int __check_page(struct page *page, int nr,
> + const char **bad_reason)
free and new page checks are in and out of the buddy allocator, hence
this common factored function should have a more relevant name.
Powered by blists - more mailing lists