Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests

2025-02-18 Thread Bastien Curutchet
Hi, On 2/19/25 4:40 AM, Alexei Starovoitov wrote: On Tue, Feb 18, 2025 at 1:22 PM Stanislav Fomichev wrote: On 02/17, Bastien Curutchet (eBPF Foundation) wrote: Hi all, Both tc_links.c and tc_opts.c do their tests on the loopback interface. It prevents from parallelizing their executions.

[PATCH] selftests: sched: add sched as a default selftest target

2025-02-18 Thread Sinadin Shan
The sched tests are missing a target entry and hence out-of-tree build support. For instance: make -C tools/testing/selftests install INSTALL_LOCATION=/foo/bar is expected to build the sched tests and place them at /foo/bar. But this is not observed since a TARGET entry is not present for sched.

[PATCH RFC v2 12/12] mm/memremap: Remove unused devmap_managed_key

2025-02-18 Thread Alistair Popple
It's no longer used so remove it. Signed-off-by: Alistair Popple --- mm/memremap.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index d875534..e40672b 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -38,30 +38,6 @@ unsigned long

[PATCH RFC v2 07/12] mm: Remove redundant pXd_devmap calls

2025-02-18 Thread Alistair Popple
DAX was the only thing that created pmd_devmap and pud_devmap entries however it no longer does as DAX pages are now refcounted normally and pXd_trans_huge() returns true for those. Therefore checking both pXd_devmap and pXd_trans_huge() is redundant and the former can be removed without changing b

[PATCH RFC v2 05/12] mm: Remove remaining uses of PFN_DEV

2025-02-18 Thread Alistair Popple
PFN_DEV was used by callers of dax_direct_access() to figure out if the returned PFN is associated with a page using pfn_t_has_page() or not. However all DAX PFNs now require an assoicated ZONE_DEVICE page so can assume a page exists. Other users of PFN_DEV were setting it before calling vmf_inser

[PATCH RFC v2 10/12] mm: Remove devmap related functions and page table bits

2025-02-18 Thread Alistair Popple
Now that DAX and all other reference counts to ZONE_DEVICE pages are managed normally there is no need for the special devmap PTE/PMD/PUD page table bits. So drop all references to these, freeing up a software defined page table bit on architectures supporting it. Signed-off-by: Alistair Popple A

[PATCH RFC v2 11/12] mm: Remove callers of pfn_t functionality

2025-02-18 Thread Alistair Popple
All PFN_* pfn_t flags have been removed. Therefore there is no longer a need for the pfn_t type and all uses can be replaced with normal pfns. Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig --- arch/x86/mm/pat/memtype.c| 6 +- drivers/dax/device.c

[PATCH RFC v2 09/12] powerpc: Remove checks for devmap pages and PMDs/PUDs

2025-02-18 Thread Alistair Popple
PFN_DEV no longer exists. This means no devmap PMDs or PUDs will be created, so checking for them is redundant. Instead mappings of pages that would have previously returned true for pXd_devmap() will return true for pXd_trans_huge() Signed-off-by: Alistair Popple --- arch/powerpc/mm/book3s64/ha

[PATCH RFC v2 08/12] mm/khugepaged: Remove redundant pmd_devmap() check

2025-02-18 Thread Alistair Popple
The only users of pmd_devmap were device dax and fs dax. The check for pmd_devmap() in check_pmd_state() is therefore redundant as callers explicitly check for is_zone_device_page(), so this check can be dropped. Signed-off-by: Alistair Popple --- mm/khugepaged.c | 2 -- 1 file changed, 2 deleti

[PATCH RFC v2 06/12] mm/gup: Remove pXX_devmap usage from get_user_pages()

2025-02-18 Thread Alistair Popple
GUP uses pXX_devmap() calls to see if it needs to a get a reference on the associated pgmap data structure to ensure the pages won't go away. However it's a driver responsibility to ensure that if pages are mapped (ie. discoverable by GUP) that they are not offlined or removed from the memmap so th

[PATCH RFC v2 04/12] mm: Convert vmf_insert_mixed() from using pte_devmap to pte_special

2025-02-18 Thread Alistair Popple
DAX no longer requires device PTEs as it always has a ZONE_DEVICE page associated with the PTE that can be reference counted normally. Other users of pte_devmap are drivers that set PFN_DEV when calling vmf_insert_mixed() which ensures vm_normal_page() returns NULL for these entries. There is no r

[PATCH RFC v2 03/12] mm/pagewalk: Skip dax pages in pagewalk

2025-02-18 Thread Alistair Popple
Previously dax pages were skipped by the pagewalk code as pud_special() or vm_normal_page{_pmd}() would be false for DAX pages. Now that dax pages are refcounted normally that is no longer the case, so add explicit checks to skip them. Signed-off-by: Alistair Popple --- include/linux/memremap.h

[PATCH RFC v2 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-02-18 Thread Alistair Popple
The PFN_MAP flag is no longer used for anything, so remove it. The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also remove them. Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig --- include/linux/pfn_t.h | 31 +++ mm/

[PATCH RFC v2 00/12] mm: Remove pXX_devmap page table bit and pfn_t type

2025-02-18 Thread Alistair Popple
Changes for v2: - This is an update to my previous RFC[1] removing just pfn_t rebased on today's mm-unstable which includes my ZONE_DEVICE refcounting clean-up. - The removal of the devmap PTE bit and associated infrastructure was dropped from that series so I have rolled it into this

[PATCH RFC v2 02/12] mm: Convert pXd_devmap checks to vma_is_dax

2025-02-18 Thread Alistair Popple
Currently dax is the only user of pmd and pud mapped ZONE_DEVICE pages. Therefore page walkers that want to exclude DAX pages can check pmd_devmap or pud_devmap. However soon dax will no longer set PFN_DEV, meaning dax pages are mapped as normal pages. Ensure page walkers that currently use pXd_de

[PATCH] selftests: firmware: Improve readability in fallback mechanism message

2025-02-18 Thread Brian Ochoa
This patch adds commas to clarify sentence structure: - "To confirm look for" --> "To confirm, look for" - "If you do remove this file" --> "If you do, remove this file" Signed-off-by: Brian Ochoa --- tools/testing/selftests/firmware/fw_fallback.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 de

Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests

2025-02-18 Thread Alexei Starovoitov
On Tue, Feb 18, 2025 at 1:22 PM Stanislav Fomichev wrote: > > On 02/17, Bastien Curutchet (eBPF Foundation) wrote: > > Hi all, > > > > Both tc_links.c and tc_opts.c do their tests on the loopback interface. > > It prevents from parallelizing their executions. > > > > Use namespaces and the new app

Re: [PATCH bpf-next v2 1/6] net: tun: enable XDP metadata support

2025-02-18 Thread Jason Wang
On Tue, Feb 18, 2025 at 1:23 AM Marcus Wichelmann wrote: > > Enable the support for the bpf_xdp_adjust_meta helper function for XDP > buffers initialized by the tun driver. This allows to reserve a metadata > area that is useful to pass any information from one XDP program to > another one, for ex

[PATCH] selftests:sysctl:Fix minor grammers in sysctl test

2025-02-18 Thread Sumya Hoque
Hello everyone, Some minor grammer issues that I have fixed: 1. echo "If an error every occurs --> echo "If an error occurs, every execution 2. Example uses --> Example Usage Signed-off-by: Sumya Hoque --- tools/testing/selftests/sysctl/sysctl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 de

Re: [PATCH 1/5] reset: imx8mp-audiomix: Add prefix for internal macro

2025-02-18 Thread Peng Fan
On Tue, Feb 18, 2025 at 10:57:08AM +0200, Daniel Baluta wrote: >This adds IMX8MP_AUDIOMIX_ prefix to internal macros >in order to show that specific macros are related to >audiomix. > >Signed-off-by: Daniel Baluta Reviewed-by: Peng Fan

Re: [PATCH 5/5] imx_dsp_rproc: Use reset controller API to control the DSP

2025-02-18 Thread Peng Fan
On Tue, Feb 18, 2025 at 10:57:12AM +0200, Daniel Baluta wrote: >Use the reset controller API to control the DSP on i.MX8MP. This way >we can have a better control of the resources and avoid using a syscon >to access the audiomix bits. > >Signed-off-by: Daniel Baluta LGTM: Reviewed-by: Peng Fan

Re: [PATCH v3 bpf 0/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-18 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (master) by Alexei Starovoitov : On Sun, 9 Feb 2025 23:22:31 -0800 you wrote: > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same

Re: [PATCH net-next] virtio-net: tweak for better TX performance in NAPI mode

2025-02-18 Thread Jason Wang
On Tue, Feb 18, 2025 at 4:49 PM Michael S. Tsirkin wrote: > > On Tue, Feb 18, 2025 at 10:39:08AM +0800, Jason Wang wrote: > > There are several issues existed in start_xmit(): > > > > - Transmitted packets need to be freed before sending a packet, this > > introduces delay and increases the aver

Re: [PATCH] selftests: pid_namespace and pidfd missing include

2025-02-18 Thread Shuah Khan
On 2/12/25 17:24, Alessandro Zanni wrote: Running "make kselftest" results in several errors like these: pidfd_fdinfo_test.c:231:36: error: ‘MS_REC’ undeclared (first use in this function) 231 | r = mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0); pidfd_fdinfo_test.c:231:45: error: ‘M

[PATCH v8 0/8] Buddy allocator like (or non-uniform) folio split

2025-02-18 Thread Zi Yan
Hi all, This patchset adds a new buddy allocator like (or non-uniform) large folio split from a order-n folio to order-m with m < n. It reduces 1. the total number of after-split folios from 2^(n-m) to n-m+1; 2. the amount of memory needed for multi-index xarray split from 2^(n/6-m/6) to n/6-m/

[PATCH v8 1/8] xarray: add xas_try_split() to split a multi-index entry

2025-02-18 Thread Zi Yan
A preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_split() always split all slots from a multi-index entry. They cost the same number of xa_node as the to-be-split slots. For exam

[PATCH v8 8/8] selftests/mm: add tests for folio_split(), buddy allocator like split

2025-02-18 Thread Zi Yan
It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao

[PATCH v8 7/8] mm/truncate: use buddy allocator like folio split for truncate operation

2025-02-18 Thread Zi Yan
Instead of splitting the large folio uniformly during truncation, try to use buddy allocator like split at the start of truncation range to minimize the number of resulting folios if it is supported. try_folio_split() is introduced to use folio_split() if supported and fall back to uniform split ot

[PATCH v8 6/8] mm/huge_memory: add folio_split() to debugfs testing interface

2025-02-18 Thread Zi Yan
This allows to test folio_split() by specifying an additional in folio page offset parameter to split_huge_page debugfs interface. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miao

[PATCH v8 5/8] mm/huge_memory: remove the old, unused __split_huge_page()

2025-02-18 Thread Zi Yan
Now split_huge_page_to_list_to_order() uses the new backend split code in __folio_split_without_mapping(), the old __split_huge_page() and __split_huge_page_tail() can be removed. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc

[PATCH v8 4/8] mm/huge_memory: add buddy allocator like (non-uniform) folio_split()

2025-02-18 Thread Zi Yan
folio_split() splits a large folio in the same way as buddy allocator splits a large free page for allocation. The purpose is to minimize the number of folios after the split. For example, if user wants to free the 3rd subpage in a order-9 folio, folio_split() will split the order-9 folio as: O-

[PATCH v8 3/8] mm/huge_memory: move folio split common code to __folio_split()

2025-02-18 Thread Zi Yan
This is a preparation patch for folio_split(). In the upcoming patch folio_split() will share folio unmapping and remapping code with split_huge_page_to_list_to_order(), so move the code to a common function __folio_split() first. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc:

[PATCH v8 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-18 Thread Zi Yan
This is a preparation patch, both added functions are not used yet. The added __split_unmapped_folio() is able to split a folio with its mapping removed in two manners: 1) uniform split (the existing way), and 2) buddy allocator like split. The added __split_folio_to_order() can split a folio int

Re: [PATCH v5 3/3] rseq/selftests: Add test for mm_cid compaction

2025-02-18 Thread Shuah Khan
On 2/10/25 08:25, Gabriele Monaco wrote: On Mon, 2025-02-10 at 15:53 +0100, Mathieu Desnoyers wrote: On 2025-02-10 08:57, Gabriele Monaco wrote: A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs corre

Re: [PATCH bpf-next v5 0/6] selftests/bpf: Migrate test_xdp_redirect_multi.sh to test_progs

2025-02-18 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Wed, 12 Feb 2025 12:11:08 +0100 you wrote: > Hi all, > > This patch series continues the work to migrate the *.sh tests into > prog_tests framework. > > test_xdp_redirect_multi.sh tests the XDP redirections don

Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests

2025-02-18 Thread Stanislav Fomichev
On 02/17, Bastien Curutchet (eBPF Foundation) wrote: > Hi all, > > Both tc_links.c and tc_opts.c do their tests on the loopback interface. > It prevents from parallelizing their executions. > > Use namespaces and the new append_tid() helper to allow this > parallelization. > > Signed-off-by: Bas

Re: [PATCH] dt-bindings: hwlock: Convert to dtschema

2025-02-18 Thread Rob Herring
On Tue, Feb 18, 2025 at 09:39:35PM +0530, Siddharth Menon wrote: > From: BiscuitBobby > > Convert the generic hwspinlock bindings to DT schema. > --- > This is my first time converting bindings to dt schema, please let me > know if I have overlooked anything. > .../devicetree/bindings/hwlock/h

[PATCH AUTOSEL 6.12 09/31] selftests/cgroup: use bash in test_cpuset_v1_hp.sh

2025-02-18 Thread Sasha Levin
From: Bharadwaj Raju [ Upstream commit fd079124112c6e11c1bca2e7c71470a2d60bc363 ] The script uses non-POSIX features like `[[` for conditionals and hence does not work when run with a POSIX /bin/sh. Change the shebang to /bin/bash instead, like the other tests in cgroup. Signed-off-by: Bharadw

[PATCH AUTOSEL 6.12 01/31] sched_ext: selftests/dsp_local_on: Fix sporadic failures

2025-02-18 Thread Sasha Levin
From: Tejun Heo [ Upstream commit e9fe182772dcb2630964724fd93e9c90b68ea0fd ] dsp_local_on has several incorrect assumptions, one of which is that p->nr_cpus_allowed always tracks p->cpus_ptr. This is not true when a task is scheduled out while migration is disabled - p->cpus_ptr is temporarily o

[PATCH AUTOSEL 6.13 09/31] selftests/cgroup: use bash in test_cpuset_v1_hp.sh

2025-02-18 Thread Sasha Levin
From: Bharadwaj Raju [ Upstream commit fd079124112c6e11c1bca2e7c71470a2d60bc363 ] The script uses non-POSIX features like `[[` for conditionals and hence does not work when run with a POSIX /bin/sh. Change the shebang to /bin/bash instead, like the other tests in cgroup. Signed-off-by: Bharadw

[PATCH AUTOSEL 6.13 01/31] sched_ext: selftests/dsp_local_on: Fix sporadic failures

2025-02-18 Thread Sasha Levin
From: Tejun Heo [ Upstream commit e9fe182772dcb2630964724fd93e9c90b68ea0fd ] dsp_local_on has several incorrect assumptions, one of which is that p->nr_cpus_allowed always tracks p->cpus_ptr. This is not true when a task is scheduled out while migration is disabled - p->cpus_ptr is temporarily o

Re: [PATCH] dt-bindings: hwlock: Convert to dtschema

2025-02-18 Thread Rob Herring (Arm)
On Tue, 18 Feb 2025 21:39:35 +0530, Siddharth Menon wrote: > From: BiscuitBobby > > Convert the generic hwspinlock bindings to DT schema. > --- > This is my first time converting bindings to dt schema, please let me > know if I have overlooked anything. > .../devicetree/bindings/hwlock/hwloc

Re: [PATCH vhost] vdpa/mlx5: Fix oversized null mkey longer than 32bit

2025-02-18 Thread Dragos Tatulea
On 02/18, Eugenio Perez Martin wrote: > On Mon, Feb 17, 2025 at 8:45 PM Dragos Tatulea wrote: > > > > From: Si-Wei Liu > > > > create_user_mr() has correct code to count the number of null keys > > used to fill in a hole for the memory map. However, fill_indir() > > does not follow the same to ca

[PATCH] selftests/mm: run_vmtests.sh: fix half_ufd_size_MB calculation

2025-02-18 Thread Rafael Aquini
From: Rafael Aquini We noticed that uffd-stress test was always failing to run when invoked for the hugetlb profiles on x86_64 systems with a processor count of 64 or bigger: ... # # running ./uffd-stress hugetlb 128 32 # --

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-18 Thread Josh Poimboeuf
On Tue, Feb 18, 2025 at 10:20:10AM -0800, Song Liu wrote: > Hi Josh, > > On Mon, Feb 17, 2025 at 10:37 PM Josh Poimboeuf wrote: > > > > On Mon, Feb 17, 2025 at 08:38:22PM -0800, Song Liu wrote: > > > On Fri, Feb 14, 2025 at 3:23 PM Josh Poimboeuf > > > wrote: > > > > Poking around the arm64 mod

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-18 Thread Alexei Starovoitov
On Mon, Feb 17, 2025 at 6:35 AM Vlastimil Babka wrote: > > On 2/17/25 15:19, Sebastian Andrzej Siewior wrote: > > On 2025-02-14 17:27:39 [+0100], Vlastimil Babka wrote: > >> From: Sebastian Andrzej Siewior > >> > >> In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect > >> critical

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-18 Thread Song Liu
Hi Josh, On Mon, Feb 17, 2025 at 10:37 PM Josh Poimboeuf wrote: > > On Mon, Feb 17, 2025 at 08:38:22PM -0800, Song Liu wrote: > > On Fri, Feb 14, 2025 at 3:23 PM Josh Poimboeuf wrote: > > > Poking around the arm64 module code, arch/arm64/kernel/module-plts.c > > > is looking at all the relocatio

[syzbot] [rcu?] WARNING in srcu_invoke_callbacks (2)

