nvme-multipath: find NUMA path only for online numa-node
Subsystems (6)
Sasha Levin
maintainerPATCH 1/8 nvme-multipath: find NUMA path only for online numa-node
From: Nilay Shroff <[email protected]>
[ Upstream commit d3a043733f25d743f3aa617c7f82dbcb5ee2211a ]
In current native multipath design when a shared namespace is created, we loop through each possible numa-node, calculate the NUMA distance of that node from each nvme controller and then cache the optimal IO path for future reference while sending IO. The issue with this design is that we may refer to the NUMA distance table for an offline node which may not be populated at the time and so we may inadvertently end up finding and caching a non-optimal path for IO. Then latter when the corresponding numa-node becomes online and hence the NUMA distance table entry for that node is created, ideally we should re-calculate the multipath node distance for the newly added node however that doesn't happen unless we rescan/reset the controller. So essentially, we may keep using non-optimal IO path for a node which is made online after namespace is created.
This patch helps fix this issue ensuring that when a shared namespace is created, we calculate the multipath node distance for each online numa-node instead of each possible numa-node. Then latter when a node becomes online and we receive any IO on that newly added node, we would calculate the multipath node distance for newly added node but this time NUMA distance table would have been already populated for newly added node. Hence we would be able to correctly calculate the multipath node distance and choose the optimal path for the IO.
--- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
@@ -419,7 +419,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)int node, srcu_idx; srcu_idx =srcu_read_lock (&head->srcu); -for_each_node (node) +for_each_online_node (node)__nvme_find_path (head, node);srcu_read_unlock (&head->srcu, srcu_idx); }
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 2/8 nvme: adjust multiples of NVME_CTRL_PAGE_SIZE in offset
From: Kundan Kumar <[email protected]>
[ Upstream commit 1bd293fcf3af84674e82ed022c049491f3768840 ]
bio_vec start offset may be relatively large particularly when large folio gets added to the bio. A bigger offset will result in avoiding the single-segment mapping optimization and end up using expensive mempool_alloc further.
Rather than using absolute value, adjust bv_offset by NVME_CTRL_PAGE_SIZE while checking if segment can be fitted into one/two PRP entries.
--- drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/pci.c +2 -1
@@ -844,7 +844,8 @@ static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req,struct bio_vec bv =req_bvec (req);if (!is_pci_p2pdma_page (bv.bv_page)) { -if (bv.bv_offset + bv.bv_len <=NVME_CTRL_PAGE_SIZE *2 ) +if ((bv.bv_offset & (NVME_CTRL_PAGE_SIZE -1 )) + + bv.bv_len <=NVME_CTRL_PAGE_SIZE *2 )return nvme_setup_prp_simple (dev, req, &cmnd->rw, &bv);
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 3/8 afs: Don't cross .backup mountpoint from backup volume
In reply to Sasha LevinFrom: Marc Dionne <[email protected]>
[ Upstream commit 29be9100aca2915fab54b5693309bc42956542e5 ]
Don't cross a mountpoint that explicitly specifies a backup volume (target is <vol>.backup) when starting from a backup volume.
It it not uncommon to mount a volume's backup directly in the volume itself. This can cause tools that are not paying attention to get into a loop mounting the volume onto itself as they attempt to traverse the tree, leading to a variety of problems.
This doesn't prevent the general case of loops in a sequence of mountpoints, but addresses a common special case in the same way as other afs clients.
--- fs/afs/mntpt.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/afs/mntpt.c +5 -0
@@ -146,6 +146,11 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)put_page (page);if (ret <0 )return ret; + +/* Don't cross a backup volume mountpoint from a backup volume */ +if (src_as->volume && src_as->volume->type ==AFSVL_BACKVOL && + ctx->type ==AFSVL_BACKVOL ) +return -ENODEV ; }return 0 ;
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 4/8 platform/x86: touchscreen_dmi: Add support for setting touchscreen properties from cmdline
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 0b178b02673998f5acca5a0365a8858ca45beedb ]
On x86/ACPI platforms touchscreens mostly just work without needing any device/model specific configuration. But in some cases (mostly with Silead and Goodix touchscreens) it is still necessary to manually specify various touchscreen-properties on a per model basis.
touchscreen_dmi is a special place for DMI quirks for this, but it can be challenging for users to figure out the right property values, especially for Silead touchscreens where non of these can be read back from the touchscreen-controller.
ATM users can only test touchscreen properties by editing touchscreen_dmi.c and then building a completely new kernel which makes it unnecessary difficult for users to test and submit properties when necessary for their laptop / tablet model.
Add support for specifying properties on the kernel commandline to allow users to easily figure out the right settings. See the added documentation in kernel-parameters.txt for the commandline syntax.
--- .../admin-guide/kernel-parameters.txt | 22 ++++++ drivers/platform/x86/touchscreen_dmi.c | 79 ++++++++++++++++++- 2 files changed, 98 insertions(+), 3 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +22 -0
@@ -1625,6 +1625,28 @@ Format: <bus_id>,<clkrate> + i2c_touchscreen_props= [HW,ACPI,X86] + Set device-properties for ACPI-enumerated I2C-attached + touchscreen, to e.g. fix coordinates of upside-down + mounted touchscreens. If you need this option please + submit a drivers/platform/x86/touchscreen_dmi.c patch + adding a DMI quirk for this. + + Format: + <ACPI_HW_ID>:<prop_name>=<val>[:prop_name=val][:...] + Where <val> is one of: + Omit "=<val>" entirely Set a boolean device-property + Unsigned number Set a u32 device-property + Anything else Set a string device-property + + Examples (split over multiple lines): + i2c_touchscreen_props=GDIX1001:touchscreen-inverted-x: + touchscreen-inverted-y + + i2c_touchscreen_props=MSSL1680:touchscreen-size-x=1920: + touchscreen-size-y=1080:touchscreen-inverted-y: + firmware-name=gsl1680-vendor-model.fw:silead,home-button + i8042.debug [HW] Toggle i8042 debug mode i8042.unmask_kbd_data [HW] Enable printing of interrupt data from the KBD port
drivers/platform/x86/touchscreen_dmi.c +76 -3
112 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH AUTOSEL 5.10 4/8] platform/x86: touchscreen_dmi: Add support for setting touchscreen properties from cmdline
Hi!
Quoted 12 lines
[ Upstream commit
0b178b02673998f5acca5a0365a8858ca45beedb]On x86/ACPI platforms touchscreens mostly just work without needing any device/model specific configuration. But in some cases (mostly with Silead and Goodix touchscreens) it is still necessary to manually specify various touchscreen-properties on a per model basis.
touchscreen_dmiis a special place for DMI quirks for this, but it can be challenging for users to figure out the right property values, especially for Silead touchscreens where non of these can be read back from the touchscreen-controller.
Quoted 8 lines
ATM users can only test touchscreen properties by editing
touchscreen_dmi.cand then building a completely new kernel which makes it unnecessary difficult for users to test and submit properties when necessary for their laptop / tablet model.Add support for specifying properties on the kernel commandline to allow users to easily figure out the right settings. See the added documentation in kernel-parameters.txt for the commandline syntax.
I don't believe this is suitable for stable.
Best regards,
Pavel
Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
Sasha Levin
maintainerPATCH 5/8 platform/x86: touchscreen_dmi: Add info for GlobalSpace SolT IVW 11.6" tablet
In reply to Sasha LevinFrom: hmtheboy154 <[email protected]>
[ Upstream commit 7c8639aa41343fd7b3dbe09baf6b0791fcc407a1 ]
This is a tablet created by GlobalSpace Technologies Limited which uses an Intel Atom x5-Z8300, 4GB of RAM & 64GB of storage.
--- drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +25 -0
@@ -860,6 +860,22 @@ static const struct ts_dmi_data schneider_sct101ctm_data = { .properties = schneider_sct101ctm_props, }; +static const struct property_entry globalspace_solt_ivw116_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,7 ), +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,22 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1723 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1077 ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl1680-globalspace-solt-ivw116.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), +PROPERTY_ENTRY_BOOL ("silead,home-button" ), + { } +}; + +static const struct ts_dmi_data globalspace_solt_ivw116_data = { + .acpi_name ="MSSL1680:00" , + .properties = globalspace_solt_ivw116_props, +}; +static const struct property_entry techbite_arc_11_6_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,5 ),PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,7 ),
@@ -1493,6 +1509,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"), }, }, + { +/* GlobalSpace SoLT IVW 11.6" */ + .driver_data = (void *)&globalspace_solt_ivw116_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Globalspace Tech Pvt Ltd" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"SolTIVW" ), + DMI_MATCH(DMI_PRODUCT_SKU, "PN20170413488"), + }, + }, {/* Techbite Arc 11.6 */ .driver_data = (void *)&techbite_arc_11_6_data,
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 6/8 platform/x86: touchscreen_dmi: Add info for the EZpad 6s Pro
In reply to Sasha LevinFrom: hmtheboy154 <[email protected]>
[ Upstream commit 3050052613790e75b5e4a8536930426b0a8b0774 ]
The "EZpad 6s Pro" uses the same touchscreen as the "EZpad 6 Pro B", unlike the "Ezpad 6 Pro" which has its own touchscreen.
--- drivers/platform/x86/touchscreen_dmi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +11 -0
@@ -1280,6 +1280,17 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"), }, }, + { +/* Jumper EZpad 6s Pro */ + .driver_data = (void *)&jumper_ezpad_6_pro_b_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Jumper" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Ezpad" ), +/* Above matches are too generic, add bios match */ +DMI_MATCH (DMI_BIOS_VERSION ,"E.WSA116_8.E1.042.bin" ), + DMI_MATCH(DMI_BIOS_DATE, "01/08/2020"), + }, + }, {/* Jumper EZpad 6 m4 */ .driver_data = (void *)&jumper_ezpad_6_m4_data,
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 7/8 nvmet: fix a possible leak when destroy a ctrl during qp establishment
In reply to Sasha LevinFrom: Sagi Grimberg <[email protected]>
[ Upstream commit c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4 ]
In nvmet_sq_destroy we capture sq->ctrl early and if it is non-NULL we know that a ctrl was allocated (in the admin connect request handler) and we need to release pending AERs, clear ctrl->sqs and sq->ctrl (for nvme-loop primarily), and drop the final reference on the ctrl.
However, a small window is possible where nvmet_sq_destroy starts (as a result of the client giving up and disconnecting) concurrently with the nvme admin connect cmd (which may be in an early stage). But *before* kill_and_confirm of sq->ref (i.e. the admin connect managed to get an sq live reference). In this case, sq->ctrl was allocated however after it was captured in a local variable in nvmet_sq_destroy.
This prevented the final reference drop on the ctrl.
Solve this by re-capturing the sq->ctrl after all inflight request has completed, where for sure sq->ctrl reference is final, and move forward based on that.
This issue was observed in an environment with many hosts connecting multiple ctrls simoutanuosly, creating a delay in allocating a ctrl leading up to this race window.
--- drivers/nvme/target/core.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/nvme/target/core.c +9 -0
@@ -795,6 +795,15 @@ void nvmet_sq_destroy(struct nvmet_sq *sq)wait_for_completion (&sq->free_done);percpu_ref_exit (&sq->ref); +/* +* we must reference the ctrl again after waiting for inflight IO +* to complete. Because admin connect may have sneaked in after we +* store sq->ctrl locally, but before we killed the percpu_ref. the +* admin connect allocates and assigns sq->ctrl, which now needs a +* final ref put, as this ctrl is going away. +*/ + ctrl = sq->ctrl; +if (ctrl) {/* * The teardown flow may take some time, and the host may not
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 8/8 kbuild: fix short log for AS in link-vmlinux.sh
In reply to Sasha LevinFrom: Masahiro Yamada <[email protected]>
[ Upstream commit 3430f65d6130ccbc86f0ff45642eeb9e2032a600 ]
In convention, short logs print the output file, not the input file.
Let's change the suffix for 'AS' since it assembles *.S into *.o.
[Before]
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.S LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.S LD vmlinux
[After]
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux
--- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -1
@@ -213,7 +213,7 @@ kallsyms_step() vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o} kallsyms ${kallsyms_vmlinux} ${kallsyms_S} - info AS ${kallsyms_S} + info AS ${kallsymso} ${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \ ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ -c -o ${kallsymso} ${kallsyms_S}
Signature · 1 line
2.43.0
Re: [PATCH AUTOSEL 5.10 8/8] kbuild: fix short log for AS in link-vmlinux.sh
Hi1
Quoted 22 lines
From: Masahiro Yamada <[email protected]>
[ Upstream commit
3430f65d6130ccbc86f0ff45642eeb9e2032a600]In convention, short logs print the output file, not the input file.
Let's change the suffix for 'AS' since it assembles *.S into *.o.
[Before]
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.S LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.S LD vmlinux[After]
Quoted 9 lines
LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux
I don't believe this is "bad enough" bug for -stable.
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany