* [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
@ 2017-09-26 6:50 Arvind Yadav
[not found] ` <7a5a195cd37db476a2ca007eddc0f28f3ade265b.1506407876.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Arvind Yadav @ 2017-09-26 6:50 UTC (permalink / raw)
To: matanb, leonro, dledford, sean.hefty, hal.rosenstock
Cc: linux-rdma, linux-kernel
pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
avoid other messages being concatenated.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/infiniband/hw/mlx5/mr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 0e2789d..92d643a 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -1229,13 +1229,13 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
mr = alloc_mr_from_cache(pd, umem, virt_addr, length, ncont,
page_shift, order, access_flags);
if (PTR_ERR(mr) == -EAGAIN) {
- mlx5_ib_dbg(dev, "cache empty for order %d", order);
+ mlx5_ib_dbg(dev, "cache empty for order %d\n", order);
mr = NULL;
}
} else if (!MLX5_CAP_GEN(dev->mdev, umr_extended_translation_offset)) {
if (access_flags & IB_ACCESS_ON_DEMAND) {
err = -EINVAL;
- pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB");
+ pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB\n");
goto error;
}
use_umr = false;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
[not found] ` <7a5a195cd37db476a2ca007eddc0f28f3ade265b.1506407876.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-09-26 7:07 ` Yuval Shaia
2017-09-26 8:38 ` Leon Romanovsky
1 sibling, 0 replies; 8+ messages in thread
From: Yuval Shaia @ 2017-09-26 7:07 UTC (permalink / raw)
To: Arvind Yadav
Cc: matanb-VPRAkNaXOzVWk0Htik3J/w, leonro-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, Sep 26, 2017 at 12:20:01PM +0530, Arvind Yadav wrote:
> pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
> avoid other messages being concatenated.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/infiniband/hw/mlx5/mr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index 0e2789d..92d643a 100644
> --- a/drivers/infiniband/hw/mlx5/mr.c
> +++ b/drivers/infiniband/hw/mlx5/mr.c
> @@ -1229,13 +1229,13 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
> mr = alloc_mr_from_cache(pd, umem, virt_addr, length, ncont,
> page_shift, order, access_flags);
> if (PTR_ERR(mr) == -EAGAIN) {
> - mlx5_ib_dbg(dev, "cache empty for order %d", order);
> + mlx5_ib_dbg(dev, "cache empty for order %d\n", order);
> mr = NULL;
> }
> } else if (!MLX5_CAP_GEN(dev->mdev, umr_extended_translation_offset)) {
> if (access_flags & IB_ACCESS_ON_DEMAND) {
> err = -EINVAL;
> - pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB");
> + pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB\n");
> goto error;
> }
> use_umr = false;
> --
> 1.9.1
FWIW,
Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
[not found] ` <7a5a195cd37db476a2ca007eddc0f28f3ade265b.1506407876.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 7:07 ` Yuval Shaia
@ 2017-09-26 8:38 ` Leon Romanovsky
[not found] ` <20170926083843.GB6816-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
1 sibling, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-09-26 8:38 UTC (permalink / raw)
To: Arvind Yadav
Cc: matanb-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]
On Tue, Sep 26, 2017 at 12:20:01PM +0530, Arvind Yadav wrote:
> pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
> avoid other messages being concatenated.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/infiniband/hw/mlx5/mr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Did you see it is happening?
It is not needed after 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines")
Thanks.
>
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index 0e2789d..92d643a 100644
> --- a/drivers/infiniband/hw/mlx5/mr.c
> +++ b/drivers/infiniband/hw/mlx5/mr.c
> @@ -1229,13 +1229,13 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
> mr = alloc_mr_from_cache(pd, umem, virt_addr, length, ncont,
> page_shift, order, access_flags);
> if (PTR_ERR(mr) == -EAGAIN) {
> - mlx5_ib_dbg(dev, "cache empty for order %d", order);
> + mlx5_ib_dbg(dev, "cache empty for order %d\n", order);
> mr = NULL;
> }
> } else if (!MLX5_CAP_GEN(dev->mdev, umr_extended_translation_offset)) {
> if (access_flags & IB_ACCESS_ON_DEMAND) {
> err = -EINVAL;
> - pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB");
> + pr_err("Got MR registration for ODP MR > 512MB, not supported for Connect-IB\n");
> goto error;
> }
> use_umr = false;
> --
> 1.9.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
[not found] ` <20170926083843.GB6816-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-09-26 15:05 ` Joe Perches
2017-09-26 15:50 ` Leon Romanovsky
0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2017-09-26 15:05 UTC (permalink / raw)
To: Leon Romanovsky, Arvind Yadav
Cc: matanb-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, 2017-09-26 at 11:38 +0300, Leon Romanovsky wrote:
> On Tue, Sep 26, 2017 at 12:20:01PM +0530, Arvind Yadav wrote:
> > pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
> > avoid other messages being concatenated.
[]
> Did you see it is happening?
> It is not needed after 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines")
Not completely true, and that commit message
itself is incorrect about how KERN_CONT was
ever required or not required.
After that commit, the dmesg output will
eventually be corrected with an appended newline
for sine line format strings without them, but
the printk subsystem has to wait for another
printk to occur before inserting that newline.
The commit message bit that says:
Things get much hairier when you have
multiple threads going on and user level
reading and writing logs too
is correct. That's the actual reason that
the proposed newline additions are reasonable.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
2017-09-26 15:05 ` Joe Perches
@ 2017-09-26 15:50 ` Leon Romanovsky
2017-09-26 19:11 ` Joe Perches
0 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-09-26 15:50 UTC (permalink / raw)
To: Joe Perches
Cc: Arvind Yadav, matanb, dledford, sean.hefty, hal.rosenstock,
linux-rdma, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
On Tue, Sep 26, 2017 at 08:05:37AM -0700, Joe Perches wrote:
> On Tue, 2017-09-26 at 11:38 +0300, Leon Romanovsky wrote:
> > On Tue, Sep 26, 2017 at 12:20:01PM +0530, Arvind Yadav wrote:
> > > pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
> > > avoid other messages being concatenated.
> []
> > Did you see it is happening?
> > It is not needed after 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines")
>
> Not completely true, and that commit message
> itself is incorrect about how KERN_CONT was
> ever required or not required.
>
> After that commit, the dmesg output will
> eventually be corrected with an appended newline
> for sine line format strings without them, but
> the printk subsystem has to wait for another
> printk to occur before inserting that newline.
>
> The commit message bit that says:
>
> Things get much hairier when you have
> multiple threads going on and user level
> reading and writing logs too
>
> is correct. That's the actual reason that
> the proposed newline additions are reasonable.
>
I asked that question after I tried locally various different options
with/without newline and didn't see any difference.
So how can I reproduce the different output before and after this change?
Thanks
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
2017-09-26 15:50 ` Leon Romanovsky
@ 2017-09-26 19:11 ` Joe Perches
[not found] ` <1506453105.29089.14.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2017-09-26 19:11 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Arvind Yadav, matanb, dledford, sean.hefty, hal.rosenstock,
linux-rdma, linux-kernel
On Tue, 2017-09-26 at 18:50 +0300, Leon Romanovsky wrote:
> So how can I reproduce the different output before and after this change?
Try lib/test_module.c with and without the newline
on "Hello, World" on a quiescent system.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
[not found] ` <1506453105.29089.14.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
@ 2017-09-27 14:20 ` Doug Ledford
2017-09-27 14:46 ` Leon Romanovsky
0 siblings, 1 reply; 8+ messages in thread
From: Doug Ledford @ 2017-09-27 14:20 UTC (permalink / raw)
To: Joe Perches, Leon Romanovsky
Cc: Arvind Yadav, matanb-VPRAkNaXOzVWk0Htik3J/w,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, 2017-09-26 at 12:11 -0700, Joe Perches wrote:
> On Tue, 2017-09-26 at 18:50 +0300, Leon Romanovsky wrote:
> > So how can I reproduce the different output before and after this
> > change?
>
> Try lib/test_module.c with and without the newline
> on "Hello, World" on a quiescent system.
I agree here. The newlines are still worthwhile as they remove any
unnecessary stalls in the printk output while the printk engine decides
whether or not you are going to do a KERN_CONT print next.
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines
2017-09-27 14:20 ` Doug Ledford
@ 2017-09-27 14:46 ` Leon Romanovsky
0 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2017-09-27 14:46 UTC (permalink / raw)
To: Doug Ledford
Cc: Joe Perches, Arvind Yadav, matanb, sean.hefty, hal.rosenstock,
linux-rdma, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
On Wed, Sep 27, 2017 at 10:20:39AM -0400, Doug Ledford wrote:
> On Tue, 2017-09-26 at 12:11 -0700, Joe Perches wrote:
> > On Tue, 2017-09-26 at 18:50 +0300, Leon Romanovsky wrote:
> > > So how can I reproduce the different output before and after this
> > > change?
> >
> > Try lib/test_module.c with and without the newline
> > on "Hello, World" on a quiescent system.
>
> I agree here. The newlines are still worthwhile as they remove any
> unnecessary stalls in the printk output while the printk engine decides
> whether or not you are going to do a KERN_CONT print next.
>
> Thanks, applied.
Thanks
>
> --
> Doug Ledford <dledford@redhat.com>
> GPG KeyID: B826A3330E572FDD
> Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-09-27 14:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 6:50 [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines Arvind Yadav
[not found] ` <7a5a195cd37db476a2ca007eddc0f28f3ade265b.1506407876.git.arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-26 7:07 ` Yuval Shaia
2017-09-26 8:38 ` Leon Romanovsky
[not found] ` <20170926083843.GB6816-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-26 15:05 ` Joe Perches
2017-09-26 15:50 ` Leon Romanovsky
2017-09-26 19:11 ` Joe Perches
[not found] ` <1506453105.29089.14.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-09-27 14:20 ` Doug Ledford
2017-09-27 14:46 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox