Re: [PATCH] vmscan: add task name to warn_scan_unevictable() messages

From: Minchan Kim
Date: Wed Nov 23 2011 - 01:24:19 EST


On Wed, Nov 23, 2011 at 12:55:20AM -0500, KOSAKI Motohiro wrote:
> If we need to know a usecase, caller program name is critical important.
> Show it.
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> ---
> mm/vmscan.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index a1893c0..29d163e 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3448,9 +3448,10 @@ void scan_mapping_unevictable_pages(struct address_space *mapping)
> static void warn_scan_unevictable_pages(void)
> {
> printk_once(KERN_WARNING
> - "The scan_unevictable_pages sysctl/node-interface has been "
> + "%s: The scan_unevictable_pages sysctl/node-interface has been "
> "disabled for lack of a legitimate use case. If you have "
> - "one, please send an email to linux-mm@xxxxxxxxxx\n");
> + "one, please send an email to linux-mm@xxxxxxxxxx\n",
> + current->comm);
> }

Just nitpick:
How about using WARN_ONCE instead of custom warning?
It can show more exact call path as well as comm.
I guess it's more noticible to users.
Anyway, either is okay to me.

--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/