From: David Laight <David.Laight@ACULAB.COM>
To: 'Anand Khoje' <anand.a.khoje@oracle.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "saeedm@mellanox.com" <saeedm@mellanox.com>,
"leon@kernel.org" <leon@kernel.org>,
"tariqt@nvidia.com" <tariqt@nvidia.com>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [PATCH v5] net/mlx5: Reclaim max 50K pages at once
Date: Fri, 28 Jun 2024 15:44:15 +0000 [thread overview]
Message-ID: <666c79de2adf4959bd167f3f1c45e1fc@AcuMS.aculab.com> (raw)
In-Reply-To: <1f9868a7-a336-4a79-bc51-d29461295444@oracle.com>
...
> The way Mellanox ConnectX5 driver handles 'release of allocated pages
> from HCA' or 'allocation of pages to HCA', is by sending an event to the
> host. This event will have number of pages in it. If the number is
> positive, that indicates HCA is requesting that number of pages to be
> allocated. And if that number is negative, it is the HCA indicating that
> that number of pages can be reclaimed by the host.
A one line comment would do.
Possibly even negating the be32toh() result?
> In this patch we are restricting the maximum number of pages that can be
> reclaimed to be 50000 (effectively this would be -50000 as it is
> reclaim). This limit is based on the capability of the firmware as it
> cannot release more than 50000 back to the host in one go.
Hang on, why are you soft limiting it to the hard limit?
I thought the problem was that releasing a lot of pages took a long
time and 'stuffed' other time-critical tasks.
The only way to resolve that would seem to be to defer the actual freeing
to a low (or at least normal user) priority thread.
You would definitely want to get out of 'softint' context.
(Which is out of napi unless forced to be threaded - and that only really
works if you force the threads under the RT scheduler.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2024-06-28 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 15:33 [PATCH v5] net/mlx5: Reclaim max 50K pages at once Anand Khoje
2024-06-24 20:41 ` Jesse Brandeburg
2024-06-25 5:00 ` Anand Khoje
2024-06-25 20:19 ` Zhu Yanjun
2024-06-26 5:34 ` Leon Romanovsky
2024-06-28 15:44 ` David Laight [this message]
2024-07-01 5:39 ` Anand Khoje
2024-07-01 5:40 ` Anand Khoje
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=666c79de2adf4959bd167f3f1c45e1fc@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=anand.a.khoje@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@mellanox.com \
--cc=tariqt@nvidia.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