Re: [PATCH v4 4/4] mm/page_alloc: Introduce free_area_init_core_hotplug

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

 



Hi Oscar,

>  static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)

Remove __ref from this function and add it to
free_area_init_core_hotplug() instead, as that is the only function
from a different section. This will reduce the scope of ref, and no
need to place reset_node_managed_pages() into a different section as
it is compiled only when CONFIG_MEMORY_HOTPLUG=y

> +#ifdef CONFIG_MEMORY_HOTPLUG
> +void __paginginit free_area_init_core_hotplug(int nid)
> +{
> +       enum zone_type j;
> +       pg_data_t *pgdat = NODE_DATA(nid);
> +
> +       pgdat_init_internals(pgdat);
> +       for (j = 0; j < MAX_NR_ZONES; j++) {
> +               struct zone *zone = pgdat->node_zones + j;
> +               zone_init_internals(zone, j, nid, 0);
> +       }
> +}

Style: I would write the for() loop above like this:

        for (i = 0; i < MAX_NR_ZONES; i++)
                zone_init_internals(&pgdat->node_zones[i], i, nid, 0);

Other than this all good:
Reviewed-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>

Thank you,
Pavel




[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