- 19 5月, 2023 4 次提交
-
-
由 Stefan Roesch 提交于
mainline inclusion from mainline-v6.4-rc1 commit d7597f59 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I72R0B CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d7597f59d1d33e9efbffa7060deb9ee5bd119e62 ---------------------------------------------------------------------- Patch series "mm: process/cgroup ksm support", v9. So far KSM can only be enabled by calling madvise for memory regions. To be able to use KSM for more workloads, KSM needs to have the ability to be enabled / disabled at the process / cgroup level. Use case 1: The madvise call is not available in the programming language. An example for this are programs with forked workloads using a garbage collected language without pointers. In such a language madvise cannot be made available. In addition the addresses of objects get moved around as they are garbage collected. KSM sharing needs to be enabled "from the outside" for these type of workloads. Use case 2: The same interpreter can also be used for workloads where KSM brings no benefit or even has overhead. We'd like to be able to enable KSM on a workload by workload basis. Use case 3: With the madvise call sharing opportunities are only enabled for the current process: it is a workload-local decision. A considerable number of sharing opportunities may exist across multiple workloads or jobs (if they are part of the same security domain). Only a higler level entity like a job scheduler or container can know for certain if its running one or more instances of a job. That job scheduler however doesn't have the necessary internal workload knowledge to make targeted madvise calls. Security concerns: In previous discussions security concerns have been brought up. The problem is that an individual workload does not have the knowledge about what else is running on a machine. Therefore it has to be very conservative in what memory areas can be shared or not. However, if the system is dedicated to running multiple jobs within the same security domain, its the job scheduler that has the knowledge that sharing can be safely enabled and is even desirable. Performance: Experiments with using UKSM have shown a capacity increase of around 20%. Here are the metrics from an instagram workload (taken from a machine with 64GB main memory): full_scans: 445 general_profit: 20158298048 max_page_sharing: 256 merge_across_nodes: 1 pages_shared: 129547 pages_sharing: 5119146 pages_to_scan: 4000 pages_unshared: 1760924 pages_volatile: 10761341 run: 1 sleep_millisecs: 20 stable_node_chains: 167 stable_node_chains_prune_millisecs: 2000 stable_node_dups: 2751 use_zero_pages: 0 zero_pages_sharing: 0 After the service is running for 30 minutes to an hour, 4 to 5 million shared pages are common for this workload when using KSM. Detailed changes: 1. New options for prctl system command This patch series adds two new options to the prctl system call. The first one allows to enable KSM at the process level and the second one to query the setting. The setting will be inherited by child processes. With the above setting, KSM can be enabled for the seed process of a cgroup and all processes in the cgroup will inherit the setting. 2. Changes to KSM processing When KSM is enabled at the process level, the KSM code will iterate over all the VMA's and enable KSM for the eligible VMA's. When forking a process that has KSM enabled, the setting will be inherited by the new child process. 3. Add general_profit metric The general_profit metric of KSM is specified in the documentation, but not calculated. This adds the general profit metric to /sys/kernel/debug/mm/ksm. 4. Add more metrics to ksm_stat This adds the process profit metric to /proc/<pid>/ksm_stat. 5. Add more tests to ksm_tests and ksm_functional_tests This adds an option to specify the merge type to the ksm_tests. This allows to test madvise and prctl KSM. It also adds a two new tests to ksm_functional_tests: one to test the new prctl options and the other one is a fork test to verify that the KSM process setting is inherited by client processes. This patch (of 3): So far KSM can only be enabled by calling madvise for memory regions. To be able to use KSM for more workloads, KSM needs to have the ability to be enabled / disabled at the process / cgroup level. 1. New options for prctl system command This patch series adds two new options to the prctl system call. The first one allows to enable KSM at the process level and the second one to query the setting. The setting will be inherited by child processes. With the above setting, KSM can be enabled for the seed process of a cgroup and all processes in the cgroup will inherit the setting. 2. Changes to KSM processing When KSM is enabled at the process level, the KSM code will iterate over all the VMA's and enable KSM for the eligible VMA's. When forking a process that has KSM enabled, the setting will be inherited by the new child process. 1) Introduce new MMF_VM_MERGE_ANY flag This introduces the new flag MMF_VM_MERGE_ANY flag. When this flag is set, kernel samepage merging (ksm) gets enabled for all vma's of a process. 2) Setting VM_MERGEABLE on VMA creation When a VMA is created, if the MMF_VM_MERGE_ANY flag is set, the VM_MERGEABLE flag will be set for this VMA. 3) support disabling of ksm for a process This adds the ability to disable ksm for a process if ksm has been enabled for the process with prctl. 4) add new prctl option to get and set ksm for a process This adds two new options to the prctl system call - enable ksm for all vmas of a process (if the vmas support it). - query if ksm has been enabled for a process. 3. Disabling MMF_VM_MERGE_ANY for storage keys in s390 In the s390 architecture when storage keys are used, the MMF_VM_MERGE_ANY will be disabled. Link: https://lkml.kernel.org/r/20230418051342.1919757-1-shr@devkernel.io Link: https://lkml.kernel.org/r/20230418051342.1919757-2-shr@devkernel.ioSigned-off-by: NStefan Roesch <shr@devkernel.io> Acked-by: NDavid Hildenbrand <david@redhat.com> Cc: David Hildenbrand <david@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Rik van Riel <riel@surriel.com> Cc: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Conflicts: kernel/sys.c mm/ksm.c mm/mmap.c Signed-off-by: NNanyong Sun <sunnanyong@huawei.com>
-
由 xu xin 提交于
mainline inclusion from mainline-v6.1-rc1 commit 21b7bdb5 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I72R0B CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=21b7bdb504ae6b0a795c8d63818611ce02b532c1 ---------------------------------------------------------------------- Add the description of KSM profit and how to determine it separately in system-wide range and inner a single process. Link: https://lkml.kernel.org/r/20220830144003.299870-1-xu.xin16@zte.com.cnSigned-off-by: Nxu xin <xu.xin16@zte.com.cn> Reviewed-by: NXiaokai Ran <ran.xiaokai@zte.com.cn> Reviewed-by: NYang Yang <yang.yang29@zte.com.cn> Reviewed-by: NBagas Sanjaya <bagasdotme@gmail.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Hugh Dickins <hughd@google.com> Cc: Izik Eidus <izik.eidus@ravellosystems.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Conflicts: Documentation/admin-guide/mm/ksm.rst Signed-off-by: NNanyong Sun <sunnanyong@huawei.com>
-
由 xu xin 提交于
mainline inclusion from mainline-v6.1-rc1 commit cb4df4ca category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I72R0B CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cb4df4cae4f2bd8cf7a32eff81178fce31600f7c ---------------------------------------------------------------------- Patch series "ksm: count allocated rmap_items and update documentation", v5. KSM can save memory by merging identical pages, but also can consume additional memory, because it needs to generate rmap_items to save each scanned page's brief rmap information. To determine how beneficial the ksm-policy (like madvise), they are using brings, so we add a new interface /proc/<pid>/ksm_stat for each process The value "ksm_rmap_items" in it indicates the total allocated ksm rmap_items of this process. The detailed description can be seen in the following patches' commit message. This patch (of 2): KSM can save memory by merging identical pages, but also can consume additional memory, because it needs to generate rmap_items to save each scanned page's brief rmap information. Some of these pages may be merged, but some may not be abled to be merged after being checked several times, which are unprofitable memory consumed. The information about whether KSM save memory or consume memory in system-wide range can be determined by the comprehensive calculation of pages_sharing, pages_shared, pages_unshared and pages_volatile. A simple approximate calculation: profit =~ pages_sharing * sizeof(page) - (all_rmap_items) * sizeof(rmap_item); where all_rmap_items equals to the sum of pages_sharing, pages_shared, pages_unshared and pages_volatile. But we cannot calculate this kind of ksm profit inner single-process wide because the information of ksm rmap_item's number of a process is lacked. For user applications, if this kind of information could be obtained, it helps upper users know how beneficial the ksm-policy (like madvise) they are using brings, and then optimize their app code. For example, one application madvise 1000 pages as MERGEABLE, while only a few pages are really merged, then it's not cost-efficient. So we add a new interface /proc/<pid>/ksm_stat for each process in which the value of ksm_rmap_itmes is only shown now and so more values can be added in future. So similarly, we can calculate the ksm profit approximately for a single process by: profit =~ ksm_merging_pages * sizeof(page) - ksm_rmap_items * sizeof(rmap_item); where ksm_merging_pages is shown at /proc/<pid>/ksm_merging_pages, and ksm_rmap_items is shown in /proc/<pid>/ksm_stat. Link: https://lkml.kernel.org/r/20220830143731.299702-1-xu.xin16@zte.com.cn Link: https://lkml.kernel.org/r/20220830143838.299758-1-xu.xin16@zte.com.cnSigned-off-by: Nxu xin <xu.xin16@zte.com.cn> Reviewed-by: NXiaokai Ran <ran.xiaokai@zte.com.cn> Reviewed-by: NYang Yang <yang.yang29@zte.com.cn> Signed-off-by: NCGEL ZTE <cgel.zte@gmail.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Bagas Sanjaya <bagasdotme@gmail.com> Cc: Hugh Dickins <hughd@google.com> Cc: Izik Eidus <izik.eidus@ravellosystems.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Conflicts: include/linux/mm_types.h Signed-off-by: NNanyong Sun <sunnanyong@huawei.com>
-
由 xu xin 提交于
mainline inclusion from mainline-v5.19-rc1 commit 76093853 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I72R0B CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7609385337a4feb6236e42dcd0df2185683ce839 ---------------------------------------------------------------------- Some applications or containers want to use KSM by calling madvise() to advise areas of address space to be MERGEABLE. But they may not know which applications are more likely to cause real merges in the deployment. If this patch is applied, it helps them know their corresponding number of merged pages, and then optimize their app code. As current KSM only counts the number of KSM merging pages(e.g. ksm_pages_sharing and ksm_pages_shared) of the whole system, we cannot see the more fine-grained KSM merging, for the upper application optimization, the merging area cannot be set easily according to the KSM page merging probability of each process. Therefore, it is necessary to add extra statistical means so that the upper level users can know the detailed KSM merging information of each process. We add a new proc file named as ksm_merging_pages under /proc/<pid>/ to indicate the involved ksm merging pages of this process. [akpm@linux-foundation.org: fix comment typo, remove BUG_ON()s] Link: https://lkml.kernel.org/r/20220325082318.2352853-1-xu.xin16@zte.com.cnSigned-off-by: Nxu xin <xu.xin16@zte.com.cn> Reported-by: Nkernel test robot <lkp@intel.com> Reviewed-by: NYang Yang <yang.yang29@zte.com.cn> Reviewed-by: NRan Xiaokai <ran.xiaokai@zte.com.cn> Reported-by: NZeal Robot <zealci@zte.com.cn> Cc: Kees Cook <keescook@chromium.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Ohhoon Kwon <ohoono.kwon@samsung.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Stephen Brennan <stephen.s.brennan@oracle.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Feng Tang <feng.tang@intel.com> Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: Ran Xiaokai <ran.xiaokai@zte.com.cn> Cc: Zeal Robot <zealci@zte.com.cn> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Conflicts: include/linux/mm_types.h Signed-off-by: NNanyong Sun <sunnanyong@huawei.com>
-
- 18 5月, 2023 2 次提交
-
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @Hongchen_Zhang ``` This series of patches adds the kexec/kdump feature of the LoongArch architecture. The production kernel and capture kernel can be the same kernel with the same binary implementation added. However, this implementation depends on the kernel relocation function, so the kernel relocation implementation and KASLR features are added to this series of patches. In order to be able to be used normally in machines compatible with the old interface specification, compatibility with the old interface specification has also been added. Manual command line test: kexec: $ sudo kexec -l vmlinuz --reuse-cmdline --initrd=initrd $ sudo kexec -e kdump: Add crashkernel=512M parameter in grub.cfg, $ sudo kexec -p vmlinuz --reuse-cmdline --initrd=initrd # echo c > /proc/sysrq-trigger kdump service mode test: kexec: $ sudo kexec -l vmlinuz --reuse-cmdline --initrd=initrd $ sudo kexec -e kdump: Add crashkernel=512M parameter in grub.cfg, $ sudo systemctl enable kdump $ sudo systemctl restart kdump # echo c > /proc/sysrq-trigger ``` Link:https://gitee.com/openeuler/kernel/pulls/766 Reviewed-by: Guo Dongtai <guodongtai@kylinos.cn> Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @svishen The patch sorted out the differences between the wol feature in the Linux mainline version and the openeuler and fix some bugfix issue: https://gitee.com/openeuler/kernel/issues/I72OPH Link:https://gitee.com/openeuler/kernel/pulls/758 Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
- 17 5月, 2023 8 次提交
-
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @nebula_matrix Add m1600-driver for nebula-matrix m1600 series smart NIC. M1600-NIC is a series of network interface card for the Data Center Area. The driver supports link-speed 10GbE. M1600 devices support SR-IOV.This driver is used for both of Physical Function(PF) and Virtual Function(VF). M1600 devices support MSI-X interrupt vector for each Tx/Rx queue and interrupt moderation. M1600 devices support also various offload features such as checksum offload, Receive-Side Scaling(RSS) Link:https://gitee.com/openeuler/kernel/pulls/570 Reviewed-by: Liu Chao <liuchao173@huawei.com> Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @did-you-collect-the-wool-today The ARMv8.7 WFxT feature is a new take on the good old WFI/WFE instructions as they behave the same way, only taking an extra timeout parameter. This small series aims at adding the minimal support for this feature, enabling it for both the kernel and KVM. Link:https://gitee.com/openeuler/kernel/pulls/629 Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 nebula_matrix 提交于
m1600-dirver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6RNK1 CVE: NA -------------------------------- The m1600 smart NIC is a series of network interface card for the Data Center Area. The m1600 network card supports checksum, sriov and other hardware offloading. Signed-off-by: NYi Chen <open@nebula-matrix.com>
-
由 Jijie Shao 提交于
mainlist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I72OPH CVE: NA Reference: https://patchwork.kernel.org/project/netdevbpf/patch/20230512100014.2522-5-lanhao@huawei.com/ ---------------------------------------------------------------------- The timeout of the cmdq reset command has been increased to resolve the reset timeout issue in the full VF scenario. The timeout of other cmdq commands remains unchanged. Fixes: 8d307f8e ("net: hns3: create new set of unified hclge_comm_cmd_send APIs") Signed-off-by: NJijie Shao <shaojijie@huawei.com> Signed-off-by: NHao Lan <lanhao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
-
由 Jie Wang 提交于
mainlist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I72OPH CVE: NA Reference: https://patchwork.kernel.org/project/netdevbpf/patch/20230512100014.2522-2-lanhao@huawei.com/ ---------------------------------------------------------------------- In function hns3_dump_tx_queue_info, The print buffer is not enough when the tx BD number is configured to 32760. As a result several BD information wouldn't be displayed. So fix it by increasing the tx queue print buffer length. Fixes: 630a6738 ("net: hns3: adjust string spaces of some parameters of tx bd info in debugfs") Signed-off-by: NJie Wang <wangjie125@huawei.com> Signed-off-by: NHao Lan <lanhao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @liaoyu15 Currently, only x86 architecture supports the CLOCKSOURCE_VALIDATE_LAST_CYCLE option. This option ensures that the timestamps returned by the clocksource are monotonically increasing, and helps avoid issues caused by hardware failures. This commit makes CLOCKSOURCE_VALIDATE_LAST_CYCLE configurable on the arm64 architecture, helps increase system stability and reliability. Link:https://gitee.com/openeuler/kernel/pulls/772 Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Reviewed-by: Wei Li <liwei391@huawei.com> Reviewed-by: Liu Chao <liuchao173@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 Yu Liao 提交于
openeuler inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7393E CVE: NA ------------------------------- The ARM ARM states the following (where a CPU is a device): The system counter must provide a uniform view of system time. More precisely, it must be impossible for the following sequence of events to show system time going backwards: 1) Device A reads the time from the system counter. 2) Device A communicates with another agent in the system, Device B. 3) After recognizing the communication from Device A, Device B reads the time from the system counter. So make CLOCKSOURCE_VALIDATE_LAST_CYCLE unset by default. Signed-off-by: NYu Liao <liaoyu15@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @sanglipeng Backport 5.10.151 LTS patches from upstream. Total patches: 5 Link:https://gitee.com/openeuler/kernel/pulls/768 Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
- 16 5月, 2023 26 次提交
-
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @Tom_zc Enabling bcache causes interface changes and needs to be rolled back。 Link:https://gitee.com/openeuler/kernel/pulls/771 Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 Yu Liao 提交于
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7393E CVE: NA ------------------------------- Currently, only x86 architecture supports the CLOCKSOURCE_VALIDATE_LAST_CYCLE option. This option ensures that the timestamps returned by the clocksource are monotonically increasing, and helps avoid issues caused by hardware failures. This commit makes CLOCKSOURCE_VALIDATE_LAST_CYCLE configurable on the arm64 architecture, helps increase system stability and reliability. Signed-off-by: NYu Liao <liaoyu15@huawei.com>
-
由 Tom_zc 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6N4EP CVE: NA -------------------------------- This reverts commit fc3bfef5. This commit causes the interface to change. Fixes: fc3bfef5 ("config: enable bcache for x86 by default") Signed-off-by: NChao Zhu <tom_toworld@163.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @Tom_zc To fix issue about https://gitee.com/openeuler/kernel/issues/I6N4EP?from=project-issue and test report is in here: https://gitee.com/Tom_zc/my_doc/blob/master/kernel%E7%A4%BE%E5%8C%BA/%E9%AA%8C%E8%AF%81openEuler%E7%BC%96%E8%AF%91%E6%94%AF%E6%8C%81bcache.md Link:https://gitee.com/openeuler/kernel/pulls/757 Reviewed-by: Liu Chao <liuchao173@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 7d26b051 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d26b0516a0df5888fd1486054bc5159f6c0b88f ------------------------------- Marginally optimise __delay() by using a WFIT/WFET sequence. It probably is a win if no interrupt fires during the delay. Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-11-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 9eae5885 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9eae588529751f95834bca775b30b66291def7f6 ------------------------------- Just like we have helpers for WFI and WFE, add the WFxT versions. Note that the encoding is that reported by objdump, as no currrent toolchain knows about these instructions yet. Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-10-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 69bb02eb category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=69bb02ebc38ace438c9cd7c5315cfe43862b51fe ------------------------------- In order to allow userspace to enjoy WFET, add a new HWCAP that advertises it when available. Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-9-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 06e0b802 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=06e0b802583d7bbc075476d90da995ee3e6053d5 ------------------------------- Plumb in the capability, and expose WFxT to guests when available. Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-8-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit a3fb5965 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a3fb59651449d8bd4dc4ed5413888819932c740b ------------------------------- For WFxT instructions used with very small delays, it is not unlikely that the deadline is already expired by the time we reach the WFx handling code. Check for this condition as soon as possible, and return to the guest immediately if we can. Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220419182755.601427-7-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 89f5074c category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=89f5074c503b6b6f181c0240c931f67bcaf266e9 ------------------------------- When trapping a blocking WFIT instruction, take it into account when computing the deadline of the background timer. The state is tracked with a new vcpu flag, and is gated by a new CPU capability, which isn't currently enabled. Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220419182755.601427-6-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit daf85a5f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=daf85a5f6be33788e18ff3efad1d7c3ad66a8cb3 ------------------------------- Refactor kvm_timer_compute_delta() and extract a helper that compute the delta (in ns) between a given timer and an arbitrary value. No functional change expected. Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220419182755.601427-5-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit b57de4ff category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b57de4ffd7c6d1247fdaef8437450ab7c1dd4ed0 ------------------------------- kvm_cpu_has_pending_timer() ends up checking all the possible timers for a wake-up cause. However, we already check for pending interrupts whenever we try to wake-up a vcpu, including the timer interrupts. Obviously, doing the same work twice is once too many. Reduce this helper to almost nothing, but keep it around, as we are going to make use of it soon. Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220419182755.601427-4-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit bdcc2f28 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdcc2f280334e4e3f42a5a740494444f1026fb65 ------------------------------- The ISS field exposed by ESR_ELx contain two additional subfields with FEAT_WFxT: - RN, the register number containing the timeout - RV, indicating if the register number is valid Describe these two fields according to the arch spec. No functional change. Reviewed-by: NJoey Gouly <joey.gouly@arm.com> Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-3-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Marc Zyngier 提交于
mainline inclusion from mainline-v5.19-rc1 commit 6a437208 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a437208cb942a2dd98f7e1c3fd347ed3d425ffc ------------------------------ Starting with FEAT_WFXT in ARMv8.7, the TI field in the ISS that is reported on a WFx trap is expanded by one bit to allow the description of WFET and WFIT. Special care is taken to exclude the WFxT bit from the mask used to match WFI so that it also matches WFIT when trapped from EL0. Reviewed-by: NJoey Gouly <joey.gouly@arm.com> Signed-off-by: NMarc Zyngier <maz@kernel.org> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220419182755.601427-2-maz@kernel.orgSigned-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
-
由 Chao Zhu 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6N4EP CVE: NA -------------------------------- openEuler supports bcache by default on x86 platforms Signed-off-by: NChao Zhu <tom_toworld@163.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @xiao_jiang_shui https://gitee.com/openeuler/kernel/issues/I6VW8E Link:https://gitee.com/openeuler/kernel/pulls/634 Reviewed-by: Yang Shen <shenyang39@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @gesefudiao The higher version community DAMON features in rounds: Removed the debugfs interface and enabled the sysfs interface. Added the lru_sort module to achieve proactive adjustment of the system-level LRU list for physical address monitoring. Support for online automation adjustment of DAMON strategies. Link:https://gitee.com/openeuler/kernel/pulls/763 Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
stable inclusion from stable-v5.10.151 commit ecad3312111798d84dac1ce6a853e0ac9de8d505 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64L0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ecad3312111798d84dac1ce6a853e0ac9de8d505 -------------------------------- New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag, which is not supported by stable kernel. As a result the kernel with CONFIG_DEBUG_INFO_BTF option will fail to compile with following error: BTFIDS vmlinux FAILED: load BTF from vmlinux: Invalid argument New pahole provides --skip_encoding_btf_enum64 option to skip BTF_KIND_ENUM64 generation and produce BTF supported by stable kernel. Adding this option to scripts/pahole-flags.sh. This change does not have equivalent commit in linus tree, because linus tree has support for BTF_KIND_ENUM64 tag, so it does not need to be disabled. Signed-off-by: NMartin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: NJiri Olsa <jolsa@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
由 Jiri Olsa 提交于
stable inclusion from stable-v5.10.151 commit c5006abb80e276896ff7237300a6d447708c7924 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64L0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c5006abb80e276896ff7237300a6d447708c7924 -------------------------------- commit 9741e07e upstream. [skipped --btf_gen_floats option in pahole-flags.sh, skipped Makefile.modfinal change, because there's no BTF kmod support, squashing in 'exit 0' change from merge commit fc02cb2b] Using new PAHOLE_FLAGS variable to pass extra arguments to pahole for both vmlinux and modules BTF data generation. Adding new scripts/pahole-flags.sh script that detect and prints pahole options. [ fixed issues found by kernel test robot ] Signed-off-by: NJiri Olsa <jolsa@kernel.org> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211029125729.70002-1-jolsa@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
由 Andrii Nakryiko 提交于
stable inclusion from stable-v5.10.151 commit f5f413cb3e8af235c5d310bea9942424fb242c2c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64L0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f5f413cb3e8af235c5d310bea9942424fb242c2c -------------------------------- commit a0b8200d upstream. [small context changes due to missing floats support in 5.10] Commit "mm/page_alloc: convert per-cpu list protection to local_lock" will introduce a zero-sized per-CPU variable, which causes pahole to generate invalid BTF. Only pahole versions 1.18 through 1.21 are impacted, as before 1.18 pahole doesn't know anything about per-CPU variables, and 1.22 contains the proper fix for the issue. Luckily, pahole 1.18 got --skip_encoding_btf_vars option disabling BTF generation for per-CPU variables in anticipation of some unanticipated problems. So use this escape hatch to disable per-CPU var BTF info on those problematic pahole versions. Users relying on availability of per-CPU var BTFs would need to upgrade to pahole 1.22+, but everyone won't notice any regressions. Link: https://lkml.kernel.org/r/20210530002536.3193829-1-andrii@kernel.orgSigned-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NMel Gorman <mgorman@techsingularity.net> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Hao Luo <haoluo@google.com> Cc: Michal Suchanek <msuchanek@suse.de> Cc: Jiri Olsa <jolsa@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJiri Olsa <jolsa@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
由 Javier Martinez Canillas 提交于
stable inclusion from stable-v5.10.151 commit 06481cd9f7f692088bce03244f8cf132018f2fc6 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64L0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=06481cd9f7f692088bce03244f8cf132018f2fc6 -------------------------------- commit ff2e6efd upstream. [backported for dependency, skipped Makefile.modfinal change, because module BTF is not supported in 5.10] The ccache tool can be used to speed up cross-compilation, by calling the compiler and binutils through ccache. For example, following should work: $ export ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" $ make M=drivers/gpu/drm/rockchip/ but pahole fails to extract the BTF info from DWARF, breaking the build: CC [M] drivers/gpu/drm/rockchip//rockchipdrm.mod.o LD [M] drivers/gpu/drm/rockchip//rockchipdrm.ko BTF [M] drivers/gpu/drm/rockchip//rockchipdrm.ko aarch64-linux-gnu-objcopy: invalid option -- 'J' Usage: aarch64-linux-gnu-objcopy [option(s)] in-file [out-file] Copies a binary file, possibly transforming it in the process ... make[1]: *** [scripts/Makefile.modpost:156: __modpost] Error 2 make: *** [Makefile:1866: modules] Error 2 this fails because OBJCOPY is set to "ccache aarch64-linux-gnu-copy" and later pahole is executed with the following command line: LLVM_OBJCOPY=$(OBJCOPY) $(PAHOLE) -J --btf_base vmlinux $@ which gets expanded to: LLVM_OBJCOPY=ccache aarch64-linux-gnu-objcopy pahole -J ... instead of: LLVM_OBJCOPY="ccache aarch64-linux-gnu-objcopy" pahole -J ... Fixes: 5f9ae91f ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/bpf/20210526215228.3729875-1-javierm@redhat.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
由 Ilya Leoshkevich 提交于
stable inclusion from stable-v5.10.151 commit bbaea0f1cd33d702d053d5bdaf6d6dec3932894c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64L0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bbaea0f1cd33d702d053d5bdaf6d6dec3932894c -------------------------------- commit db16c1fe upstream. [backported for dependency only extra_paholeopt variable setup and usage, we don't want floats generated in 5.10] pahole v1.21 supports the --btf_gen_floats flag, which makes it generate the information about the floating-point types [1]. Adjust link-vmlinux.sh to pass this flag to pahole in case it's supported, which is determined using a simple version check. [1] https://lore.kernel.org/dwarves/YHRiXNX1JUF2Az0A@kernel.org/Signed-off-by: NIlya Leoshkevich <iii@linux.ibm.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210413190043.21918-1-iii@linux.ibm.comSigned-off-by: NJiri Olsa <jolsa@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @jiayingbao intel_idle: add Emerald Rapids Xeon support commit 74528edf upstream. Emerald Rapids (EMR) is the next Intel Xeon processor after Sapphire Rapids (SPR). EMR C-states are the same as SPR C-states, and we expect that EMR C-state characteristics (latency and target residency) will be the same as in SPR. Therefore, add EMR support by using SPR C-states table. no change from upstream patch. driver can be initial successfully as SPR. PR dependency: https://gitee.com/openeuler/kernel/pulls/469 Link:https://gitee.com/openeuler/kernel/pulls/749 Reviewed-by: Aichun Shi <aichun.shi@intel.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @jiayingbao backport from upstream commit 9c252ecf Make Intel uncore frequency driver support Emerald Rapids by adding its CPU model to the match table. Emerald Rapids uncore frequency control is the same as in Sapphire Rapids. no change from upstream patch. driver can be initial successfully as SPR. PR dependency: https://gitee.com/openeuler/kernel/pulls/469 Link:https://gitee.com/openeuler/kernel/pulls/748 Reviewed-by: Jason Zeng <jason.zeng@intel.com> Reviewed-by: Aichun Shi <aichun.shi@intel.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @youquan_song [Description] SPR: EDAC driver enhance for driver decode and 2LM Current i10nm_edac only supports firmware decoder (ACPI DSM methods) for Sapphire Rapids. So add the driver decoder(decoding DDR memory errors via extracting error information from the IMC MC error codes) for Sapphire Rapids for better decoding performance. Enhance the SPR HBM EDAC driver to decode errors from the 1st level memory (the fast "near" memory as cache) of the 2-level memory system. It will be valuable to avoid SMI triggered to call firware decoder, especially when CE (Correctable Error) triggered frequently on DDR memory. 6e8746cb EDAC/skx_common: Enable EDAC support for the "near" memory. 221aa03f EDAC/i10nm: Add driver decoder for Sapphire Rapids server. [Testing] download: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/ras-tools.git # echo 1 > /sys/module/i10nm_edac/parameters/decoding_via_mca # modprobe einj # cd /home/ras-tools/ # ./cmcistorm 1 0: vaddr = 0x117b490 paddr = 4884ef490 # dmesg and check the address was decoded. Link:https://gitee.com/openeuler/kernel/pulls/742 Reviewed-by: Jason Zeng <jason.zeng@intel.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-
由 openeuler-ci-bot 提交于
Merge Pull Request from: @yunyingsun Title: Add PMU support for Intel Emerald Rapids Content: This PR adds Performance Monitoring Unit(PMU) support for next Intel Xeon platform Emerald Rapids. Totally 6 commits, including 4 EMR PMU enabling patches from v6.2 and 2 dependent patches from v5.14/v5.18: (v6.2-rc6) 5a8a05f1 perf/x86/intel/cstate: Add Emerald Rapids (v5.18-rc4) 528c9f1d perf/x86/cstate: Add SAPPHIRERAPIDS_X CPU support (v5.14-rc1) 87bf399f perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support (v6.2-rc6) 6795e558 perf/x86/intel: Add Emerald Rapids (v6.2-rc4) 5268a284 perf/x86/intel/uncore: Add Emerald Rapids (v6.2-rc4) 69ced416 perf/x86/msr: Add Emerald Rapids The four 6.2 patches above use a macro "INTEL_FAM6_EMERALDRAPIDS_X", which is introduced by: (v6.1-rc1) 7beade0d x86/cpu: Add several Intel server CPU model numbers This patch is already included in another PR: https://gitee.com/openeuler/kernel/pulls/469 Note: this PR for PMU must be merged AFTER PR-469, otherwise there will be kernel compiling error complaining for missing definition of macro "INTEL_FAM6_EMERALDRAPIDS_X". Intel-kernel issue: https://gitee.com/openeuler/intel-kernel/issues/I6YO4Z Test: 1. platform dependent core PMU event works with perf, like "L1-dcache-loads". 2. platform dependent uncore PMU event works with perf, like "uncore_imc_0/event=0x1/". 3. offcore event works with perf. 3. PEBS works with perf. 4. topdown works with perf. With this PR(along with the patch from PR469) applied to kernel OLK-5.10, all tests above PASS on EMR. Known issue: N/A Default config change: N/A Link:https://gitee.com/openeuler/kernel/pulls/622 Reviewed-by: Jason Zeng <jason.zeng@intel.com> Reviewed-by: Aichun Shi <aichun.shi@intel.com> Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
-