Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp850430ybh; Wed, 18 Mar 2020 10:15:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuhho4KHMwKq2YM7c7Oouatrrsb0n6JFGlfUJzwaFvplesnM8mEtcOJmgRyst7ZcEFEc2yM X-Received: by 2002:a05:6830:1190:: with SMTP id u16mr4528845otq.298.1584551735385; Wed, 18 Mar 2020 10:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584551735; cv=none; d=google.com; s=arc-20160816; b=lPJrzK7yQG4Qv2FfZRTYgvwlDjOU6kbljmy1A2S/eXbygEMBuqadOnW651Tpb4HFuH F0ZTzCFuael+1mfNVDmbQk8hlwl/i70iT9FgfF2vLMauH/nNNGozhDG5gCYoBXnGafKE Ah8gKBMNJHTdYypkR991wC8DJQWbhnAn4iegUL2OYrEgjkF1Kdcwaldulzj2rQswTjSW 64nu2azxKPIdpyPgLQYtCRKrvnHJYuQhGmTRdCyKbr+a97cK5F7N242ZkWXbKaH/UieD ifnCcu4rKncRKDsEw1Wia/JttBTBb6kj1PdFJNg4MWmzmT/KnkN4egJ55nIkuOVkuu2a aCzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=87hOCn3QZK/8wZsxom6VZlG7B4ZTGEroF1ig81szpKI=; b=k+Yah674Hhld4XO9xRBl08drBQMQZmcofNTIg0bqgh3hiS7yW4XvdoDB6iUmo5EXyt WqGouUFNMduYhvzTBK2eS1o9TYpyg7mVnBbz0KKwCsoxqjpRGsI1cBGfbLihrn93tCL1 YwEcCSCHd6a0xsk0ZezdIIgIIqZk7iA+0vqBPapm46jz9Q/3EllQml/RPcxRcxXnT8eA XV5qk7nHvKpR6JDiAZ5IJrV1opvEckK19o/77/Q0M6yVaQHgm7hsXmJN+S3zszi6cR3Z KdVcY1TGlp3JEQJDugaHpJyq51h1XNB4bUpt55vsKdrHq6/hA2PGtLn7yy0P6vEv7TXU o4sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Li0LZeQV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si3954826otv.21.2020.03.18.10.15.22; Wed, 18 Mar 2020 10:15:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Li0LZeQV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbgCRRN7 (ORCPT + 99 others); Wed, 18 Mar 2020 13:13:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:45136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbgCRRN7 (ORCPT ); Wed, 18 Mar 2020 13:13:59 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 673D92071C; Wed, 18 Mar 2020 17:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584551639; bh=zhaVfKAZ9DWXovGE8g99UowHd7QWKaEhgZ8kbNHW5y4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Li0LZeQVZ4Y+/0pUIJSWmkVPN6EAdJ4YA8shQ6emtUWMi8hEJQGHidj0itPCT5YjZ J/WugOmTS/lFVni8CuSA2eGGz3fW/At9p4z7XIE1RoDPRVvc5Gi5yl36aJNGAYM+Si JjcaPcSbvU32yOWlb3huoFMM9NS9gdzU+1RNkoeA= Date: Wed, 18 Mar 2020 19:13:55 +0200 From: Leon Romanovsky To: Niklas Schnelle , Saeed Mahameed , Moshe Shemesh Cc: linux-kernel@vger.kernel.org, Eran Ben Elisha Subject: Re: [RFC 1/1] net/mlx5: Fix failing fw tracer allocation on s390 Message-ID: <20200318171355.GE126814@unreal> References: <20200318164431.85948-1-schnelle@linux.ibm.com> <20200318164431.85948-2-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200318164431.85948-2-schnelle@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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