From: Leon Romanovsky <leon@kernel.org>
To: Niklas Schnelle <schnelle@linux.ibm.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Moshe Shemesh <moshe@mellanox.com>
Cc: linux-kernel@vger.kernel.org, Eran Ben Elisha <eranbe@mellanox.com>
Subject: Re: [RFC 1/1] net/mlx5: Fix failing fw tracer allocation on s390
Date: Wed, 18 Mar 2020 19:13:55 +0200 [thread overview]
Message-ID: <20200318171355.GE126814@unreal> (raw)
In-Reply-To: <20200318164431.85948-2-schnelle@linux.ibm.com>
On Wed, Mar 18, 2020 at 05:44:31PM +0100, Niklas Schnelle wrote:
> On s390 FORCE_MAX_ZONEORDER is 9 instead of 11, thus a larger kzalloc()
> allocation as done for the firmware tracer will always fail.
>
> Looking at mlx5_fw_tracer_save_trace(), it is actually the driver itself
> that copies the debug data into the trace array and there is no need for
> the allocation to be contiguous in physical memory. We can therefor use
> kvzalloc() instead of kzalloc() and get rid of the large contiguous
> allcoation.
>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> index 94d7b69a95c7..eb2e57ff08a6 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> @@ -935,7 +935,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
> return NULL;
> }
>
> - tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
> + tracer = kvzalloc(sizeof(*tracer), GFP_KERNEL);
Saeed, Moshe
Can we use vzalloc() instead of kvzalloc() here?
Thanks
next prev parent reply other threads:[~2020-03-18 17:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 16:44 [RFC 0/1] net/mlx5: Failing fw tracer allocation on s390 Niklas Schnelle
2020-03-18 16:44 ` [RFC 1/1] net/mlx5: Fix failing " Niklas Schnelle
2020-03-18 17:13 ` Leon Romanovsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-07 8:01 [RFC 0/1] net/mlx5: Failing " Niklas Schnelle
2020-04-07 8:01 ` [RFC 1/1] net/mlx5: Fix failing " Niklas Schnelle
2020-04-08 19:36 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200318171355.GE126814@unreal \
--to=leon@kernel.org \
--cc=eranbe@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moshe@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=schnelle@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox