linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bhupesh SHARMA <bhupesh.linux@gmail.com>
To: Coiby Xu <coxu@redhat.com>
Cc: netdev@vger.kernel.org, kexec@lists.infradead.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	open list <linux-kernel@vger.kernel.org>,
	intel-wired-lan@lists.osuosl.org,
	Jakub Kicinski <kuba@kernel.org>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC PATCH 4/4] i40e: don't open i40iw client for kdump
Date: Thu, 25 Feb 2021 15:41:55 +0530	[thread overview]
Message-ID: <CAFTCetS=G_JV4Ax6=Ty20uifoL1jscrqPGhdh7d2k+t=0d+L8g@mail.gmail.com> (raw)
In-Reply-To: <20210222070701.16416-5-coxu@redhat.com>

Hello Coiby,

On Mon, Feb 22, 2021 at 12:40 PM Coiby Xu <coxu@redhat.com> wrote:
>
> i40iw consumes huge amounts of memory. For example, on a x86_64 machine,
> i40iw consumed 1.5GB for Intel Corporation Ethernet Connection X722 for
> for 1GbE while "craskernel=auto" only reserved 160M. With the module
> parameter "resource_profile=2", we can reduce the memory usage of i40iw
> to ~300M which is still too much for kdump.
>
> Disabling the client registration would spare us the client interface
> operation open , i.e., i40iw_open for iwarp/uda device. Thus memory is
> saved for kdump.
>
> Signed-off-by: Coiby Xu <coxu@redhat.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_client.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
> index a2dba32383f6..aafc2587f389 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_client.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
> @@ -4,6 +4,7 @@
>  #include <linux/list.h>
>  #include <linux/errno.h>
>  #include <linux/net/intel/i40e_client.h>
> +#include <linux/crash_dump.h>
>
>  #include "i40e.h"
>  #include "i40e_prototype.h"
> @@ -741,6 +742,12 @@ int i40e_register_client(struct i40e_client *client)
>  {
>         int ret = 0;
>
> +       /* Don't open i40iw client for kdump because i40iw will consume huge
> +        * amounts of memory.
> +        */
> +       if (is_kdump_kernel())
> +               return ret;
> +

Since crashkernel size can be manually set on the command line by a
user, and some users might be fine with a ~300M memory usage by i40iw
client [with resource_profile=2"], in my view, disabling the client
for all kdump cases seems too restrictive.

We can probably check the crash kernel size allocated (
$ cat /sys/kernel/kexec_crash_size) and then make a decision
accordingly, so for example something like:

 +       if (is_kdump_kernel() && kexec_crash_size < 512M)
 +               return ret;

What do you think?

Regards,
Bhupesh

>         if (!client) {
>                 ret = -EIO;
>                 goto out;
> --
> 2.30.1
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2021-02-25 10:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210222070701.16416-1-coxu@redhat.com>
2021-02-22  7:06 ` [RFC PATCH 1/4] i40e: use minimal tx and rx pairs for kdump Coiby Xu
2021-02-22  7:06 ` [RFC PATCH 2/4] i40e: use minimal rx and tx ring buffers " Coiby Xu
2021-02-22  7:07 ` [RFC PATCH 3/4] i40e: use minimal admin queue " Coiby Xu
2021-02-22  7:07 ` [RFC PATCH 4/4] i40e: don't open i40iw client " Coiby Xu
2021-02-23 20:22   ` Jakub Kicinski
2021-02-24 11:41     ` Coiby Xu
2021-02-24 16:48       ` Jakub Kicinski
2021-02-25  0:21         ` Coiby Xu
2021-02-25  0:47           ` Jakub Kicinski
2021-02-25 10:11   ` Bhupesh SHARMA [this message]
2021-03-03  9:44     ` Coiby Xu

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='CAFTCetS=G_JV4Ax6=Ty20uifoL1jscrqPGhdh7d2k+t=0d+L8g@mail.gmail.com' \
    --to=bhupesh.linux@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=coxu@redhat.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).