From: Igor Russkikh <irusskikh@marvell.com>
To: Bhupesh Sharma <bhsharma@redhat.com>, <netdev@vger.kernel.org>
Cc: <bhupesh.linux@gmail.com>, <kexec@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, Ariel Elior <aelior@marvell.com>,
GR-everest-linux-l2 <GR-everest-linux-l2@marvell.com>,
Manish Chopra <manishc@marvell.com>, <davem@davemloft.net>,
Alok Prasad <palok@marvell.com>
Subject: Re: [EXT] [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running inside kdump kernel
Date: Wed, 6 May 2020 09:51:35 +0300 [thread overview]
Message-ID: <5ddc169b-f837-e478-43d9-4d6cf587aa05@marvell.com> (raw)
In-Reply-To: <1588705481-18385-2-git-send-email-bhsharma@redhat.com>
> #include <linux/compiler.h>
> +#include <linux/crash_dump.h>
> #include <linux/version.h>
> #include <linux/workqueue.h>
> #include <linux/netdevice.h>
> @@ -574,13 +575,13 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev,
> __be16 proto,
> #define RX_RING_SIZE ((u16)BIT(RX_RING_SIZE_POW))
> #define NUM_RX_BDS_MAX (RX_RING_SIZE - 1)
> #define NUM_RX_BDS_MIN 128
> -#define NUM_RX_BDS_DEF ((u16)BIT(10) - 1)
> +#define NUM_RX_BDS_DEF ((is_kdump_kernel()) ? ((u16)BIT(6) - 1) :
> ((u16)BIT(10) - 1))
>
> #define TX_RING_SIZE_POW 13
> #define TX_RING_SIZE ((u16)BIT(TX_RING_SIZE_POW))
> #define NUM_TX_BDS_MAX (TX_RING_SIZE - 1)
> #define NUM_TX_BDS_MIN 128
> -#define NUM_TX_BDS_DEF NUM_TX_BDS_MAX
> +#define NUM_TX_BDS_DEF ((is_kdump_kernel()) ? ((u16)BIT(6) - 1) :
> NUM_TX_BDS_MAX)
>
Hi Bhupesh,
Thanks for looking into this. We are also analyzing how to reduce qed* memory
usage even more.
Patch is good, but may I suggest not to introduce conditional logic into the
defines but instead just add two new defines like NUM_[RT]X_BDS_MIN and check
for is_kdump_kernel() in the code explicitly?
if (is_kdump_kernel()) {
edev->q_num_rx_buffers = NUM_RX_BDS_MIN;
edev->q_num_tx_buffers = NUM_TX_BDS_MIN;
} else {
edev->q_num_rx_buffers = NUM_RX_BDS_DEF;
edev->q_num_tx_buffers = NUM_TX_BDS_DEF;
}
This may make configuration logic more explicit. If future we may want adding
more specific configs under this `if`.
Regards
Igor
next prev parent reply other threads:[~2020-05-06 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 19:04 [PATCH 0/2] net: Optimize the qed* allocations " Bhupesh Sharma
2020-05-05 19:04 ` [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running " Bhupesh Sharma
2020-05-05 21:24 ` David Miller
2020-05-06 5:04 ` Bhupesh Sharma
2020-05-06 6:51 ` Igor Russkikh [this message]
2020-05-06 7:13 ` [EXT] " Bhupesh Sharma
2020-05-05 19:04 ` [PATCH 2/2] net: qed: Disable SRIOV functionality " Bhupesh Sharma
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=5ddc169b-f837-e478-43d9-4d6cf587aa05@marvell.com \
--to=irusskikh@marvell.com \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=bhsharma@redhat.com \
--cc=bhupesh.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=palok@marvell.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
all inboxes | Powered by JetHome®