* [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi
@ 2026-03-15 17:26 Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity Adrián García Casado
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Adrián García Casado @ 2026-03-15 17:26 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrián García Casado
This patch series provides functional optimizations and alignments for
multiple kernel components, specifically targeting MMC quirks,
Rust block driver abstractions, and iwlwifi interrupt affinity.
These changes were previously submitted as a single monolithic patch
but have now been split into logical, atomic commits as requested.
The code style has been verified against checkpatch.pl.
Summary of changes:
1. MMC: Consolidate imx25/35 quirk data and add Kingston CID support.
2. Rust: Update rnull driver to use Pin<KBox<QueueData>> for alignment
with kernel 7.0 zero-copy initialization.
3. iwlwifi: Optimize MSI-X interrupt affinity mapping by skipping
the boot core (CPU0) for high-rate RSS queues.
v1 -> v2:
- Split monolithic patch into logical commits.
- Updated author and email to Adrián García Casado <adriangarciacasado42@gmail.com>.
- Removed accidental addition of nested kernel repository.
- Fixed Rust code style (line wrapping).
- Fixed iwlwifi white space issue.
- Wrapped commit descriptions to 75 characters.
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Haibo Chen <haibo.chen@nxp.com>
Cc: Frank Li <Frank.Li@nxp.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Boqun Feng <boqun@kernel.org>
Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: linux-mmc@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-block@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Adrián García Casado (3):
wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity
rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit
mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID
drivers/block/rnull/rnull.rs | 13 +++++++++----
drivers/mmc/core/quirks.h | 4 ++++
drivers/mmc/host/sdhci-esdhc-imx.c | 12 ++++--------
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c | 10 ++++++++++
4 files changed, 27 insertions(+), 12 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity
2026-03-15 17:26 [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Adrián García Casado
@ 2026-03-15 17:26 ` Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 2/3] rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit Adrián García Casado
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Adrián García Casado @ 2026-03-15 17:26 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrián García Casado,
Adrián García Casado
Implement a balanced RSS queue distribution by skipping CPU0 for
high-rate MSI-X interrupts when multiple CPUs are online. This reduces
contention with system housekeeping tasks on the boot core and improves
overall throughput.
Signed-off-by: Adrián García Casado <adriangarciacicuelo@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
index 4560d92d7..87149f29e 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
@@ -1683,7 +1683,17 @@ static void iwl_pcie_irq_set_affinity(struct iwl_trans *trans,
* Get the cpu prior to the place to search
* (i.e. return will be > i - 1).
*/
+ /*
+ * Balanced distribution: skip CPU0 for high-rate RSS queues
+ * to avoid contention with system housekeeping.
+ */
cpu = cpumask_next(i - offset, cpu_online_mask);
+ if (cpu >= nr_cpu_ids)
+ cpu = cpumask_first(cpu_online_mask);
+
+ if (cpu == 0 && num_online_cpus() > 1)
+ cpu = cpumask_next(0, cpu_online_mask);
+
cpumask_set_cpu(cpu, &trans_pcie->affinity_mask[i]);
ret = irq_set_affinity_hint(trans_pcie->msix_entries[i].vector,
&trans_pcie->affinity_mask[i]);
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 2/3] rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit
2026-03-15 17:26 [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity Adrián García Casado
@ 2026-03-15 17:26 ` Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 3/3] mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID Adrián García Casado
2026-03-15 18:21 ` [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Miguel Ojeda
3 siblings, 0 replies; 7+ messages in thread
From: Adrián García Casado @ 2026-03-15 17:26 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrián García Casado,
Adrián García Casado
Update the Rust rnull driver to use Pin<KBox<QueueData>> for queue data
allocation. This aligns the driver with the latest PinInit zero-copy
initialization abstractions in kernel 7.0 and fixes a type mismatch
with GenDiskBuilder::build().
Signed-off-by: Adrián García Casado <adriangarciacicuelo@gmail.com>
---
drivers/block/rnull/rnull.rs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/block/rnull/rnull.rs b/drivers/block/rnull/rnull.rs
index 0ca8715fe..23df23936 100644
--- a/drivers/block/rnull/rnull.rs
+++ b/drivers/block/rnull/rnull.rs
@@ -54,7 +54,7 @@ fn new(
) -> Result<GenDisk<Self>> {
let tagset = Arc::pin_init(TagSet::new(1, 256, 1), GFP_KERNEL)?;
- let queue_data = Box::new(QueueData { irq_mode }, GFP_KERNEL)?;
+ let queue_data = Box::pin_init(QueueData { irq_mode }, GFP_KERNEL)?;
gen_disk::GenDiskBuilder::new()
.capacity_sectors(capacity_mib << (20 - block::SECTOR_SHIFT))
@@ -65,16 +65,21 @@ fn new(
}
}
+#[pin_data]
struct QueueData {
irq_mode: IRQMode,
}
#[vtable]
impl Operations for NullBlkDevice {
- type QueueData = KBox<QueueData>;
+ type QueueData = Pin<KBox<QueueData>>;
#[inline(always)]
- fn queue_rq(queue_data: &QueueData, rq: ARef<mq::Request<Self>>, _is_last: bool) -> Result {
+ fn queue_rq(
+ queue_data: Pin<&QueueData>,
+ rq: ARef<mq::Request<Self>>,
+ _is_last: bool,
+ ) -> Result {
match queue_data.irq_mode {
IRQMode::None => mq::Request::end_ok(rq)
.map_err(|_e| kernel::error::code::EIO)
@@ -87,7 +92,7 @@ fn queue_rq(queue_data: &QueueData, rq: ARef<mq::Request<Self>>, _is_last: bool)
Ok(())
}
- fn commit_rqs(_queue_data: &QueueData) {}
+ fn commit_rqs(_queue_data: Pin<&QueueData>) {}
fn complete(rq: ARef<mq::Request<Self>>) {
mq::Request::end_ok(rq)
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 3/3] mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID
2026-03-15 17:26 [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 2/3] rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit Adrián García Casado
@ 2026-03-15 17:26 ` Adrián García Casado
2026-03-15 18:21 ` [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Miguel Ojeda
3 siblings, 0 replies; 7+ messages in thread
From: Adrián García Casado @ 2026-03-15 17:26 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrián García Casado,
Adrián García Casado
Consolidate esdhc_imx25 and esdhc_imx35 soc data into a single shared
struct since they share the same flags. This reduces redundancy. Also
add the CID_MANFID_KINGSTON definition to quirks.h for centralized
management.
Signed-off-by: Adrián García Casado <adriangarciacicuelo@gmail.com>
---
drivers/mmc/core/quirks.h | 4 ++++
drivers/mmc/host/sdhci-esdhc-imx.c | 12 ++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
index c417ed34c..d736bb4be 100644
--- a/drivers/mmc/core/quirks.h
+++ b/drivers/mmc/core/quirks.h
@@ -15,6 +15,10 @@
#include "card.h"
+#ifndef CID_MANFID_KINGSTON
+#define CID_MANFID_KINGSTON 0x70
+#endif
+
static const struct mmc_fixup __maybe_unused mmc_sd_fixups[] = {
/*
* Kingston Canvas Go! Plus microSD cards never finish SD cache flush.
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index a7a5df673..9cfa26722 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -256,11 +256,7 @@ struct esdhc_soc_data {
u32 quirks;
};
-static const struct esdhc_soc_data esdhc_imx25_data = {
- .flags = ESDHC_FLAG_ERR004536,
-};
-
-static const struct esdhc_soc_data esdhc_imx35_data = {
+static const struct esdhc_soc_data esdhc_imx25_35_data = {
.flags = ESDHC_FLAG_ERR004536,
};
@@ -391,8 +387,8 @@ struct pltfm_imx_data {
};
static const struct of_device_id imx_esdhc_dt_ids[] = {
- { .compatible = "fsl,imx25-esdhc", .data = &esdhc_imx25_data, },
- { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx35_data, },
+ { .compatible = "fsl,imx25-esdhc", .data = &esdhc_imx25_35_data, },
+ { .compatible = "fsl,imx35-esdhc", .data = &esdhc_imx25_35_data, },
{ .compatible = "fsl,imx51-esdhc", .data = &esdhc_imx51_data, },
{ .compatible = "fsl,imx53-esdhc", .data = &esdhc_imx53_data, },
{ .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
@@ -414,7 +410,7 @@ MODULE_DEVICE_TABLE(of, imx_esdhc_dt_ids);
static inline int is_imx25_esdhc(struct pltfm_imx_data *data)
{
- return data->socdata == &esdhc_imx25_data;
+ return data->socdata == &esdhc_imx25_35_data;
}
static inline int is_imx53_esdhc(struct pltfm_imx_data *data)
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi
2026-03-15 17:26 [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Adrián García Casado
` (2 preceding siblings ...)
2026-03-15 17:26 ` [PATCH v2 3/3] mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID Adrián García Casado
@ 2026-03-15 18:21 ` Miguel Ojeda
3 siblings, 0 replies; 7+ messages in thread
From: Miguel Ojeda @ 2026-03-15 18:21 UTC (permalink / raw)
To: Adrián García Casado
Cc: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel
On Sun, Mar 15, 2026 at 6:27 PM Adrián García Casado
<adriangarciacasado42@gmail.com> wrote:
>
> These changes were previously submitted as a single monolithic patch
> but have now been split into logical, atomic commits as requested.
> The code style has been verified against checkpatch.pl.
Thanks for splitting it and fixing the diff, this is way better.
However, it seems you sent v2 three times. Was that intentional?
In addition, it seems the patches here are independent from each
other, right? Patches that go together in the same series are supposed
to be related in some way and/or they need to be applied together, so
I would suggest sending them separately.
Splitting them into separate patches also means you will have a
smaller list of maintainers to Cc, since here everyone is Cc'd for
things that are unrelated to them.
By the way, I would suggest using the `--base-commit` Git option when
generating the patches (optional, but useful) and also Cc'ing
reviewers as well since that will increase the chances people will see
your patches (you may want to use `scripts/get_maintainer.pl`).
I hope that helps!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi
@ 2026-03-15 17:25 Adrián García Casado
0 siblings, 0 replies; 7+ messages in thread
From: Adrián García Casado @ 2026-03-15 17:25 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrián García Casado
This patch series provides functional optimizations and alignments for
multiple kernel components, specifically targeting MMC quirks,
Rust block driver abstractions, and iwlwifi interrupt affinity.
These changes were previously submitted as a single monolithic patch
but have now been split into logical, atomic commits as requested.
The code style has been verified against checkpatch.pl.
Summary of changes:
1. MMC: Consolidate imx25/35 quirk data and add Kingston CID support.
2. Rust: Update rnull driver to use Pin<KBox<QueueData>> for alignment
with kernel 7.0 zero-copy initialization.
3. iwlwifi: Optimize MSI-X interrupt affinity mapping by skipping
the boot core (CPU0) for high-rate RSS queues.
v1 -> v2:
- Split monolithic patch into logical commits.
- Updated author and email to Adrián García Casado <adriangarciacasado42@gmail.com>.
- Removed accidental addition of nested kernel repository.
- Fixed Rust code style (line wrapping).
- Fixed iwlwifi white space issue.
- Wrapped commit descriptions to 75 characters.
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Haibo Chen <haibo.chen@nxp.com>
Cc: Frank Li <Frank.Li@nxp.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Boqun Feng <boqun@kernel.org>
Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: linux-mmc@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-block@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Adrián García Casado (3):
wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity
rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit
mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID
drivers/block/rnull/rnull.rs | 13 +++++++++----
drivers/mmc/core/quirks.h | 4 ++++
drivers/mmc/host/sdhci-esdhc-imx.c | 12 ++++--------
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c | 10 ++++++++++
4 files changed, 27 insertions(+), 12 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi
@ 2026-03-15 17:16 Adrian Garcia Cicuelo
0 siblings, 0 replies; 7+ messages in thread
From: Adrian Garcia Cicuelo @ 2026-03-15 17:16 UTC (permalink / raw)
To: Ulf Hansson, Adrian Hunter, Andreas Hindborg, Jens Axboe,
Miri Korenblit
Cc: Miguel Ojeda, Haibo Chen, Frank Li, Sascha Hauer, Boqun Feng,
linux-mmc, imx, linux-arm-kernel, linux-block, rust-for-linux,
linux-wireless, linux-kernel, Adrian Garcia Cicuelo
This patch series provides functional optimizations and alignments for
multiple kernel components, specifically targeting MMC quirks,
Rust block driver abstractions, and iwlwifi interrupt affinity.
These changes were previously submitted as a single monolithic patch
but have now been split into logical, atomic commits as requested.
The code style has been verified against checkpatch.pl.
Summary of changes:
1. MMC: Consolidate imx25/35 quirk data and add Kingston CID support.
2. Rust: Update rnull driver to use Pin<KBox<QueueData>> for alignment
with kernel 7.0 zero-copy initialization.
3. iwlwifi: Optimize MSI-X interrupt affinity mapping by skipping
the boot core (CPU0) for high-rate RSS queues.
v1 -> v2:
- Split monolithic patch into logical commits.
- Removed accidental addition of nested kernel repository.
- Fixed Rust code style (line wrapping).
- Fixed iwlwifi white space issue.
- Wrapped commit descriptions to 75 characters.
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Haibo Chen <haibo.chen@nxp.com>
Cc: Frank Li <Frank.Li@nxp.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Boqun Feng <boqun@kernel.org>
Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: linux-mmc@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-block@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Adrian Garcia Cicuelo (3):
mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID
rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit
wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity
drivers/block/rnull/rnull.rs | 13 +++++++++----
drivers/mmc/core/quirks.h | 4 ++++
drivers/mmc/host/sdhci-esdhc-imx.c | 12 ++++--------
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c | 10 ++++++++++
4 files changed, 27 insertions(+), 12 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-15 18:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15 17:26 [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 2/3] rust: block: rnull: update to Pin<KBox<QueueData>> for PinInit Adrián García Casado
2026-03-15 17:26 ` [PATCH v2 3/3] mmc: sdhci-esdhc-imx: consolidate imx25/35 data and add Kingston CID Adrián García Casado
2026-03-15 18:21 ` [PATCH v2 0/3] Optimization and alignment for MMC, Rust and iwlwifi Miguel Ojeda
-- strict thread matches above, loose matches on Subject: below --
2026-03-15 17:25 Adrián García Casado
2026-03-15 17:16 Adrian Garcia Cicuelo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox