From: Simon Horman <horms@kernel.org>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
netdev@vger.kernel.org, Lukasz Czapnik <lukasz.czapnik@intel.com>,
Wojciech Drewek <wojciech.drewek@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>,
Jacob Keller <jacob.e.keller@intel.com>,
intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] ice: do not init struct ice_adapter more times than needed
Date: Tue, 18 Jun 2024 14:33:22 +0100 [thread overview]
Message-ID: <20240618133322.GO8447@kernel.org> (raw)
In-Reply-To: <20240617132407.107292-1-przemyslaw.kitszel@intel.com>
On Mon, Jun 17, 2024 at 03:24:07PM +0200, Przemek Kitszel wrote:
> Allocate and initialize struct ice_adapter object only once per physical
> card instead of once per port. This is not a big deal by now, but we want
> to extend this struct more and more in the near future. Our plans include
> PTP stuff and a devlink instance representing whole-device/physical card.
>
> Transactions requiring to be sleep-able (like those doing user (here ice)
> memory allocation) must be performed with an additional (on top of xarray)
> mutex. Adding it here removes need to xa_lock() manually.
>
> Since this commit is a reimplementation of ice_adapter_get(), a rather new
> scoped_guard() wrapper for locking is used to simplify the logic.
>
> It's worth to mention that xa_insert() use gives us both slot reservation
> and checks if it is already filled, what simplifies code a tiny bit.
>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Lukasz Czapnik <lukasz.czapnik@intel.com>,
Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Michal Schmidt <mschmidt@redhat.com>,
Jakub Kicinski <kuba@kernel.org>,
Wojciech Drewek <wojciech.drewek@intel.com>
Subject: Re: [PATCH iwl-next v1] ice: do not init struct ice_adapter more times than needed
Date: Tue, 18 Jun 2024 14:33:22 +0100 [thread overview]
Message-ID: <20240618133322.GO8447@kernel.org> (raw)
In-Reply-To: <20240617132407.107292-1-przemyslaw.kitszel@intel.com>
On Mon, Jun 17, 2024 at 03:24:07PM +0200, Przemek Kitszel wrote:
> Allocate and initialize struct ice_adapter object only once per physical
> card instead of once per port. This is not a big deal by now, but we want
> to extend this struct more and more in the near future. Our plans include
> PTP stuff and a devlink instance representing whole-device/physical card.
>
> Transactions requiring to be sleep-able (like those doing user (here ice)
> memory allocation) must be performed with an additional (on top of xarray)
> mutex. Adding it here removes need to xa_lock() manually.
>
> Since this commit is a reimplementation of ice_adapter_get(), a rather new
> scoped_guard() wrapper for locking is used to simplify the logic.
>
> It's worth to mention that xa_insert() use gives us both slot reservation
> and checks if it is already filled, what simplifies code a tiny bit.
>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-06-18 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 13:24 [Intel-wired-lan] [PATCH iwl-next v1] ice: do not init struct ice_adapter more times than needed Przemek Kitszel
2024-06-17 13:24 ` Przemek Kitszel
2024-06-18 13:33 ` Simon Horman [this message]
2024-06-18 13:33 ` Simon Horman
2024-06-19 13:08 ` [Intel-wired-lan] " Michal Schmidt
2024-06-19 13:08 ` Michal Schmidt
2024-06-24 6:50 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-06-24 6:50 ` Pucha, HimasekharX Reddy
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=20240618133322.GO8447@kernel.org \
--to=horms@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=lukasz.czapnik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sergey.temerkhanov@intel.com \
--cc=wojciech.drewek@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.