2025-02-18 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:a64dcfb451e2 Linux 6.14-rc2 git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci console output: https://syzkaller.appspot.com/x/log.txt?x=12398f1858 kernel config: https://syzkaller.appspot.co

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread David Hildenbrand
See mlock2(); SYSCALL_DEFINE3(mlock2, unsigned long, start, size_t, len, int, flags) { vm_flags_t vm_flags = VM_LOCKED; if (flags & ~MLOCK_ONFAULT) return -EINVAL; if (flags & MLOCK_ONFAULT) vm_flags |= VM_LOCKONFAULT; return do_m

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 06:25:35PM +0100, David Hildenbrand wrote: > > > > > > QEMU, for example, will issue an mlockall(MCL_CURRENT | MCL_FUTURE); when > > > requested to then exit(); if it fails. > > > > Hm under what circumstances? I use qemu extensively to test this stuff with > > no issues. Un

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread David Hildenbrand
QEMU, for example, will issue an mlockall(MCL_CURRENT | MCL_FUTURE); when requested to then exit(); if it fails. Hm under what circumstances? I use qemu extensively to test this stuff with no issues. Unless you mean it's using it in the 'host' code somehow. -overcommit mem-lock=on or (legac

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 06:14:00PM +0100, David Hildenbrand wrote: > On 18.02.25 17:43, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 04:20:18PM +0100, David Hildenbrand wrote: > > > > Right yeah that'd be super weird. And I don't want to add that logic. > > > > > > > > > Also not sure what ha

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread David Hildenbrand
On 18.02.25 17:43, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 04:20:18PM +0100, David Hildenbrand wrote: Right yeah that'd be super weird. And I don't want to add that logic. Also not sure what happens if one does an mlock()/mlockall() after already installing PTE markers. The existing l

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 06:00:36PM +0100, David Hildenbrand wrote: > On 18.02.25 17:49, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 05:27:24PM +0100, David Hildenbrand wrote: > > > On 18.02.25 17:21, Lorenzo Stoakes wrote: > > > > On Tue, Feb 18, 2025 at 05:17:20PM +0100, David Hildenbrand w

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread David Hildenbrand
On 18.02.25 17:49, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:27:24PM +0100, David Hildenbrand wrote: On 18.02.25 17:21, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:17:20PM +0100, David Hildenbrand wrote: On 18.02.25 17:12, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:01:16P

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 05:27:24PM +0100, David Hildenbrand wrote: > On 18.02.25 17:21, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 05:17:20PM +0100, David Hildenbrand wrote: > > > On 18.02.25 17:12, Lorenzo Stoakes wrote: > > > > On Tue, Feb 18, 2025 at 05:01:16PM +0100, David Hildenbrand w

[PATCH] selftests/net: deflake GRO tests and fix return value and output

2025-02-18 Thread Kevin Krakauer
GRO tests are timing dependent and can easily flake. This is partially mitigated in gro.sh by giving each subtest 3 chances to pass. However, this still flakes on some machines. Set the device's napi_defer_hard_irqs to 50 so that GRO is less likely to immediately flush. This already happened in se

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 04:20:18PM +0100, David Hildenbrand wrote: > > Right yeah that'd be super weird. And I don't want to add that logic. > > > > > Also not sure what happens if one does an mlock()/mlockall() after > > > already installing PTE markers. > > > > The existing logic already handles

Re: [PATCH] dt-bindings: hwlock: Convert to dtschema

2025-02-18 Thread Krzysztof Kozlowski
On 18/02/2025 17:09, Siddharth Menon wrote: > From: BiscuitBobby > > Convert the generic hwspinlock bindings to DT schema. Thank you for your patch. There is something to discuss/improve. Please run scripts/checkpatch.pl and fix reported warnings. After that, run also `scripts/checkpatch.pl --s

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 05:01:16PM +0100, David Hildenbrand wrote: > On 13.02.25 19:17, Lorenzo Stoakes wrote: > > There is no reason to disallow guard regions in file-backed mappings - > > readahead and fault-around both function correctly in the presence of PTE > > markers, equally other operatio

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread David Hildenbrand
On 18.02.25 17:21, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:17:20PM +0100, David Hildenbrand wrote: On 18.02.25 17:12, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:01:16PM +0100, David Hildenbrand wrote: On 13.02.25 19:17, Lorenzo Stoakes wrote: There is no reason to disallow gu

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 05:17:20PM +0100, David Hildenbrand wrote: > On 18.02.25 17:12, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 05:01:16PM +0100, David Hildenbrand wrote: > > > On 13.02.25 19:17, Lorenzo Stoakes wrote: > > > > There is no reason to disallow guard regions in file-backed m

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread David Hildenbrand
On 18.02.25 17:12, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 05:01:16PM +0100, David Hildenbrand wrote: On 13.02.25 19:17, Lorenzo Stoakes wrote: There is no reason to disallow guard regions in file-backed mappings - readahead and fault-around both function correctly in the presence of PTE

[PATCH] dt-bindings: hwlock: Convert to dtschema

2025-02-18 Thread Siddharth Menon
From: BiscuitBobby Convert the generic hwspinlock bindings to DT schema. --- This is my first time converting bindings to dt schema, please let me know if I have overlooked anything. .../devicetree/bindings/hwlock/hwlock.txt | 59 - .../devicetree/bindings/hwlock/hwlock.yam

Re: [PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-18 Thread David Hildenbrand
Now, can it happen that xas_try_split() would ever perform a partial split in any way, when invoked from __split_unmapped_folio(), such that we run into the do { } while(); loop and fail with -ENOMEM after already having performed changes -- xas_update(). Or is that simply impossible? Right

Re: [PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-18 Thread Zi Yan
On 18 Feb 2025, at 10:44, David Hildenbrand wrote: > On 17.02.25 23:05, Zi Yan wrote: >> On 17 Feb 2025, at 16:44, David Hildenbrand wrote: >> >>> On 11.02.25 16:50, Zi Yan wrote: It is a preparation patch for non-uniform folio split, which always split a folio into half iteratively, and

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread David Hildenbrand
On 13.02.25 19:17, Lorenzo Stoakes wrote: There is no reason to disallow guard regions in file-backed mappings - readahead and fault-around both function correctly in the presence of PTE markers, equally other operations relating to memory-mapped files function correctly. Additionally, read-only

Re: [PATCH 4/5] reset: imx8mp-audiomix: Add support for DSP run/stall

2025-02-18 Thread Frank Li
On Tue, Feb 18, 2025 at 10:57:11AM +0200, Daniel Baluta wrote: > We can Run/Stall the DSP via audio block control bits found in audiomix. > Implement this functionality using the reset controller and use assert > for Stall and deassert for Run. > > Signed-off-by: Daniel Baluta > --- Reviewed-by:

Re: [PATCH 3/5] reset: imx8mp-audiomix: Introduce active_low configuration option

2025-02-18 Thread Frank Li
On Tue, Feb 18, 2025 at 10:57:10AM +0200, Daniel Baluta wrote: > For EARC and EARC PHY the reset happens when clearing the reset bits. > Refactor assert/deassert function in order to take into account > the active_low configuratin option. > > Signed-off-by: Daniel Baluta Reviewed-by: Frank Li >

Re: [PATCH 3/5] reset: imx8mp-audiomix: Introduce active_low configuration option

2025-02-18 Thread Frank Li
On Tue, Feb 18, 2025 at 10:30:21AM +0100, Philipp Zabel wrote: > On Di, 2025-02-18 at 10:57 +0200, Daniel Baluta wrote: > > For EARC and EARC PHY the reset happens when clearing the reset bits. > > Refactor assert/deassert function in order to take into account > > the active_low configuratin optio

Re: [PATCH 2/5] reset: imx8mp-audiomix: Prepare the code for more reset bits

2025-02-18 Thread Frank Li
On Tue, Feb 18, 2025 at 10:57:09AM +0200, Daniel Baluta wrote: > Current code supports EARC PHY Software Reset and EARCSoftware > Reset but it is not easily extensible to more reset bits. > > So, refactor the code in order to easily allow more reset bits > in the future. Nit: wrap at 75 ch

Re: [PATCH 1/5] reset: imx8mp-audiomix: Add prefix for internal macro

2025-02-18 Thread Frank Li
On Tue, Feb 18, 2025 at 10:57:08AM +0200, Daniel Baluta wrote: > This adds IMX8MP_AUDIOMIX_ prefix to internal macros > in order to show that specific macros are related to > audiomix. nit: warp at 75 chars Reviewed-by: Frank Li > > Signed-off-by: Daniel Baluta > --- > drivers/reset/reset-imx8

Re: [PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-18 Thread David Hildenbrand
On 17.02.25 23:05, Zi Yan wrote: On 17 Feb 2025, at 16:44, David Hildenbrand wrote: On 11.02.25 16:50, Zi Yan wrote: It is a preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_sp

Re: [PATCH v7 4/8] mm/huge_memory: add buddy allocator like (non-uniform) folio_split()

2025-02-18 Thread Zi Yan
On 17 Feb 2025, at 23:12, Andrew Morton wrote: > On Mon, 17 Feb 2025 10:22:44 -0500 Zi Yan wrote: > >>> >>> Thanks. The patch below should fix it. >>> >>> I am going to send V8, since >>> 1. there have been 4 fixes so far for V7, a new series would help people >>> review; >>> >>> 2. based on the

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread David Hildenbrand
Right yeah that'd be super weird. And I don't want to add that logic. Also not sure what happens if one does an mlock()/mlockall() after already installing PTE markers. The existing logic already handles non-present cases by skipping them, in mlock_pte_range(): for (pte = start_pte; a

Re: [PATCH v6 1/3] rust: kunit: add KUnit case and suite macros

2025-02-18 Thread Tamir Duberstein
On Tue, Feb 18, 2025 at 3:51 AM David Gow wrote: > > On Sat, 15 Feb 2025 at 21:01, Tamir Duberstein wrote: > > > > On Sat, Feb 15, 2025 at 4:03 AM David Gow wrote: > > > > > > On Fri, 14 Feb 2025 at 22:41, Tamir Duberstein wrote: > > > > > > > > Very excited to see this progress. > > > > > > >

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 03:35:19PM +0100, David Hildenbrand wrote: > On 18.02.25 14:05, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 01:12:05PM +0100, Vlastimil Babka wrote: > > > On 2/13/25 19:16, Lorenzo Stoakes wrote: > > > > The guard regions feature was initially implemented to support a

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread David Hildenbrand
On 18.02.25 14:05, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 01:12:05PM +0100, Vlastimil Babka wrote: On 2/13/25 19:16, Lorenzo Stoakes wrote: The guard regions feature was initially implemented to support anonymous mappings only, excluding shmem. This was done such as to introduce the fe

Re: [PATCH 4/4] tools/selftests: add file/shmem-backed mapping guard region tests

2025-02-18 Thread Vlastimil Babka
On 2/13/25 19:17, Lorenzo Stoakes wrote: > Extend the guard region self tests to explicitly assert that guard regions > work correctly for functionality specific to file-backed and shmem > mappings. > > In addition to testing all of the existing guard region functionality that > is currently teste

Re: [PATCH 3/4] tools/selftests: expand all guard region tests to file-backed

2025-02-18 Thread Vlastimil Babka
On 2/13/25 19:17, Lorenzo Stoakes wrote: > Extend the guard region tests to allow for test fixture variants for anon, > shmem, and local file files. > > This allows us to assert that each of the expected behaviours of anonymous > memory also applies correctly to file-backed (both shmem and an a fi

Re: [PATCH 2/4] selftests/mm: rename guard-pages to guard-regions

2025-02-18 Thread Vlastimil Babka
On 2/13/25 19:17, Lorenzo Stoakes wrote: > The feature formerly referred to as guard pages is more correctly referred > to as 'guard regions', as in fact no pages are ever allocated in the > process of installing the regions. > > To avoid confusion, rename the tests accordingly. > > Signed-off-by

Re: [PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-18 Thread Vlastimil Babka
On 2/13/25 19:17, Lorenzo Stoakes wrote: > There is no reason to disallow guard regions in file-backed mappings - > readahead and fault-around both function correctly in the presence of PTE > markers, equally other operations relating to memory-mapped files function > correctly. > > Additionally,

Re: [PATCH 3/5] reset: imx8mp-audiomix: Introduce active_low configuration option

2025-02-18 Thread Peng Fan
On Tue, Feb 18, 2025 at 10:57:10AM +0200, Daniel Baluta wrote: >For EARC and EARC PHY the reset happens when clearing the reset bits. >Refactor assert/deassert function in order to take into account >the active_low configuratin option. > >Signed-off-by: Daniel Baluta >--- > drivers/reset/reset-imx

Re: [PATCH 4/5] reset: imx8mp-audiomix: Add support for DSP run/stall

2025-02-18 Thread Peng Fan
On Tue, Feb 18, 2025 at 10:57:11AM +0200, Daniel Baluta wrote: >We can Run/Stall the DSP via audio block control bits found in audiomix. >Implement this functionality using the reset controller and use assert >for Stall and deassert for Run. > >Signed-off-by: Daniel Baluta >--- > drivers/reset/res

Re: [PATCH 2/5] reset: imx8mp-audiomix: Prepare the code for more reset bits

2025-02-18 Thread Peng Fan
On Tue, Feb 18, 2025 at 10:57:09AM +0200, Daniel Baluta wrote: >Current code supports EARC PHY Software Reset and EARC Software >Reset but it is not easily extensible to more reset bits. > >So, refactor the code in order to easily allow more reset bits >in the future. > >Signed-off-by: Dani

Re: [PATCH net-next v5 8/8] net: pktgen: use defines for the various dec/hex number parsing digits lengths

2025-02-18 Thread Simon Horman
On Mon, Feb 17, 2025 at 09:47:40AM -0800, Jakub Kicinski wrote: > On Sun, 16 Feb 2025 09:17:39 + Simon Horman wrote: > > On Fri, Feb 14, 2025 at 08:11:45PM -0800, Jakub Kicinski wrote: > > > On Thu, 13 Feb 2025 12:00:25 +0100 Peter Seiderer wrote: > > > > Use defines for the various dec/hex n

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-18 Thread Andreas Hindborg
"Benno Lossin" writes: > On 18.02.25 12:14, Andreas Hindborg wrote: >> "Gary Guo" writes: >> >>> On Tue, 11 Feb 2025 21:24:44 +0100 >>> Andreas Hindborg wrote: >>> "Gary Guo" writes: > On Tue, 11 Feb 2025 16:57:36 +0100 > Andreas Hindborg wrote: > >> The `Index` impl

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Lorenzo Stoakes
On Tue, Feb 18, 2025 at 01:12:05PM +0100, Vlastimil Babka wrote: > On 2/13/25 19:16, Lorenzo Stoakes wrote: > > The guard regions feature was initially implemented to support anonymous > > mappings only, excluding shmem. > > > > This was done such as to introduce the feature carefully and increment

[PATCH v7 0/6] rust: extend `module!` macro with integer parameter support

2025-02-18 Thread Andreas Hindborg
This series extends the `module!` macro with support module parameters. It also adds some string to integer parsing functions and updates `BStr` with a method to strip a string prefix. This series stated out as code by Adam Bratschi-Kaye lifted from the original `rust` branch [1]. After a bit of

[PATCH v7 3/6] rust: str: implement `AsRef` for `[u8]` and `BStr`

2025-02-18 Thread Andreas Hindborg
Implement `AsRef` for `[u8]` and `BStr` so these can be used interchangeably for operations on `BStr`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 12 1 file changed, 12 insertions(+) diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index ba6b1a5c4f99d..c6bd2c69543

[PATCH v7 6/6] rust: add parameter support to the `module!` macro

2025-02-18 Thread Andreas Hindborg
This patch includes changes required for Rust kernel modules to utilize module parameters. This code implements read only support for integer types without `sysfs` support. Signed-off-by: Andreas Hindborg Acked-by: Petr Pavlu # from modules perspective --- rust/kernel/lib.rs | 1 +

[PATCH v7 2/6] rust: str: implement `Index` for `BStr`

2025-02-18 Thread Andreas Hindborg
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. This patch adds back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 11 +++ 1

[PATCH v7 5/6] rust: str: add radix prefixed integer parsing functions

2025-02-18 Thread Andreas Hindborg
Add the trait `ParseInt` for parsing string representations of integers where the string representations are optionally prefixed by a radix specifier. Implement the trait for the primitive integer types. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 118 +++

[PATCH v7 1/6] rust: str: implement `PartialEq` for `BStr`

2025-02-18 Thread Andreas Hindborg
Implement `PartialEq` for `BStr` by comparing underlying byte slices. Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 28e2201604d67..002d

[PATCH v7 4/6] rust: str: implement `strip_prefix` for `BStr`

2025-02-18 Thread Andreas Hindborg
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`. Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Signed-off-by: Andreas Hindborg --- It is also possible to get this method by implementing `core::slice::SlicePattern` for `BStr`. `SlicePattern` i

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-18 Thread Benno Lossin
On 18.02.25 12:14, Andreas Hindborg wrote: > "Gary Guo" writes: > >> On Tue, 11 Feb 2025 21:24:44 +0100 >> Andreas Hindborg wrote: >> >>> "Gary Guo" writes: >>> On Tue, 11 Feb 2025 16:57:36 +0100 Andreas Hindborg wrote: > The `Index` implementation on `BStr` was lost when we

Re: [PATCH net-next v5 8/8] net: pktgen: use defines for the various dec/hex number parsing digits lengths

2025-02-18 Thread Edward Cree
On 15/02/2025 04:11, Jakub Kicinski wrote: > On Thu, 13 Feb 2025 12:00:25 +0100 Peter Seiderer wrote: >> Use defines for the various dec/hex number parsing digits lengths >> (hex32_arg/num_arg calls). > > I don't understand the value of this patch, TBH. > > Example: > > +#define HEX_2_DIGITS 2 >

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-18 Thread Vlastimil Babka
On 2/13/25 19:16, Lorenzo Stoakes wrote: > The guard regions feature was initially implemented to support anonymous > mappings only, excluding shmem. > > This was done such as to introduce the feature carefully and incrementally > and to be conservative when considering the various caveats and cor

Re: [PATCH net 0/4] sockmap, vsock: For connectible sockets allow only connected

2025-02-18 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Paolo Abeni : On Thu, 13 Feb 2025 12:58:48 +0100 you wrote: > Series deals with one more case of vsock surprising BPF/sockmap by being > inconsistency about (having an) assigned transport. > > KASAN: null-ptr-deref in range [0x00

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-18 Thread Andreas Hindborg
"Gary Guo" writes: > On Tue, 11 Feb 2025 21:24:44 +0100 > Andreas Hindborg wrote: > >> "Gary Guo" writes: >> >> > On Tue, 11 Feb 2025 16:57:36 +0100 >> > Andreas Hindborg wrote: >> > >> >> The `Index` implementation on `BStr` was lost when we switched `BStr` from >> >> a type alias of `[u8]` t

  1   2   >