Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1544418
| From | Petr Mladek <pmladek@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: simplify node/zone name printing |
| Date | 2016-12-19 11:10 +0100 |
| Message-ID | <sQ33k-6mo-17@gated-at.bofh.it> (permalink) |
| References | <sOZXQ-3A4-17@gated-at.bofh.it> <sQ0f8-4C7-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 2016-12-19 08:00:47, Vlastimil Babka wrote:
> On 12/16/2016 01:32 PM, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@suse.com>
> >
> > show_node currently only prints Node id while it is always followed by
> > printing zone->name. As the node information is conditional to
> > CONFIG_NUMA we have to be careful to always terminate the previous
> > continuation line before printing the zone name. This is quite ugly
> > and easy to mess up. Let's rename show_node to show_zone_node and
> > make sure that it will always start at a new line. We can drop the ugly
> > printk(KERN_CONT "\n") from show_free_areas.
> >
> > Signed-off-by: Michal Hocko <mhocko@suse.com>
>
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 3f2c9e535f7f..5324efa8b9d0 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -4120,10 +4120,12 @@ unsigned long nr_free_pagecache_pages(void)
> > return nr_free_zone_pages(gfp_zone(GFP_HIGHUSER_MOVABLE));
> > }
> >
> > -static inline void show_node(struct zone *zone)
> > +static inline void show_zone_node(struct zone *zone)
> > {
> > if (IS_ENABLED(CONFIG_NUMA))
> > - printk("Node %d ", zone_to_nid(zone));
> > + printk("Node %d %s", zone_to_nid(zone), zone->name);
> > + else
> > + printk("%s: ", zone->name);
> > }
> >
> > long si_mem_available(void)
> > @@ -4371,9 +4373,8 @@ void show_free_areas(unsigned int filter)
> > for_each_online_cpu(cpu)
> > free_pcp += per_cpu_ptr(zone->pageset, cpu)->pcp.count;
> >
> > - show_node(zone);
> > + show_zone_node(zone);
> > printk(KERN_CONT
> > - "%s"
The new code will printk "%s: " when called with disabled CONFIG_NUMA.
Is the added ": " OK?
Best Regards,
Petr
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: simplify node/zone name printing Michal Hocko <mhocko@kernel.org> - 2016-12-16 13:40 +0100
Re: [PATCH] mm: simplify node/zone name printing Vlastimil Babka <vbabka@suse.cz> - 2016-12-19 08:10 +0100
Re: [PATCH] mm: simplify node/zone name printing Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-19 08:40 +0100
Re: [PATCH] mm: simplify node/zone name printing Michal Hocko <mhocko@kernel.org> - 2016-12-19 09:20 +0100
Re: [PATCH] mm: simplify node/zone name printing Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-19 09:30 +0100
Re: [PATCH] mm: simplify node/zone name printing Petr Mladek <pmladek@suse.com> - 2016-12-19 11:30 +0100
Re: [PATCH] mm: simplify node/zone name printing Michal Hocko <mhocko@kernel.org> - 2016-12-19 15:10 +0100
Re: [PATCH] mm: simplify node/zone name printing Petr Mladek <pmladek@suse.com> - 2016-12-19 11:10 +0100
Re: [PATCH] mm: simplify node/zone name printing Michal Hocko <mhocko@kernel.org> - 2016-12-19 14:30 +0100
csiph-web