mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 51 participants
  • 19130 discussions
[PATCH openEuler-1.0-LTS] netlink: fix potential sleeping issue in mqueue_flush_file
by Zhengchao Shao 26 Jan '24

26 Jan '24
mainline inclusion from mainline-v6.8-rc1 commit 234ec0b6034b16869d45128b8cd2dc6ffe596f04 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8Z1LM Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- I analyze the potential sleeping issue of the following processes: Thread A Thread B ... netlink_create //ref = 1 do_mq_notify ... sock = netlink_getsockbyfilp ... //ref = 2 info->notify_sock = sock; ... ... netlink_sendmsg ... skb = netlink_alloc_large_skb //skb->head is vmalloced ... netlink_unicast ... sk = netlink_getsockbyportid //ref = 3 ... netlink_sendskb ... __netlink_sendskb ... skb_queue_tail //put skb to sk_receive_queue ... sock_put //ref = 2 ... ... ... netlink_release ... deferred_put_nlk_sk //ref = 1 mqueue_flush_file spin_lock remove_notification netlink_sendskb sock_put //ref = 0 sk_free ... __sk_destruct netlink_sock_destruct skb_queue_purge //get skb from sk_receive_queue ... __skb_queue_purge_reason kfree_skb_reason __kfree_skb ... skb_release_all skb_release_head_state netlink_skb_destructor vfree(skb->head) //sleeping while holding spinlock In netlink_sendmsg, if the memory pointed to by skb->head is allocated by vmalloc, and is put to sk_receive_queue queue, also the skb is not freed. When the mqueue executes flush, the sleeping bug will occur. Use vfree_atomic instead of vfree in netlink_skb_destructor to solve the issue. Fixes: c05cdb1b864f ("netlink: allow large data transfers from user-space") Signed-off-by: Zhengchao Shao <shaozhengchao(a)huawei.com> Link: https://lore.kernel.org/r/20240122011807.2110357-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni <pabeni(a)redhat.com> Signed-off-by: Zhengchao Shao <shaozhengchao(a)huawei.com> --- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 6b5be7a426ac..fd0fa4c37a3b 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -374,7 +374,7 @@ static void netlink_skb_destructor(struct sk_buff *skb) if (is_vmalloc_addr(skb->head)) { if (!skb->cloned || !atomic_dec_return(&(skb_shinfo(skb)->dataref))) - vfree(skb->head); + vfree_atomic(skb->head); skb->head = NULL; } -- 2.34.1
2 1
0 0
[PATCH OLK-6.6 V2] blk-mq: avoid housekeeping CPUs scheduling a worker on a non-housekeeping CPU
by Xiongfeng Wang 26 Jan '24

26 Jan '24
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8YB4M CVE: N/A --------------------------------- When NOHZ_FULL is enabled, such as in HPC situation, CPUs are divided into housekeeping CPUs and non-housekeeping CPUs. Non-housekeeping CPUs are NOHZ_FULL CPUs and are often monopolized by the userspace process, such HPC application process. Any sort of interruption is not expected. blk_mq_hctx_next_cpu() selects each cpu in 'hctx->cpumask' alternately to schedule the work thread blk_mq_run_work_fn(). When 'hctx->cpumask' contains housekeeping CPU and non-housekeeping CPU at the same time, a housekeeping CPU, which want to request a IO, may schedule a worker on a non-housekeeping CPU. This may affect the performance of the userspace application running on non-housekeeping CPUs. So let's just schedule the worker thread on the current CPU when the current CPU is housekeeping CPU. Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- block/blk-mq.c | 11 ++++++++++- include/linux/sched/isolation.h | 3 +++ kernel/sched/isolation.c | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 6ab7f360ff2a..52cfbeb75355 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -24,6 +24,7 @@ #include <linux/sched/sysctl.h> #include <linux/sched/topology.h> #include <linux/sched/signal.h> +#include <linux/sched/isolation.h> #include <linux/delay.h> #include <linux/crash_dump.h> #include <linux/prefetch.h> @@ -2214,9 +2215,17 @@ static int blk_mq_hctx_next_cpu(struct blk_mq_hw_ctx *hctx) */ void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs) { + int work_cpu; + if (unlikely(blk_mq_hctx_stopped(hctx))) return; - kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work, + + if (enhanced_isolcpus && tick_nohz_full_enabled() && + housekeeping_cpu(raw_smp_processor_id(), HK_TYPE_WQ)) + work_cpu = raw_smp_processor_id(); + else + work_cpu = blk_mq_hctx_next_cpu(hctx); + kblockd_mod_delayed_work_on(work_cpu, &hctx->run_work, msecs_to_jiffies(msecs)); } EXPORT_SYMBOL(blk_mq_delay_run_hw_queue); diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h index fe1a46f30d24..3894e74e8dc5 100644 --- a/include/linux/sched/isolation.h +++ b/include/linux/sched/isolation.h @@ -19,6 +19,7 @@ enum hk_type { }; #ifdef CONFIG_CPU_ISOLATION +extern bool enhanced_isolcpus; DECLARE_STATIC_KEY_FALSE(housekeeping_overridden); extern int housekeeping_any_cpu(enum hk_type type); extern const struct cpumask *housekeeping_cpumask(enum hk_type type); @@ -29,6 +30,8 @@ extern void __init housekeeping_init(void); #else +#define enhanced_isolcpus 0 + static inline int housekeeping_any_cpu(enum hk_type type) { return smp_processor_id(); diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 373d42c707bc..3884c245faf5 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -239,3 +239,11 @@ static int __init housekeeping_isolcpus_setup(char *str) return housekeeping_setup(str, flags); } __setup("isolcpus=", housekeeping_isolcpus_setup); + +bool enhanced_isolcpus; +static int __init enhanced_isolcpus_setup(char *str) +{ + enhanced_isolcpus = true; + return 0; +} +__setup("enhanced_isolcpus", enhanced_isolcpus_setup); -- 2.20.1
2 1
0 0
[PATCH OLK-6.6] pci: Enable acs for QLogic HBA cards
by Zeng Heng 26 Jan '24

26 Jan '24
From: Xishi Qiu <qiuxishi(a)huawei.com> euler inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8Z1IW CVE: N/A ------------------------------------------------- Add support of port isolation for QLogic HBA cards. Signed-off-by: Xishi Qiu <qiuxishi(a)huawei.com> Signed-off-by: Fang Ying <fangying1(a)huawei.com> Signed-off-by: Kefeng Wang <wangkefeng.wang(a)huawei.com> Signed-off-by: Hui Wang <john.wanghui(a)huawei.com> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Confilicts: drivers/pci/quirks.c Signed-off-by: Xuefeng Wang <wxf.wang(a)hisilicon.com> Reviewed-by: Yang Yingliang <yangyingliang(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11(a)huawei.com> Confilicts: drivers/pci/quirks.c Reviewed-by: wangxiongfeng <wangxiongfeng2(a)huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index ae95d0950772..83a875b53111 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5050,6 +5050,8 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs }, { 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */ { 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */ + { 0x1077, 0x2031, pci_quirk_mf_endpoint_acs}, /* QLogic QL2672 */ + { 0x1077, 0x2532, pci_quirk_mf_endpoint_acs}, /* Cavium ThunderX */ { PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs }, /* Cavium multi-function devices */ -- 2.25.1
1 0
0 0
[PATCH openEuler-1.0-LTS 0/2] dhugetlb: skip unexpected migration
by Liu Shixin 26 Jan '24

26 Jan '24
Fix unexpected migration of pages from dynamic hugetlb pool. Liu Shixin (2): dhugetlb: introduce page_belong_to_dynamic_hugetlb() function dhugetlb: skip unexpected migration include/linux/hugetlb.h | 5 +++++ include/linux/migrate.h | 6 +++++- mm/compaction.c | 3 +++ mm/hugetlb.c | 16 +++++++++++----- mm/mempolicy.c | 10 ++++++++-- mm/migrate.c | 3 +++ mm/page_isolation.c | 3 ++- 7 files changed, 37 insertions(+), 9 deletions(-) -- 2.25.1
2 3
0 0
[PATCH OLK-6.6] arm64: topology: Support PHYTIUM CPU
by Zeng Heng 26 Jan '24

26 Jan '24
From: Hanjun Guo <guohanjun(a)huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8Z0KI CVE: NA --------------------------- Add the support for PHYTIUM topology detect, it's better use PPTT ACPI table to report the topology, but we can live with it at now. Signed-off-by: Hanjun Guo <guohanjun(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> Reviewed-by: Xie XiuQi <xiexiuqi(a)huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai(a)huawei.com> Conflicts: drivers/base/arch_topology.c Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/include/asm/cputype.h | 1 + drivers/base/arch_topology.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 202588ad92e8..8629961ad39b 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -60,6 +60,7 @@ #define ARM_CPU_IMP_FUJITSU 0x46 #define ARM_CPU_IMP_HISI 0x48 #define ARM_CPU_IMP_APPLE 0x61 +#define ARM_CPU_IMP_PHYTIUM 0x70 #define ARM_CPU_IMP_AMPERE 0xC0 #define ARM_CPU_PART_AEM_V8 0xD0F diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index b741b5ba82bd..0db635e94492 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -862,6 +862,14 @@ void store_cpu_topology(unsigned int cpuid) cpuid_topo->core_id = cpuid; cpuid_topo->package_id = cpu_to_node(cpuid); +#if defined(CONFIG_ARM64) + if (read_cpuid_implementor() == ARM_CPU_IMP_PHYTIUM) { + cpuid_topo->thread_id = 0; + cpuid_topo->core_id = cpuid; + cpuid_topo->package_id = 0; + } +#endif + pr_debug("CPU%u: package %d core %d thread %d\n", cpuid, cpuid_topo->package_id, cpuid_topo->core_id, cpuid_topo->thread_id); -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 691/2767] binfmt_elf32.c:undefined reference to `arch_elf_adjust_prot'
by kernel test robot 25 Jan '24

25 Jan '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6188d51075eac8cf7cf6909fec1e73fbc51aa29b commit: 7de3ab4c3dd938fae3626a6344830b018eb7ba4f [691/2767] arm64: introduce binfmt_elf32.c config: arm64-randconfig-004-20240125 (https://download.01.org/0day-ci/archive/20240125/202401252015.eYqQYSXZ-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240125/202401252015.eYqQYSXZ-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202401252015.eYqQYSXZ-lkp@intel.com/ All errors (new ones prefixed by >>): >> aarch64-linux-ld: Unexpected GOT/PLT entries detected! >> aarch64-linux-ld: Unexpected run-time procedure linkages detected! aarch64-linux-ld: arch/arm64/kernel/binfmt_elf32.o: in function `load_elf_interp': >> binfmt_elf32.c:(.text+0xa70): undefined reference to `arch_elf_adjust_prot' aarch64-linux-ld: arch/arm64/kernel/binfmt_elf32.o: in function `load_elf_binary': binfmt_elf32.c:(.text+0x1d88): undefined reference to `arch_elf_adjust_prot' -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2629/2767] include/linux/resctrl.h:291: undefined reference to `lockdep_is_cpus_held'
by kernel test robot 25 Jan '24

25 Jan '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6188d51075eac8cf7cf6909fec1e73fbc51aa29b commit: c054efea286659a6504fdeafc0a611c6a3b124cc [2629/2767] x86/resctrl: Claim get_domain_from_cpu() for resctrl config: x86_64-randconfig-012-20240125 (https://download.01.org/0day-ci/archive/20240125/202401252038.VOiTn1TA-lkp@…) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240125/202401252038.VOiTn1TA-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202401252038.VOiTn1TA-lkp@intel.com/ All errors (new ones prefixed by >>): ld: vmlinux.o: in function `resctrl_get_domain_from_cpu': >> include/linux/resctrl.h:291: undefined reference to `lockdep_is_cpus_held' >> ld: include/linux/resctrl.h:291: undefined reference to `lockdep_is_cpus_held' >> ld: include/linux/resctrl.h:291: undefined reference to `lockdep_is_cpus_held' vim +291 include/linux/resctrl.h 274 275 /* 276 * Caller must be in a RCU read-side critical section, or hold the 277 * cpuhp read lock to prevent the struct rdt_domain being freed. 278 */ 279 static inline struct rdt_domain * 280 resctrl_get_domain_from_cpu(int cpu, struct rdt_resource *r) 281 { 282 struct rdt_domain *d; 283 284 /* 285 * Walking r->domains, ensure it can't race with cpuhp. 286 * Because this is called via IPI by rdt_ctrl_update(), assertions 287 * about locks this thread holds will lead to false positives. Check 288 * someone is holding the CPUs lock. 289 */ 290 if (IS_ENABLED(CONFIG_LOCKDEP)) > 291 lockdep_is_cpus_held(); 292 293 list_for_each_entry_rcu(d, &r->domains, list) { 294 /* Find the domain that contains this CPU */ 295 if (cpumask_test_cpu(cpu, &d->cpu_mask)) 296 return d; 297 } 298 299 return NULL; 300 } 301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 0/1] arm64: Turn on CONFIG_IPI_AS_NMI in openeuler_defconfig
by Liao Chen 25 Jan '24

