Re: [PATCH v13 4/5] arm64: support copy_mc_[user]_highpage()

2025-02-17 Thread Tong Tiangen
在 2025/2/15 1:24, Catalin Marinas 写道: On Fri, Feb 14, 2025 at 10:49:01AM +0800, Tong Tiangen wrote: 在 2025/2/13 1:11, Catalin Marinas 写道: On Mon, Dec 09, 2024 at 10:42:56AM +0800, Tong Tiangen wrote: Currently, many scenarios that can tolerate memory errors when copying page have been suppo

[PATCH v6 0/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO API

2025-02-17 Thread Dmitry V. Levin
PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements PTRACE_GET_SYSCALL_INFO by letting the ptracer modify details of system calls the tracee is blocked in. This API allows ptracers to obtain and modify system call details in a straightforward and architecture-agnostic way, providing a

[RFC PATCH v2 3/3] s390/topology: Add initial implementation for selection of parked CPUs

2025-02-17 Thread Tobias Huschle
At first, vertical low CPUs will be parked generally. This will later be adjusted by making the parked state dependent on the overall utilization on the underlying hypervisor. Vertical lows are always bound to the highest CPU IDs. This implies that the three types of vertically polarized CPUs are

[RFC PATCH v2 1/3] sched/fair: introduce new scheduler group type group_parked

2025-02-17 Thread Tobias Huschle
A parked CPU is considered to be flagged as unsuitable to process workload at the moment, but might be become usable anytime. Depending on the necessity for additional computation power and/or available capacity of the underlying hardware. A scheduler group is considered to be parked, if there are

[RFC PATCH v2 2/3] sched/fair: adapt scheduler group weight and capacity for parked CPUs

2025-02-17 Thread Tobias Huschle
Parked CPUs should not be considered to be available for computation. This implies, that they should also not contribute to the overall weight of scheduler groups, as a large group of parked CPUs should not attempt to process any tasks, hence, a small group of non-parked CPUs should be considered t

[RFC PATCH v2 0/3] sched/fair: introduce new scheduler group type group_parked

2025-02-17 Thread Tobias Huschle
Changes to v1 parked vs idle - parked CPUs are now never considered to be idle - a scheduler group is now considered parked iff there are parked CPUs and there are no idle CPUs, i.e. all non parked CPUs are busy or there are only parked CPUs. A scheduler group with parked tasks can be consi

[GIT PULL] Please pull powerpc/linux.git powerpc-6.14-3 tag

2025-02-17 Thread Madhavan Srinivasan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull couple of powerpc fixes for 6.14: The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3: Linux 6.14-rc2 (2025-02-09 12:45:03 -0800) are available in the git repository at: https://git.kernel.org/pu

Re: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern

2025-02-17 Thread J . Neuschäfer
On Mon, Feb 17, 2025 at 10:31:08AM +0100, Miquel Raynal wrote: > Hello, > > >> > In some scenarios, such as under the Freescale eLBC bus, there are raw > >> > NAND chips with a unit address that has a comma in it (cs,offset). > >> > Relax the $nodename pattern in raw-nand-chip.yaml to allow such u

Re: [PATCH v2 12/12] dt-bindings: mtd: raw-nand-chip: Relax node name pattern

2025-02-17 Thread Miquel Raynal
Hello, >> > In some scenarios, such as under the Freescale eLBC bus, there are raw >> > NAND chips with a unit address that has a comma in it (cs,offset). >> > Relax the $nodename pattern in raw-nand-chip.yaml to allow such unit >> > addresses. >> >> This is super specific to this controller, I'd

[PATCH v6 2/6] syscall.h: add syscall_set_arguments()

2025-02-17 Thread Dmitry V. Levin
This function is going to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. This partially reverts commit 7962c2eddbfe ("arch: remove unused function syscall_set_arguments()") by reusing some of old syscall_set_arguments() implementations. Signed-off-by:

[PATCH v6 3/6] syscall.h: introduce syscall_set_nr()

2025-02-17 Thread Dmitry V. Levin
Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. S

Re: [kvm-unit-tests PATCH v2 03/18] scripts: Refuse to run the tests if not configured for qemu

2025-02-17 Thread Al Dunsmuir
Hello Alexandru, On Monday, February 10, 2025, 1:04:29 PM, you wrote: > Hi Drew, > On Mon, Feb 10, 2025 at 02:56:25PM +0100, Andrew Jones wrote: >> On Mon, Feb 10, 2025 at 10:41:53AM +, Alexandru Elisei wrote: >> > Hi Drew, >> > >> > On Tue, Jan 21, 2025 at 03:48:55PM +0100, Andrew Jones wr

Re: [PATCH v13 4/5] arm64: support copy_mc_[user]_highpage()

2025-02-17 Thread Catalin Marinas
On Mon, Feb 17, 2025 at 04:07:49PM +0800, Tong Tiangen wrote: > 在 2025/2/15 1:24, Catalin Marinas 写道: > > On Fri, Feb 14, 2025 at 10:49:01AM +0800, Tong Tiangen wrote: > > > 在 2025/2/13 1:11, Catalin Marinas 写道: > > > > On Mon, Dec 09, 2024 at 10:42:56AM +0800, Tong Tiangen wrote: > > > > > Current

[PATCH 5/7] clk: mvebu: Embed syscore_ops in clock context

2025-02-17 Thread Thierry Reding
From: Thierry Reding This enables the syscore callbacks to obtain the clock context without relying on a separate global variable. Signed-off-by: Thierry Reding --- drivers/clk/mvebu/common.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/clk

[PATCH 1/7] syscore: Pass context data to callbacks

2025-02-17 Thread Thierry Reding
From: Thierry Reding Pass a pointer to the syscore_ops structure that was registered to the callbacks. This enables callbacks to act on instance data (syscore_ops can be embedded into other structures, and driver-specific data can be obtained using container_of()) rather than the current practice

[PATCH 0/7] syscore: Pass context data to callbacks

2025-02-17 Thread Thierry Reding
From: Thierry Reding Hi, Something that's been bugging me over the years is how some drivers have had to adopt file-scoped variables to pass data into something like the syscore operations. This is often harmless, but usually leads to drivers not being able to deal with multiple instances, or ad

[PATCH 4/7] clk: ingenic: tcu: Embed syscore_ops in TCU context

2025-02-17 Thread Thierry Reding
From: Thierry Reding This enables the syscore callbacks to obtain the TCU context without relying on a separate global variable. Signed-off-by: Thierry Reding --- drivers/clk/ingenic/tcu.c | 54 ++- 1 file changed, 25 insertions(+), 29 deletions(-) diff --g

[PATCH 6/7] irqchip/irq-imx-gpcv2: Embed syscore_ops in chip context

2025-02-17 Thread Thierry Reding
From: Thierry Reding This enables the syscore callbacks to obtain the IRQ chip context without relying on a separate global variable. Signed-off-by: Thierry Reding --- drivers/irqchip/irq-imx-gpcv2.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --

[PATCH 3/7] bus: mvebu-mbus: Embed syscore_ops in mbus context

2025-02-17 Thread Thierry Reding
From: Thierry Reding This enables the syscore callbacks to obtain the mbus context without relying on a separate global variable. Signed-off-by: Thierry Reding --- drivers/bus/mvebu-mbus.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/bus/mve

[PATCH RESEND] powerpc: Fix compiler warning by guarding with '__powerpc64__'

2025-02-17 Thread Yu-Chun Lin
As reported by the kernel test robot, the following error occurs: arch/powerpc/lib/sstep.c: In function 'analyse_instr': >> arch/powerpc/lib/sstep.c:1172:28: warning: variable 'suffix' set but not >> used [-Wunused-but-set-variable] 1172 | unsigned int word, suffix; |

[PATCH 2/7] MIPS: Embed syscore_ops in PCI context

2025-02-17 Thread Thierry Reding
From: Thierry Reding This enables the syscore callbacks to obtain the PCI context without relying on a separate global variable. Signed-off-by: Thierry Reding --- arch/mips/pci/pci-alchemy.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/mip

[PATCH 7/7] soc/tegra: pmc: Derive PMC context from syscore ops

2025-02-17 Thread Thierry Reding
From: Thierry Reding Rather than relying on a global variable, make use of the fact that the syscore ops are embedded in the PMC context and can be obtained via container_of(). Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driv

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.14-3 tag

2025-02-17 Thread pr-tracker-bot
The pull request you sent on Mon, 17 Feb 2025 15:40:00 +0530: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-6.14-3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6186bdd120eccf4ca44fcba8967fc59ea50b11b8 Thank you! -- Deet-doot-d

[PATCH v8 00/20] fs/dax: Fix ZONE_DEVICE page reference counts

2025-02-17 Thread Alistair Popple
Main updates since v6: - Clean ups and fixes based on feedback from David and Dan. - Rebased from next-20241216 to v6.14-rc1. No conflicts. - Dropped the PTE bit removals and clean-ups - will post this as a separate series to be merged after this one as Dan wanted it split up more and t

[PATCH v8 01/20] fuse: Fix dax truncate/punch_hole fault path

2025-02-17 Thread Alistair Popple
FS DAX requires file systems to call into the DAX layout prior to unlinking inodes to ensure there is no ongoing DMA or other remote access to the direct mapped page. The fuse file system implements fuse_dax_break_layouts() to do this which includes a comment indicating that passing dmap_end == 0 l

[PATCH v8 02/20] fs/dax: Return unmapped busy pages from dax_layout_busy_page_range()

2025-02-17 Thread Alistair Popple
dax_layout_busy_page_range() is used by file systems to scan the DAX page-cache to unmap mapping pages from user-space and to determine if any pages in the given range are busy, either due to ongoing DMA or other get_user_pages() usage. Currently it checks to see the file mapping is mapped into us

[PATCH 1/1] powerpc: use __clang__ instead of CONFIG_CC_IS_CLANG

2025-02-17 Thread Shung-Hsi Yu
Due to include chain (below), powerpc's asm-compat.h is part of UAPI, thus it should use the __clang__ macro to directly detect whether Clang is used rather then relying on the kernel config setting. The later is unreliable because the userspace tools that uses UAPI may be compile with a different

[PATCH v8 08/20] fs/dax: Remove PAGE_MAPPING_DAX_SHARED mapping flag

2025-02-17 Thread Alistair Popple
The page ->mapping pointer can have magic values like PAGE_MAPPING_DAX_SHARED and PAGE_MAPPING_ANON for page owner specific usage. Currently PAGE_MAPPING_DAX_SHARED and PAGE_MAPPING_ANON alias to the same value. This isn't a problem because FS DAX pages are never seen by the anonymous mapping code

[PATCH v8 09/20] mm/gup: Remove redundant check for PCI P2PDMA page

2025-02-17 Thread Alistair Popple
PCI P2PDMA pages are not mapped with pXX_devmap PTEs therefore the check in __gup_device_huge() is redundant. Remove it Signed-off-by: Alistair Popple Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Wiliams Acked-by: David Hildenbrand --- mm/gup.c | 5 - 1 file changed, 5 deletions(-) diff

Re: [RFC PATCH v2 0/3] sched/fair: introduce new scheduler group type group_parked

2025-02-17 Thread Shrikanth Hegde
On 2/17/25 17:02, Tobias Huschle wrote: Changes to v1 parked vs idle - parked CPUs are now never considered to be idle - a scheduler group is now considered parked iff there are parked CPUs and there are no idle CPUs, i.e. all non parked CPUs are busy or there are only parked CPUs. A sc

Re: [RFC PATCH v2 1/3] sched/fair: introduce new scheduler group type group_parked

2025-02-17 Thread Shrikanth Hegde
Hi Tobias. On 2/17/25 17:02, Tobias Huschle wrote: A parked CPU is considered to be flagged as unsuitable to process workload at the moment, but might be become usable anytime. Depending on the necessity for additional computation power and/or available capacity of the underlying hardware. A sc

Re: [PATCH 1/1] powerpc: use __clang__ instead of CONFIG_CC_IS_CLANG

2025-02-17 Thread Michal Suchánek
Hello, how does this happen? On Tue, Feb 18, 2025 at 12:48:01PM +0800, Shung-Hsi Yu wrote: > Due to include chain (below), powerpc's asm-compat.h is part of UAPI, > thus it should use the __clang__ macro to directly detect whether Clang > is used rather then relying on the kernel config setting.

Re: [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid

2025-02-17 Thread Athira Rajeev
> On 13 Feb 2025, at 9:04 AM, Namhyung Kim wrote: > > On Thu, Feb 13, 2025 at 12:24:38AM +0530, Athira Rajeev wrote: >> "Tool PMU" tests fails on powerpc as below: >> >> 12.1: Parsing without PMU name: >> --- start --- >> test child forked, pid 48492 >> Using CPUID 0x00800200 >> Atte

Re: [PATCH] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-17 Thread James Clark
On 12/02/2025 1:19 pm, Athira Rajeev wrote: Perf probe on vfs_fstatat fails as below on a powerpc system ./perf probe -nf --max-probes=512 -a 'vfs_fstatat $params' Segmentation fault (core dumped) This is observed while running perftool-testsuite_probe testcase. While running with verbose,

[PATCH v8 05/20] fs/dax: Create a common implementation to break DAX layouts

2025-02-17 Thread Alistair Popple
Prior to freeing a block file systems supporting FS DAX must check that the associated pages are both unmapped from user-space and not undergoing DMA or other access from eg. get_user_pages(). This is achieved by unmapping the file range and scanning the FS DAX page-cache to see if any pages within

[PATCH v8 19/20] fs/dax: Properly refcount fs dax pages

2025-02-17 Thread Alistair Popple
Currently fs dax pages are considered free when the refcount drops to one and their refcounts are not increased when mapped via PTEs or decreased when unmapped. This requires special logic in mm paths to detect that these pages should not be properly refcounted, and to detect when the refcount drop

[PATCH v8 14/20] mm/rmap: Add support for PUD sized mappings to rmap

2025-02-17 Thread Alistair Popple
The rmap doesn't currently support adding a PUD mapping of a folio. This patch adds support for entire PUD mappings of folios, primarily to allow for more standard refcounting of device DAX folios. Currently DAX is the only user of this and it doesn't require support for partially mapped PUD-sized

[PATCH v8 06/20] fs/dax: Always remove DAX page-cache entries when breaking layouts

2025-02-17 Thread Alistair Popple
Prior to any truncation operations file systems call dax_break_mapping() to ensure pages in the range are not under going DMA. Later DAX page-cache entries will be removed by truncate_folio_batch_exceptionals() in the generic page-cache code. However this makes it possible for folios to be removed

[PATCH v8 03/20] fs/dax: Don't skip locked entries when scanning entries

2025-02-17 Thread Alistair Popple
Several functions internal to FS DAX use the following pattern when trying to obtain an unlocked entry: xas_for_each(&xas, entry, end_idx) { if (dax_is_locked(entry)) entry = get_unlocked_entry(&xas, 0); This is problematic because get_unlocked_entry() will get the next pr

[PATCH v8 07/20] fs/dax: Ensure all pages are idle prior to filesystem unmount

2025-02-17 Thread Alistair Popple
File systems call dax_break_mapping() prior to reallocating file system blocks to ensure the page is not undergoing any DMA or other accesses. Generally this is needed when a file is truncated to ensure that if a block is reallocated nothing is writing to it. However filesystems currently don't cal

[PATCH v8 04/20] fs/dax: Refactor wait for dax idle page

2025-02-17 Thread Alistair Popple
A FS DAX page is considered idle when its refcount drops to one. This is currently open-coded in all file systems supporting FS DAX. Move the idle detection to a common function to make future changes easier. Signed-off-by: Alistair Popple Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Re

[PATCH v8 12/20] mm/memory: Enhance insert_page_into_pte_locked() to create writable mappings

2025-02-17 Thread Alistair Popple
In preparation for using insert_page() for DAX, enhance insert_page_into_pte_locked() to handle establishing writable mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a PTE which bypasses the typical set_pte_range() in finish_fault. Signed-off-by: Alistair Popple Suggested-by:

[PATCH v8 11/20] mm: Allow compound zone device pages

2025-02-17 Thread Alistair Popple
Zone device pages are used to represent various type of device memory managed by device drivers. Currently compound zone device pages are not supported. This is because MEMORY_DEVICE_FS_DAX pages are the only user of higher order zone device pages and have their own page reference counting. A futu

[PATCH v8 15/20] mm/huge_memory: Add vmf_insert_folio_pud()

2025-02-17 Thread Alistair Popple
Currently DAX folio/page reference counts are managed differently to normal pages. To allow these to be managed the same as normal pages introduce vmf_insert_folio_pud. This will map the entire PUD-sized folio and take references as it would for a normally mapped page. This is distinct from the cu

[PATCH v8 10/20] mm/mm_init: Move p2pdma page refcount initialisation to p2pdma

2025-02-17 Thread Alistair Popple
Currently ZONE_DEVICE page reference counts are initialised by core memory management code in __init_zone_device_page() as part of the memremap() call which driver modules make to obtain ZONE_DEVICE pages. This initialises page refcounts to 1 before returning them to the driver. This was presumabl

[PATCH v8 16/20] mm/huge_memory: Add vmf_insert_folio_pmd()

2025-02-17 Thread Alistair Popple
Currently DAX folio/page reference counts are managed differently to normal pages. To allow these to be managed the same as normal pages introduce vmf_insert_folio_pmd. This will map the entire PMD-sized folio and take references as it would for a normally mapped page. This is distinct from the cu

[PATCH v8 18/20] dcssblk: Mark DAX broken, remove FS_DAX_LIMITED support

2025-02-17 Thread Alistair Popple
From: Dan Williams The dcssblk driver has long needed special case supoprt to enable limited dax operation, so called CONFIG_FS_DAX_LIMITED. This mode works around the incomplete support for ZONE_DEVICE on s390 by forgoing the ability of dax-mapped pages to support GUP. Now, pending cleanups to

[PATCH v8 13/20] mm/memory: Add vmf_insert_page_mkwrite()

2025-02-17 Thread Alistair Popple
Currently to map a DAX page the DAX driver calls vmf_insert_pfn. This creates a special devmap PTE entry for the pfn but does not take a reference on the underlying struct page for the mapping. This is because DAX page refcounts are treated specially, as indicated by the presence of a devmap entry.

[PATCH v8 17/20] mm/gup: Don't allow FOLL_LONGTERM pinning of FS DAX pages

2025-02-17 Thread Alistair Popple
Longterm pinning of FS DAX pages should already be disallowed by various pXX_devmap checks. However a future change will cause these checks to be invalid for FS DAX pages so make folio_is_longterm_pinnable() return false for FS DAX pages. Signed-off-by: Alistair Popple Reviewed-by: John Hubbard

[PATCH v8 20/20] device/dax: Properly refcount device dax pages when mapping

2025-02-17 Thread Alistair Popple
Device DAX pages are currently not reference counted when mapped, instead relying on the devmap PTE bit to ensure mapping code will not get/put references. This requires special handling in various page table walkers, particularly GUP, to manage references on the underlying pgmap to ensure the page

Re: [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid

2025-02-17 Thread Athira Rajeev
> On 13 Feb 2025, at 9:04 AM, Namhyung Kim wrote: > > On Thu, Feb 13, 2025 at 12:24:38AM +0530, Athira Rajeev wrote: >> "Tool PMU" tests fails on powerpc as below: >> >> 12.1: Parsing without PMU name: >> --- start --- >> test child forked, pid 48492 >> Using CPUID 0x00800200 >> Att

Re: [RESEND v4 0/3] mm/pkey: Add PKEY_UNRESTRICTED macro

2025-02-17 Thread Catalin Marinas
On Mon, 13 Jan 2025 17:06:16 +, Yury Khrustalev wrote: > Add PKEY_UNRESTRICTED macro to mman.h and use it in selftests. > > For context, this change will also allow for more consistent update of the > Glibc manual which in turn will help with introducing memory protection > keys on AArch64 tar

Re: panic in cpufreq_online() in 6.14-rc1 on PowerNV

2025-02-17 Thread Nicholas Piggin
On Thu Feb 6, 2025 at 6:41 PM AEST, Dan Horák wrote: > Hi, > > I am getting a kernel panic on my Raptor Talos Power9 system after > updating to the 6.14-rc1 kernel from 6.13. Seems reproducable every > time, but I haven't start bisecting yet. Does it sound familiar to > anyone? No, but it's possib

Re: [PATCH v7 16/20] huge_memory: Add vmf_insert_folio_pmd()

2025-02-17 Thread David Hildenbrand
On 17.02.25 05:29, Alistair Popple wrote: On Mon, Feb 10, 2025 at 07:45:09PM +0100, David Hildenbrand wrote: On 04.02.25 23:48, Alistair Popple wrote: Currently DAX folio/page reference counts are managed differently to normal pages. To allow these to be managed the same as normal pages introdu