* [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-27 10:17 ` Borislav Petkov
0 siblings, 0 replies; 10+ messages in thread
From: Borislav Petkov @ 2012-03-27 10:17 UTC (permalink / raw)
To: LKML; +Cc: Borislav Petkov, Andi Kleen, linux-mm
From: Borislav Petkov <borislav.petkov@amd.com>
These things tend to get out of sync with time so let the compiler
automatically enter the current function name using __func__.
No functional change.
Cc: Andi Kleen <andi@firstfloor.org>
Cc: linux-mm@kvack.org
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
mm/memory-failure.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 56080ea36140..7d78d5ec61a7 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1384,16 +1384,16 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
*/
if (!get_page_unless_zero(compound_head(p))) {
if (PageHuge(p)) {
- pr_info("get_any_page: %#lx free huge page\n", pfn);
+ pr_info("%s: %#lx free huge page\n", __func__, pfn);
ret = dequeue_hwpoisoned_huge_page(compound_head(p));
} else if (is_free_buddy_page(p)) {
- pr_info("get_any_page: %#lx free buddy page\n", pfn);
+ pr_info("%s: %#lx free buddy page\n", __func__, pfn);
/* Set hwpoison bit while page is still isolated */
SetPageHWPoison(p);
ret = 0;
} else {
- pr_info("get_any_page: %#lx: unknown zero refcount page type %lx\n",
- pfn, p->flags);
+ pr_info("%s: %#lx: unknown zero refcount page type %lx\n",
+ __func__, pfn, p->flags);
ret = -EIO;
}
} else {
--
1.7.9.3.362.g71319
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-27 10:17 ` Borislav Petkov
0 siblings, 0 replies; 10+ messages in thread
From: Borislav Petkov @ 2012-03-27 10:17 UTC (permalink / raw)
To: LKML; +Cc: Borislav Petkov, Andi Kleen, linux-mm
From: Borislav Petkov <borislav.petkov@amd.com>
These things tend to get out of sync with time so let the compiler
automatically enter the current function name using __func__.
No functional change.
Cc: Andi Kleen <andi@firstfloor.org>
Cc: linux-mm@kvack.org
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
mm/memory-failure.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 56080ea36140..7d78d5ec61a7 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1384,16 +1384,16 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
*/
if (!get_page_unless_zero(compound_head(p))) {
if (PageHuge(p)) {
- pr_info("get_any_page: %#lx free huge page\n", pfn);
+ pr_info("%s: %#lx free huge page\n", __func__, pfn);
ret = dequeue_hwpoisoned_huge_page(compound_head(p));
} else if (is_free_buddy_page(p)) {
- pr_info("get_any_page: %#lx free buddy page\n", pfn);
+ pr_info("%s: %#lx free buddy page\n", __func__, pfn);
/* Set hwpoison bit while page is still isolated */
SetPageHWPoison(p);
ret = 0;
} else {
- pr_info("get_any_page: %#lx: unknown zero refcount page type %lx\n",
- pfn, p->flags);
+ pr_info("%s: %#lx: unknown zero refcount page type %lx\n",
+ __func__, pfn, p->flags);
ret = -EIO;
}
} else {
--
1.7.9.3.362.g71319
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
2012-03-27 10:17 ` Borislav Petkov
@ 2012-03-28 0:49 ` Andi Kleen
-1 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2012-03-28 0:49 UTC (permalink / raw)
To: Borislav Petkov; +Cc: LKML, Borislav Petkov, Andi Kleen, linux-mm, akpm
Fine for me. Andrew normally handles memory-failure.c patches these days.
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-28 0:49 ` Andi Kleen
0 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2012-03-28 0:49 UTC (permalink / raw)
To: Borislav Petkov; +Cc: LKML, Borislav Petkov, Andi Kleen, linux-mm, akpm
Fine for me. Andrew normally handles memory-failure.c patches these days.
--
ak@linux.intel.com -- Speaking for myself only.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
2012-03-27 10:17 ` Borislav Petkov
@ 2012-03-28 7:19 ` David Rientjes
-1 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-03-28 7:19 UTC (permalink / raw)
To: Borislav Petkov; +Cc: LKML, Borislav Petkov, Andi Kleen, linux-mm
On Tue, 27 Mar 2012, Borislav Petkov wrote:
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 56080ea36140..7d78d5ec61a7 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1384,16 +1384,16 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
> */
> if (!get_page_unless_zero(compound_head(p))) {
> if (PageHuge(p)) {
> - pr_info("get_any_page: %#lx free huge page\n", pfn);
> + pr_info("%s: %#lx free huge page\n", __func__, pfn);
> ret = dequeue_hwpoisoned_huge_page(compound_head(p));
> } else if (is_free_buddy_page(p)) {
> - pr_info("get_any_page: %#lx free buddy page\n", pfn);
> + pr_info("%s: %#lx free buddy page\n", __func__, pfn);
> /* Set hwpoison bit while page is still isolated */
> SetPageHWPoison(p);
> ret = 0;
> } else {
> - pr_info("get_any_page: %#lx: unknown zero refcount page type %lx\n",
> - pfn, p->flags);
> + pr_info("%s: %#lx: unknown zero refcount page type %lx\n",
> + __func__, pfn, p->flags);
> ret = -EIO;
> }
> } else {
I agree with your change, but I'm not sure these should be pr_info() to
start with, these seem more like debugging messages? I can't see how
they'd be useful in standard operation so could we just convert them to be
debug instead?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-28 7:19 ` David Rientjes
0 siblings, 0 replies; 10+ messages in thread
From: David Rientjes @ 2012-03-28 7:19 UTC (permalink / raw)
To: Borislav Petkov; +Cc: LKML, Borislav Petkov, Andi Kleen, linux-mm
On Tue, 27 Mar 2012, Borislav Petkov wrote:
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 56080ea36140..7d78d5ec61a7 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1384,16 +1384,16 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
> */
> if (!get_page_unless_zero(compound_head(p))) {
> if (PageHuge(p)) {
> - pr_info("get_any_page: %#lx free huge page\n", pfn);
> + pr_info("%s: %#lx free huge page\n", __func__, pfn);
> ret = dequeue_hwpoisoned_huge_page(compound_head(p));
> } else if (is_free_buddy_page(p)) {
> - pr_info("get_any_page: %#lx free buddy page\n", pfn);
> + pr_info("%s: %#lx free buddy page\n", __func__, pfn);
> /* Set hwpoison bit while page is still isolated */
> SetPageHWPoison(p);
> ret = 0;
> } else {
> - pr_info("get_any_page: %#lx: unknown zero refcount page type %lx\n",
> - pfn, p->flags);
> + pr_info("%s: %#lx: unknown zero refcount page type %lx\n",
> + __func__, pfn, p->flags);
> ret = -EIO;
> }
> } else {
I agree with your change, but I'm not sure these should be pr_info() to
start with, these seem more like debugging messages? I can't see how
they'd be useful in standard operation so could we just convert them to be
debug instead?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
2012-03-28 7:19 ` David Rientjes
@ 2012-03-28 9:09 ` Andi Kleen
-1 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2012-03-28 9:09 UTC (permalink / raw)
To: David Rientjes
Cc: Borislav Petkov, LKML, Borislav Petkov, Andi Kleen, linux-mm
> I agree with your change, but I'm not sure these should be pr_info() to
> start with, these seem more like debugging messages? I can't see how
> they'd be useful in standard operation so could we just convert them to be
> debug instead?
Well it tells why the page recovery didn't work.
Memory recovery is a somewhat obscure path, so it's better to have
full information.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-28 9:09 ` Andi Kleen
0 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2012-03-28 9:09 UTC (permalink / raw)
To: David Rientjes
Cc: Borislav Petkov, LKML, Borislav Petkov, Andi Kleen, linux-mm
> I agree with your change, but I'm not sure these should be pr_info() to
> start with, these seem more like debugging messages? I can't see how
> they'd be useful in standard operation so could we just convert them to be
> debug instead?
Well it tells why the page recovery didn't work.
Memory recovery is a somewhat obscure path, so it's better to have
full information.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
2012-03-28 9:09 ` Andi Kleen
@ 2012-03-29 14:05 ` Fengguang Wu
-1 siblings, 0 replies; 10+ messages in thread
From: Fengguang Wu @ 2012-03-29 14:05 UTC (permalink / raw)
To: Andi Kleen
Cc: David Rientjes, Borislav Petkov, LKML, Borislav Petkov, linux-mm,
Andrew Morton
On Wed, Mar 28, 2012 at 11:09:09AM +0200, Andi Kleen wrote:
> > I agree with your change, but I'm not sure these should be pr_info() to
> > start with, these seem more like debugging messages? I can't see how
> > they'd be useful in standard operation so could we just convert them to be
> > debug instead?
>
> Well it tells why the page recovery didn't work.
>
> Memory recovery is a somewhat obscure path, so it's better to have
> full information.
Nod, and it won't disturb the users unless something really bad happens.
I'm fine with the patch, too.
Thanks,
Fengguang
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mm/memory_failure: Let the compiler add the function name
@ 2012-03-29 14:05 ` Fengguang Wu
0 siblings, 0 replies; 10+ messages in thread
From: Fengguang Wu @ 2012-03-29 14:05 UTC (permalink / raw)
To: Andi Kleen
Cc: David Rientjes, Borislav Petkov, LKML, Borislav Petkov, linux-mm,
Andrew Morton
On Wed, Mar 28, 2012 at 11:09:09AM +0200, Andi Kleen wrote:
> > I agree with your change, but I'm not sure these should be pr_info() to
> > start with, these seem more like debugging messages? I can't see how
> > they'd be useful in standard operation so could we just convert them to be
> > debug instead?
>
> Well it tells why the page recovery didn't work.
>
> Memory recovery is a somewhat obscure path, so it's better to have
> full information.
Nod, and it won't disturb the users unless something really bad happens.
I'm fine with the patch, too.
Thanks,
Fengguang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-29 14:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 10:17 [PATCH] mm/memory_failure: Let the compiler add the function name Borislav Petkov
2012-03-27 10:17 ` Borislav Petkov
2012-03-28 0:49 ` Andi Kleen
2012-03-28 0:49 ` Andi Kleen
2012-03-28 7:19 ` David Rientjes
2012-03-28 7:19 ` David Rientjes
2012-03-28 9:09 ` Andi Kleen
2012-03-28 9:09 ` Andi Kleen
2012-03-29 14:05 ` Fengguang Wu
2012-03-29 14:05 ` Fengguang Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.