Re: [PATCHv2] mm/sparse: rename pfn_present() as pfn_in_present_section()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pingfan Liu <kernelfans@xxxxxxxxx> writes:
> After introducing mem sub section concept, pfn_present() loses its literal
> meaning, and will not be necessary a truth on partial populated mem section.
>
> Since all of the callers use it to judge an absent section, it is better to
> rename pfn_present() as pfn_in_present_section().
>
> Signed-off-by: Pingfan Liu <kernelfans@xxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxxxx>
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: David Hildenbrand <david@xxxxxxxxxx>
> Cc: Leonardo Bras <leonardo@xxxxxxxxxxxxx>
> Cc: Nathan Fontenot <nfont@xxxxxxxxxxxxxxxxxx>
> Cc: Nathan Lynch <nathanl@xxxxxxxxxxxxx>
> To: linux-mm@xxxxxxxxx
> ---
> v1 -> v2: adopt David's suggestion, rename it as pfn_in_present_section()
>  arch/powerpc/platforms/pseries/hotplug-memory.c | 2 +-
>  drivers/base/node.c                             | 2 +-
>  include/linux/mmzone.h                          | 4 ++--
>  mm/page_ext.c                                   | 2 +-
>  mm/shuffle.c                                    | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
> index a4d40a3..f3ed1ba 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -360,7 +360,7 @@ static bool lmb_is_removable(struct drmem_lmb *lmb)
>  
>  	for (i = 0; i < scns_per_block; i++) {
>  		pfn = PFN_DOWN(phys_addr);
> -		if (!pfn_present(pfn)) {
> +		if (!pfn_in_present_section(pfn)) {
>  			phys_addr += MIN_MEMORY_BLOCK_SIZE;
>  			continue;
>  		}

Fine by me:

Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc)

cheers




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux