linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Jaewon Kim <jaewon31.kim@samsung.com>,
	willy@infradead.org, walken@google.com, bp@suse.de,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com
Subject: Re: [PATCH v2 1/2] mmap: remove inline of vm_unmapped_area
Date: Fri, 13 Mar 2020 11:36:31 +0100	[thread overview]
Message-ID: <30e2d9c4-33fd-3e13-ce3d-de5099d48b18@suse.cz> (raw)
In-Reply-To: <20200313011420.15995-2-jaewon31.kim@samsung.com>

On 3/13/20 2:14 AM, Jaewon Kim wrote:
> In prepration for next patch remove inline of vm_unmapped_area and move
> code to mmap.c. There is no logical change.
> 
> Also remove unmapped_area[_topdown] out of mm.h, there is no code
> calling to them.
> 
> Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>

Assuming the 'static' is added as Andrew pointed out,

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>


> ---
>  include/linux/mm.h | 21 +--------------------
>  mm/mmap.c          | 16 ++++++++++++++++
>  2 files changed, 17 insertions(+), 20 deletions(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 52269e56c514..1cb01f4a83c9 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2364,26 +2364,7 @@ struct vm_unmapped_area_info {
>  	unsigned long align_offset;
>  };
>  
> -extern unsigned long unmapped_area(struct vm_unmapped_area_info *info);
> -extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
> -
> -/*
> - * Search for an unmapped address range.
> - *
> - * We are looking for a range that:
> - * - does not intersect with any VMA;
> - * - is contained within the [low_limit, high_limit) interval;
> - * - is at least the desired size.
> - * - satisfies (begin_addr & align_mask) == (align_offset & align_mask)
> - */
> -static inline unsigned long
> -vm_unmapped_area(struct vm_unmapped_area_info *info)
> -{
> -	if (info->flags & VM_UNMAPPED_AREA_TOPDOWN)
> -		return unmapped_area_topdown(info);
> -	else
> -		return unmapped_area(info);
> -}
> +extern unsigned long vm_unmapped_area(struct vm_unmapped_area_info *info);
>  
>  /* truncate.c */
>  extern void truncate_inode_pages(struct address_space *, loff_t);
> diff --git a/mm/mmap.c b/mm/mmap.c
> index d681a20eb4ea..eeaddb76286c 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -2050,6 +2050,22 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info)
>  	return gap_end;
>  }
>  
> +/*
> + * Search for an unmapped address range.
> + *
> + * We are looking for a range that:
> + * - does not intersect with any VMA;
> + * - is contained within the [low_limit, high_limit) interval;
> + * - is at least the desired size.
> + * - satisfies (begin_addr & align_mask) == (align_offset & align_mask)
> + */
> +unsigned long vm_unmapped_area(struct vm_unmapped_area_info *info)
> +{
> +	if (info->flags & VM_UNMAPPED_AREA_TOPDOWN)
> +		return unmapped_area_topdown(info);
> +	else
> +		return unmapped_area(info);
> +}
>  
>  #ifndef arch_get_mmap_end
>  #define arch_get_mmap_end(addr)	(TASK_SIZE)
> 



  parent reply	other threads:[~2020-03-13 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200313011430epcas1p423b939dea080fda77a2e0fe3f6531489@epcas1p4.samsung.com>
2020-03-13  1:14 ` [PATCH v2 0/2] mm: mmap: add mmap trace point Jaewon Kim
     [not found]   ` <CGME20200313011430epcas1p129e4033f12b9c02f71443e0b359a26e5@epcas1p1.samsung.com>
2020-03-13  1:14     ` [PATCH v2 1/2] mmap: remove inline of vm_unmapped_area Jaewon Kim
2020-03-13  3:02       ` Andrew Morton
2020-03-13  3:27         ` Jaewon Kim
2020-03-13 10:36       ` Vlastimil Babka [this message]
     [not found]   ` <CGME20200313011430epcas1p436a6c02a262debcd755f3e1378331764@epcas1p4.samsung.com>
2020-03-13  1:14     ` [PATCH v2 2/2] mm: mmap: add trace point " Jaewon Kim
2020-03-13 11:25       ` Vlastimil Babka

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=30e2d9c4-33fd-3e13-ce3d-de5099d48b18@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=jaewon31.kim@gmail.com \
    --cc=jaewon31.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=walken@google.com \
    --cc=willy@infradead.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