25 Jan '24
This patch turns on CONFIG_IPI_AS_NMI in openeuler_defconfig, which follows upstream commit 6188d51075ea (arm64: Add CONFIG_IPI_AS_NMI to IPI as NMI feature). CONFIG_IPI_AS_NMI=y Liao Chen (1): arm64: Turn on CONFIG_IPI_AS_NMI in openeuler_defconfig arch/arm64/configs/openeuler_defconfig | 1 + 1 file changed, 1 insertion(+) -- 2.34.1
1 0
0 0
[PATCH OLK-5.10] mm/dynamic_hugetlb: skip unexpected migration
by Liu Shixin 25 Jan '24

25 Jan '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8YUPE CVE: NA -------------------------------- With dynamic hugetlb feature, some memory is isolated in the dynamic pool. When try to compact memory, the kcompactd thread will scan all memory, althougt some memory is belonging to dynamic pool, kcompactd still try to migrate them. After migration, these memory will free to dynamic pool rather than buddy system, which results the free pages in buddy system decreased. Since it is unnecessary to compact the memory in the dynamic pool, skip migrate them to fix the problem. The same problem also existed in alloc_contig_range(), offline_pages() and numa balancing. Skip it again in these three scenarios. In addition to this, we have to consider the migration of hugepage, if a hugepage is from dynamic pool, we should not allow to migrate it. Signed-off-by: Liu Shixin <liushixin2(a)huawei.com> --- include/linux/dynamic_hugetlb.h | 4 ++-- mm/compaction.c | 4 ++++ mm/migrate.c | 7 +++++++ mm/page_isolation.c | 4 +++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/linux/dynamic_hugetlb.h b/include/linux/dynamic_hugetlb.h index eff31669e210..06b20a24dfe6 100644 --- a/include/linux/dynamic_hugetlb.h +++ b/include/linux/dynamic_hugetlb.h @@ -184,12 +184,12 @@ static inline void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) { } +#endif + static inline bool page_belong_to_dynamic_hugetlb(struct page *page) { return false; } -#endif - #endif /* CONFIG_DYNAMIC_HUGETLB */ #endif /* __LINUX_DYNAMIC_HUGETLB_H */ diff --git a/mm/compaction.c b/mm/compaction.c index bdcde6ea7f97..754734a649d5 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -23,6 +23,7 @@ #include <linux/freezer.h> #include <linux/page_owner.h> #include <linux/psi.h> +#include <linux/dynamic_hugetlb.h> #include "internal.h" #ifdef CONFIG_COMPACTION @@ -1862,6 +1863,9 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc) if (!page) continue; + if (page_belong_to_dynamic_hugetlb(page)) + continue; + /* * If isolation recently failed, do not retry. Only check the * pageblock once. COMPACT_CLUSTER_MAX causes a pageblock diff --git a/mm/migrate.c b/mm/migrate.c index 9d40b1264a8b..c8491a744e8c 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -49,6 +49,7 @@ #include <linux/sched/mm.h> #include <linux/ptrace.h> #include <linux/oom.h> +#include <linux/dynamic_hugetlb.h> #include <asm/tlbflush.h> @@ -1611,6 +1612,9 @@ struct page *alloc_migration_target(struct page *page, unsigned long private) if (PageHuge(page)) { struct hstate *h = page_hstate(compound_head(page)); + if (page_belong_to_dynamic_hugetlb(page)) + return NULL; + gfp_mask = htlb_modify_alloc_mask(h, gfp_mask); return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask); } @@ -2088,6 +2092,9 @@ static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page) if (!migrate_balanced_pgdat(pgdat, compound_nr(page))) return 0; + if (page_belong_to_dynamic_hugetlb(page)) + return 0; + if (isolate_lru_page(page)) return 0; diff --git a/mm/page_isolation.c b/mm/page_isolation.c index bddf788f45bf..48a0ee9cef0a 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -10,6 +10,7 @@ #include <linux/hugetlb.h> #include <linux/page_owner.h> #include <linux/migrate.h> +#include <linux/dynamic_hugetlb.h> #include "internal.h" #define CREATE_TRACE_POINTS @@ -195,7 +196,8 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, pfn += pageblock_nr_pages) { page = __first_valid_page(pfn, pageblock_nr_pages); if (page) { - if (set_migratetype_isolate(page, migratetype, flags)) { + if (page_belong_to_dynamic_hugetlb(page) || + set_migratetype_isolate(page, migratetype, flags)) { undo_pfn = pfn; goto undo; } -- 2.25.1
2 1
0 0
[PATCH OLK-6.6 0/2] Expose swapcache stat for memcg v1
by Liu Shixin 25 Jan '24

25 Jan '24
The first patch expose swapcache stat for memcg v1, the second patch remote unused do_memsw_account() in memcg1_stat_format(). Liu Shixin (2): memcg: expose swapcache stat for memcg v1 memcg: remove unused do_memsw_account in memcg1_stat_format Documentation/admin-guide/cgroup-v1/memory.rst | 1 + mm/memcontrol.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) -- 2.25.1
1 2
0 0
  • ← Newer
  • 1
  • ...
  • 1373
  • 1374
  • 1375
  • 1376
  • 1377
  • 1378
  • 1379
  • ...
  • 1913
  • Older →

HyperKitty Powered by HyperKitty