Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1230407 > unrolled thread

Re: [PATCH] kexec: Add prefix "kexec" to output message

Started byMinfei Huang <mhuang@redhat.com>
First post2015-09-22 18:10 +0200
Last post2015-09-23 09:10 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mhuang@redhat.com> - 2015-09-22 18:10 +0200
    Re: [PATCH] kexec: Add prefix "kexec" to output message Dave Young <dyoung@redhat.com> - 2015-09-23 03:40 +0200
      Re: [PATCH] kexec: Add prefix "kexec" to output message Baoquan He <bhe@redhat.com> - 2015-09-23 04:50 +0200
        Re: [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mhuang@redhat.com> - 2015-09-23 07:20 +0200
          Re: [PATCH] kexec: Add prefix "kexec" to output message Baoquan He <bhe@redhat.com> - 2015-09-23 07:30 +0200
            Re: [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mhuang@redhat.com> - 2015-09-23 07:50 +0200
        Re: [PATCH] kexec: Add prefix "kexec" to output message Dave Young <dyoung@redhat.com> - 2015-09-23 09:10 +0200

#1230407 — Re: [PATCH] kexec: Add prefix "kexec" to output message

FromMinfei Huang <mhuang@redhat.com>
Date2015-09-22 18:10 +0200
SubjectRe: [PATCH] kexec: Add prefix "kexec" to output message
Message-ID<qbyiK-1PH-35@gated-at.bofh.it>
On 09/15/15 at 11:08am, Minfei Huang wrote:
> On 09/14/15 at 04:44pm, Dave Young wrote:
> > On 09/14/15 at 03:50pm, Minfei Huang wrote:
> > > On 09/13/15 at 11:52am, Eric W. Biederman wrote:
> > > > Minfei Huang <mnfhuang@gmail.com> writes:
> > > > 
> > > > > kexec output message misses the prefix "kexec", when Dave Young split
> > > > > the kexec code. To keep the same format, add the prefix "kexec" to
> > > > > output message.
> > > > 
> > > > What of kexec_core? What of the messages that already have a prefix?
> > > > 
> > > 
> > > Hi, Eric.
> > > 
> > > Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
> > > kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c).
> > > The common functions used by both kexec and kexec_file are placed in
> > > file kernel/kexec_core.c.
> > > 
> > > The format of the output message likes "kexec: SYSC_kexec_load: hello,
> > > world" previously. Due to the missing prefix "kexec", now it like
> > > "SYSC_kexec_load: hello, world".
> > > 
> > > Dave Young misses the Macro pr_fmt to define the prefix output message
> > > in file kexec.c and kexec_file.c. I think the previous Macro was moved
> > > into the file kexec_core.c when Dave did the splitting.
> > 
> > I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so
> > only keep it in kexec_core.c.
> > 
> > There's already printks with prefix like "Kexec:", "crashkernel:" and
> > other strings. Adding another prefix before them looks odd. So either remove 
> > the prefix in kexec_core, or remove other prefixes already exists in kexec*.c
> > I would prefix to remove the "kexec:" prefix in kexec_core.c
> 
> Hi, Dave.
> 
> How about removing all of the prefix "crashkernel" in kexec_core. Thus
> we can be consistent with the output message prefix "kexec".

Ping, any comment is appreciate and helpful.

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

[toc] | [next] | [standalone]


#1231088

FromDave Young <dyoung@redhat.com>
Date2015-09-23 03:40 +0200
Message-ID<qbHcl-67q-1@gated-at.bofh.it>
In reply to#1230407
On 09/23/15 at 12:07am, Minfei Huang wrote:
> On 09/15/15 at 11:08am, Minfei Huang wrote:
> > On 09/14/15 at 04:44pm, Dave Young wrote:
> > > On 09/14/15 at 03:50pm, Minfei Huang wrote:
> > > > On 09/13/15 at 11:52am, Eric W. Biederman wrote:
> > > > > Minfei Huang <mnfhuang@gmail.com> writes:
> > > > > 
> > > > > > kexec output message misses the prefix "kexec", when Dave Young split
> > > > > > the kexec code. To keep the same format, add the prefix "kexec" to
> > > > > > output message.
> > > > > 
> > > > > What of kexec_core? What of the messages that already have a prefix?
> > > > > 
> > > > 
> > > > Hi, Eric.
> > > > 
> > > > Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
> > > > kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c).
> > > > The common functions used by both kexec and kexec_file are placed in
> > > > file kernel/kexec_core.c.
> > > > 
> > > > The format of the output message likes "kexec: SYSC_kexec_load: hello,
> > > > world" previously. Due to the missing prefix "kexec", now it like
> > > > "SYSC_kexec_load: hello, world".
> > > > 
> > > > Dave Young misses the Macro pr_fmt to define the prefix output message
> > > > in file kexec.c and kexec_file.c. I think the previous Macro was moved
> > > > into the file kexec_core.c when Dave did the splitting.
> > > 
> > > I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so
> > > only keep it in kexec_core.c.
> > > 
> > > There's already printks with prefix like "Kexec:", "crashkernel:" and
> > > other strings. Adding another prefix before them looks odd. So either remove 
> > > the prefix in kexec_core, or remove other prefixes already exists in kexec*.c
> > > I would prefix to remove the "kexec:" prefix in kexec_core.c
> > 
> > Hi, Dave.
> > 
> > How about removing all of the prefix "crashkernel" in kexec_core. Thus
> > we can be consistent with the output message prefix "kexec".
> 
> Ping, any comment is appreciate and helpful.

Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing
messages. I have no idea what is the best way but below modification sounds better to me:

kexec_core.c:

#define pr_fmt(fmt)        "[kexec_core] " fmt
Also remove below prefix "Kexec:"
pr_warn("Kexec: Memory allocation for saving cpu register states failed\n"); 

kexec.c:
#define pr_fmt(fmt)        "[kexec] " fmt

kexec_file.c:
#define pr_fmt(fmt)        "[kexec_file] " fmt

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

[toc] | [prev] | [next] | [standalone]


#1231114

FromBaoquan He <bhe@redhat.com>
Date2015-09-23 04:50 +0200
Message-ID<qbIi6-7Kb-3@gated-at.bofh.it>
In reply to#1231088
On 09/23/15 at 09:37am, Dave Young wrote:
> > > Hi, Dave.
> > > 
> > > How about removing all of the prefix "crashkernel" in kexec_core. Thus
> > > we can be consistent with the output message prefix "kexec".
> > 
> > Ping, any comment is appreciate and helpful.
> 
> Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing
> messages. I have no idea what is the best way but below modification sounds better to me:
> 
> kexec_core.c:
> 
> #define pr_fmt(fmt)        "[kexec_core] " fmt
> Also remove below prefix "Kexec:"
> pr_warn("Kexec: Memory allocation for saving cpu register states failed\n"); 
> 
> kexec.c:
> #define pr_fmt(fmt)        "[kexec] " fmt
> 
> kexec_file.c:
> #define pr_fmt(fmt)        "[kexec_file] " fmt

This is weird, user really don't need to know each file. I saw you added
a new file kexec_internal.h and all three files includes it. Why not doing
it there to make it the same as before?

> 
> Thanks
> Dave
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1231156

FromMinfei Huang <mhuang@redhat.com>
Date2015-09-23 07:20 +0200
Message-ID<qbKDf-2Nw-1@gated-at.bofh.it>
In reply to#1231114
On 09/23/15 at 10:49am, Baoquan He wrote:
> On 09/23/15 at 09:37am, Dave Young wrote:
> > > > Hi, Dave.
> > > > 
> > > > How about removing all of the prefix "crashkernel" in kexec_core. Thus
> > > > we can be consistent with the output message prefix "kexec".
> > > 
> > > Ping, any comment is appreciate and helpful.
> > 
> > Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing
> > messages. I have no idea what is the best way but below modification sounds better to me:
> > 
> > kexec_core.c:
> > 
> > #define pr_fmt(fmt)        "[kexec_core] " fmt
> > Also remove below prefix "Kexec:"
> > pr_warn("Kexec: Memory allocation for saving cpu register states failed\n"); 
> > 
> > kexec.c:
> > #define pr_fmt(fmt)        "[kexec] " fmt
> > 
> > kexec_file.c:
> > #define pr_fmt(fmt)        "[kexec_file] " fmt
> 
> This is weird, user really don't need to know each file. I saw you added
> a new file kexec_internal.h and all three files includes it. Why not doing
> it there to make it the same as before?

The output message format is incorrect, if other *.c (except for kexec*)
include the kexec_internal.h.

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

How about defining the format like above in each *.c?

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

[toc] | [prev] | [next] | [standalone]


#1231159

FromBaoquan He <bhe@redhat.com>
Date2015-09-23 07:30 +0200
Message-ID<qbKMW-2YL-11@gated-at.bofh.it>
In reply to#1231156
On 09/23/15 at 01:14pm, Minfei Huang wrote:
> On 09/23/15 at 10:49am, Baoquan He wrote:
> > This is weird, user really don't need to know each file. I saw you added
> > a new file kexec_internal.h and all three files includes it. Why not doing
> > it there to make it the same as before?
> 
> The output message format is incorrect, if other *.c (except for kexec*)
> include the kexec_internal.h.

No, I assume Dave added kexec_internal.h not to be used by other *.c.
It should be only used by kexec*.c

> 
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> 
> How about defining the format like above in each *.c?
> 
> Thanks
> Minfei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1231162

FromMinfei Huang <mhuang@redhat.com>
Date2015-09-23 07:50 +0200
Message-ID<qbL6i-3l0-1@gated-at.bofh.it>
In reply to#1231159
On 09/23/15 at 01:26pm, Baoquan He wrote:
> On 09/23/15 at 01:14pm, Minfei Huang wrote:
> > On 09/23/15 at 10:49am, Baoquan He wrote:
> > > This is weird, user really don't need to know each file. I saw you added
> > > a new file kexec_internal.h and all three files includes it. Why not doing
> > > it there to make it the same as before?
> > 
> > The output message format is incorrect, if other *.c (except for kexec*)
> > include the kexec_internal.h.
> 
> No, I assume Dave added kexec_internal.h not to be used by other *.c.
> It should be only used by kexec*.c
> 
> > 
> > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > 
> > How about defining the format like above in each *.c?

Ok. I can split this patch as two patches One for cleanup, other to fix
the prefix issue.

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

[toc] | [prev] | [next] | [standalone]


#1231184

FromDave Young <dyoung@redhat.com>
Date2015-09-23 09:10 +0200
Message-ID<qbMlH-5p4-9@gated-at.bofh.it>
In reply to#1231114
On 09/23/15 at 10:49am, Baoquan He wrote:
> On 09/23/15 at 09:37am, Dave Young wrote:
> > > > Hi, Dave.
> > > > 
> > > > How about removing all of the prefix "crashkernel" in kexec_core. Thus
> > > > we can be consistent with the output message prefix "kexec".
> > > 
> > > Ping, any comment is appreciate and helpful.
> > 
> > Remove "crashkernel" sounds not a proper way, it indicates crashkernel parsing
> > messages. I have no idea what is the best way but below modification sounds better to me:
> > 
> > kexec_core.c:
> > 
> > #define pr_fmt(fmt)        "[kexec_core] " fmt
> > Also remove below prefix "Kexec:"
> > pr_warn("Kexec: Memory allocation for saving cpu register states failed\n"); 
> > 
> > kexec.c:
> > #define pr_fmt(fmt)        "[kexec] " fmt
> > 
> > kexec_file.c:
> > #define pr_fmt(fmt)        "[kexec_file] " fmt
> 
> This is weird, user really don't need to know each file. I saw you added
> a new file kexec_internal.h and all three files includes it. Why not doing
> it there to make it the same as before?

I personally do not like add these prefix to a header file. One prefix for
a c file is better to me.

But rethinking about the prefix, looks like there's a lot of other components
using ":" so KBUILD_MODNAME ": "  should be fine.

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web