Re: [PATCH v5 1/4] mm/memory-failure: refactor log format in soft offline code

2024-06-24 Thread Miaohe Lin
On 2024/6/25 0:33, Jiaqi Yan wrote: > Logs from soft_offline_page and soft_offline_in_use_page have > different formats than majority of the memory failure code: > > "Memory failure: 0x${pfn}: ${lower_case_message}" > > Convert them to the following format: > > "Soft offline: 0x${pfn}: ${low

[PATCH bpf-next v5 9/9] selftests/bpf: Drop make_socket in sk_lookup

2024-06-24 Thread Geliang Tang
From: Geliang Tang Use local helper make_client() instead of using make_socket() and connect(). Then make_socket() and inetaddr_len() can be dropped now. Signed-off-by: Geliang Tang --- .../selftests/bpf/prog_tests/sk_lookup.c | 45 +-- 1 file changed, 2 insertions(+), 43

[PATCH bpf-next v5 8/9] selftests/bpf: Use connect_to_addr in sk_lookup

2024-06-24 Thread Geliang Tang
From: Geliang Tang Use public network helpers make_sockaddr() and connect_to_addr() instead of using the local defined function make_socket() and connect(). This make_socket() can be dropped latter. Signed-off-by: Geliang Tang --- .../selftests/bpf/prog_tests/sk_lookup.c | 20 +++

[PATCH bpf-next v5 7/9] selftests/bpf: Use connect_to_fd in sk_lookup

2024-06-24 Thread Geliang Tang
From: Geliang Tang This patch uses public helper connect_to_fd() exported in network_helpers.h instead of using make_socket() and connect() in prog_tests/sk_lookup.c. This can simplify the code. Signed-off-by: Geliang Tang --- .../testing/selftests/bpf/prog_tests/sk_lookup.c | 16 ++---

[PATCH bpf-next v5 6/9] selftests/bpf: Use start_server_str in sk_lookup

2024-06-24 Thread Geliang Tang
From: Geliang Tang This patch uses public helper start_server_addr() instead of local defined function make_server() in prog_tests/sk_lookup.c to avoid duplicate code. Add a helper setsockopts() to set SOL_CUSTOM sockopt looply, set it to setsockopt pointer of struct network_helper_opts, and pas

[PATCH bpf-next v5 5/9] selftests/bpf: Close fd in error path in drop_on_reuseport

2024-06-24 Thread Geliang Tang
From: Geliang Tang Server 1 fd should be closed in the error path when update_lookup_map() fails. This patch fixes it by goto "close_srv1" instead of "detach" lable in that case. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2

[PATCH bpf-next v5 4/9] selftests/bpf: Use make_sockaddr in sockmap_ktls

2024-06-24 Thread Geliang Tang
From: Geliang Tang This patch uses public helper make_sockaddr() exported in network_helpers.h instead of open-coding in sockmap_ktls.c. This can avoid duplicate code. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang --- .../selftests/bpf/prog_tests/sockmap_ktls.c | 16 ++--

[PATCH bpf-next v5 3/9] selftests/bpf: Use connect_to_fd in sockmap_ktls

2024-06-24 Thread Geliang Tang
From: Geliang Tang Use public network helper connect_to_fd() instead of open-coding it in prog_tests/sockmap_ktls.c. This can avoid duplicate code. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang --- .../selftests/bpf/prog_tests/sockmap_ktls.c| 14 ++ 1 file changed

[PATCH bpf-next v5 2/9] selftests/bpf: Use start_server_str in sockmap_ktls

2024-06-24 Thread Geliang Tang
From: Geliang Tang Include network_helpers.h in prog_tests/sockmap_ktls.c, use public network helper start_server_str() instead of local defined function tcp_server(). This can avoid duplicate code. Technically, this is not a one-for-one replacement, as start_server_str() also does bind(). But t

[PATCH bpf-next v5 1/9] selftests/bpf: Add backlog for network_helper_opts

2024-06-24 Thread Geliang Tang
From: Geliang Tang Some callers expect __start_server() helper to pass their own "backlog" value to listen() instead of the default of 1. So this patch adds struct member "backlog" for network_helper_opts to allow callers to set "backlog" value via start_server_str() helper. Signed-off-by: Gelia

[PATCH bpf-next v5 0/9] use network helpers, part 8

2024-06-24 Thread Geliang Tang
From: Geliang Tang v5: - keep make_server and make_client as Eduard suggested. v4: - a new patch to use make_sockaddr in sockmap_ktls. - a new patch to close fd in error path in drop_on_reuseport. - drop make_server() in patch 7. - drop make_client() too in patch 9. v3: - a new patch to a

[PATCH net-next v13 13/13] selftests: add ncdevmem, netcat for devmem TCP

2024-06-24 Thread Mina Almasry
ncdevmem is a devmem TCP netcat. It works similarly to netcat, but it sends and receives data using the devmem TCP APIs. It uses udmabuf as the dmabuf provider. It is compatible with a regular netcat running on a peer, or a ncdevmem running on a peer. In addition to normal netcat support, ncdevmem

[PATCH net-next v13 12/13] net: add devmem TCP documentation

2024-06-24 Thread Mina Almasry
Add documentation outlining the usage and details of devmem TCP. Signed-off-by: Mina Almasry Reviewed-by: Bagas Sanjaya --- v9: https://lore.kernel.org/netdev/20240403002053.2376017-14-almasrym...@google.com/ - Bagas doc suggestions. v8: - Applied docs suggestions (Randy). Thanks! v7: - App

[PATCH net-next v13 11/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-06-24 Thread Mina Almasry
Add an interface for the user to notify the kernel that it is done reading the devmem dmabuf frags returned as cmsg. The kernel will drop the reference on the frags to make them available for reuse. Signed-off-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry --- v

[PATCH net-next v13 10/13] tcp: RX path for devmem TCP

2024-06-24 Thread Mina Almasry
In tcp_recvmsg_locked(), detect if the skb being received by the user is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM flag - pass it to tcp_recvmsg_devmem() for custom handling. tcp_recvmsg_devmem() copies any data in the skb header to the linear buffer, and returns a cmsg

[PATCH net-next v13 09/13] net: add support for skbs with unreadable frags

2024-06-24 Thread Mina Almasry
For device memory TCP, we expect the skb headers to be available in host memory for access, and we expect the skb frags to be in device memory and unaccessible to the host. We expect there to be no mixing and matching of device memory frags (unaccessible) with host memory frags (accessible) in the

[PATCH net-next v13 08/13] net: support non paged skb frags

2024-06-24 Thread Mina Almasry
Make skb_frag_page() fail in the case where the frag is not backed by a page, and fix its relevant callers to handle this case. Signed-off-by: Mina Almasry --- v10: - Fixed newly generated kdoc warnings found by patchwork. While we're at it, fix the Return section of the functions I touched.

[PATCH net-next v13 07/13] memory-provider: dmabuf devmem memory provider

2024-06-24 Thread Mina Almasry
Implement a memory provider that allocates dmabuf devmem in the form of net_iov. The provider receives a reference to the struct netdev_dmabuf_binding via the pool->mp_priv pointer. The driver needs to set this pointer for the provider in the net_iov. The provider obtains a reference on the netde

[PATCH net-next v13 06/13] page_pool: devmem support

2024-06-24 Thread Mina Almasry
Convert netmem to be a union of struct page and struct netmem. Overload the LSB of struct netmem* to indicate that it's a net_iov, otherwise it's a page. Currently these entries in struct page are rented by the page_pool and used exclusively by the net stack: struct { unsigned long pp_mag

[PATCH net-next v13 05/13] page_pool: convert to use netmem

2024-06-24 Thread Mina Almasry
Abstract the memory type from the page_pool so we can later add support for new memory types. Convert the page_pool to use the new netmem type abstraction, rather than use struct page directly. As of this patch the netmem type is a no-op abstraction: it's always a struct page underneath. All the p

[PATCH net-next v13 04/13] netdev: netdevice devmem allocator

2024-06-24 Thread Mina Almasry
Implement netdev devmem allocator. The allocator takes a given struct netdev_dmabuf_binding as input and allocates net_iov from that binding. The allocation simply delegates to the binding's genpool for the allocation logic and wraps the returned memory region in a net_iov struct. Signed-off-by:

[PATCH net-next v13 03/13] netdev: support binding dma-buf to netdevice

2024-06-24 Thread Mina Almasry
Add a netdev_dmabuf_binding struct which represents the dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to rx queues on the netdevice. On the binding, the dma_buf_attach & dma_buf_map_attachment will occur. The entries in the sg_table from mapping will be inserted into a genpool

[PATCH net-next v13 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-06-24 Thread Mina Almasry
API takes the dma-buf fd as input, and binds it to the netdevice. The user can specify the rx queues to bind the dma-buf to. Suggested-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- v7: - Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check. Changes in v1: - Add rx-queue-type to

[PATCH net-next v13 01/13] netdev: add netdev_rx_queue_restart()

2024-06-24 Thread Mina Almasry
Add netdev_rx_queue_restart() function to netdev_rx_queue.h Signed-off-by: David Wei Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov --- v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel). - Fix ndo_queue_mem_free c

[PATCH net-next v13 00/13] Device Memory TCP

2024-06-24 Thread Mina Almasry
v13: https://patchwork.kernel.org/project/netdevbpf/list/?series=861406&archive=both&state=* Major changes: -- This iteration addresses Pavel's review comments, applies his reviewed-by's, and seeks to fix the patchwork build error (sorry!). As usual, the full devmem TCP changes

Re: [PATCH bpf-next v4 6/9] selftests/bpf: Invoke attach_reuseport out of make_server

2024-06-24 Thread Eduard Zingerman
On Mon, 2024-06-24 at 12:33 +0800, Geliang Tang wrote: > From: Geliang Tang > > In order to facilitate subsequent commits to drop make_server(), this patch > invokes attach_reuseport() out of make_server(), right after invoking > make_server() if the passed "reuseport_prog" argument is not NULL.

Re: [PATCH net] selftests: net: remove unneeded IP_GRE config

2024-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2024 13:55:39 +0800 Yujie Liu wrote: > It seems that there is no definition for config IP_GRE, and it is not a > dependency of other configs, so remove it. > > linux$ find -name Kconfig | xargs grep "IP_GRE" > <-- nothing > > There is a IPV6_GRE config defined in net/ipv6/Kconfig.

[PATCH v6 13/13] selftests/sgx: Append CFLAGS from lib.mk to HOST_CFLAGS

2024-06-24 Thread Edward Liaw
lib.mk CFLAGS provides -D_GNU_SOURCE= which is needed to compile the host files. Signed-off-by: Edward Liaw --- tools/testing/selftests/sgx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile in

[PATCH v6 12/13] selftests/riscv: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/riscv/mm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/riscv/mm/Mak

[PATCH v6 11/13] selftests/ring-buffer: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/ring-buffer/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/ring-buffer/Makefile b/to

[PATCH v6 10/13] selftests/resctrl: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/resctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/resctrl/Makef

[PATCH v6 09/13] selftests/proc: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/proc/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/proc/Makefile b/tools/testing/se

[PATCH v6 08/13] selftests/kvm: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/Makefile b/t

[PATCH v6 07/13] selftests/iommu: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/iommu/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/iommu/Makefile b/tools/testin

[PATCH v6 06/13] selftests/intel_pstate: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/intel_pstate/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/intel_ps

[PATCH v6 05/13] selftests/futex: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/futex/functional/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/fute

[PATCH v6 04/13] selftests/exec: Drop redundant -D_GNU_SOURCE CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
-D_GNU_SOURCE= will be provided by lib.mk CFLAGS, so -D_GNU_SOURCE should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/exec/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/se

[PATCH v6 03/13] selftests/net: Append to lib.mk CFLAGS in Makefile

2024-06-24 Thread Edward Liaw
Instead of overwriting the CFLAGS imported from lib.mk, append instead instead. Also drop -D_GNU_SOURCE from CFLAGS to prevent redefinition warning. Signed-off-by: Edward Liaw --- tools/testing/selftests/net/Makefile| 2 +- tools/testing/selftests/net/tcp_ao/Makefile | 2 +- 2 files cha

[PATCH v6 02/13] selftests: Add -D_GNU_SOURCE= to CFLAGS in lib.mk

2024-06-24 Thread Edward Liaw
Centralizes the _GNU_SOURCE definition to CFLAGS in lib.mk. This uses the form "-D_GNU_SOURCE=", which is equivalent to "#define _GNU_SOURCE". Otherwise using "-D_GNU_SOURCE" is equivalent to "-D_GNU_SOURCE=1" and "#define _GNU_SOURCE 1", which is less commonly seen in source code and would requi

[PATCH v6 01/13] selftests/mm: Define _GNU_SOURCE to an empty string

2024-06-24 Thread Edward Liaw
Use the more common "#define _GNU_SOURCE" instead of defining it to 1. This will prevent redefinition warnings when -D_GNU_SOURCE= is set. Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/thuge-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selft

[PATCH v6 00/13] Centralize _GNU_SOURCE definition into lib.mk

2024-06-24 Thread Edward Liaw
Centralizes the definition of _GNU_SOURCE into lib.mk and addresses all resulting macro redefinition warnings. These patches will need to be merged in one shot to avoid redefinition warnings. The initial attempt at this patch was abandoned because it affected lines in many source files and caused

Re: [PATCH v2 1/3] Fix userfaultfd_api to return EINVAL as expected

2024-06-24 Thread Andrew Morton
On Sun, 23 Jun 2024 11:26:37 -0400 Peter Xu wrote: > > > Fixes: e06f1e1dd499 ("userfaultfd: wp: enabled write protection in > > > userfaultfd API") > > > > A userspace-triggerable WARN is bad. I added cc:stable to this. > > Andrew, > > Note that this change may fix a WARN, but it may also st

Re: [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2024 12:53:45 -0400 Aaron Conole wrote: > Additionally, the "Cannot find device ..." text comes from an iproute2 > utility output. The only place we actually interact with that is via > the call at pmtu.sh:973: > > run_cmd ip link set ovs_br0 up > > Maybe it is possible that

Re: [PATCH RFC 0/5] mm/gup: Introduce exclusive GUP pinning

2024-06-24 Thread David Rientjes
On Mon, 24 Jun 2024, Sean Christopherson wrote: > On Fri, Jun 21, 2024, Elliot Berman wrote: > > On Fri, Jun 21, 2024 at 11:16:31AM +0100, Fuad Tabba wrote: > > > On Fri, Jun 21, 2024 at 10:10 AM David Hildenbrand > > > wrote: > > > > On 21.06.24 10:54, Fuad Tabba wrote: > > > > > On Fri, Jun 21

Re: [PATCH bpf-next v4 5/9] selftests/bpf: Close fd in error path in drop_on_reuseport

2024-06-24 Thread Eduard Zingerman
On Mon, 2024-06-24 at 12:33 +0800, Geliang Tang wrote: > From: Geliang Tang > > Server 1 fd should be closed in the error path when update_lookup_map() > fails. This patch fixes it by goto "close_srv1" instead of "detach" > lable in that case. > > Signed-off-by: Geliang Tang > --- Acked-by: Ed

Re: [PATCH bpf-next v4 4/9] selftests/bpf: Use make_sockaddr in sockmap_ktls

2024-06-24 Thread Eduard Zingerman
On Mon, 2024-06-24 at 12:33 +0800, Geliang Tang wrote: > From: Geliang Tang > > This patch uses public helper make_sockaddr() exported in network_helpers.h > instead of open-coding in sockmap_ktls.c. This can avoid duplicate code. > > Signed-off-by: Geliang Tang > --- Acked-by: Eduard Zingerma

Re: [PATCH v7 14/16] riscv: hwprobe: export Zcmop ISA extension

2024-06-24 Thread Evan Green
On Wed, Jun 19, 2024 at 4:41 AM Clément Léger wrote: > > Export Zcmop ISA extension through hwprobe. > > Signed-off-by: Clément Léger Reviewed-by: Evan Green

Re: [PATCH net 3/3] selftests/bpf: Null checks for link in bpf_tcp_ca

2024-06-24 Thread Eduard Zingerman
On Mon, 2024-06-24 at 21:27 +0800, Geliang Tang wrote: [...] > diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > b/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > index bceff5900016..8c0306f344e9 100644 > --- a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c > +++ b/to

Re: [PATCH RFC 0/5] mm/gup: Introduce exclusive GUP pinning

2024-06-24 Thread Sean Christopherson
On Fri, Jun 21, 2024, Elliot Berman wrote: > On Fri, Jun 21, 2024 at 11:16:31AM +0100, Fuad Tabba wrote: > > On Fri, Jun 21, 2024 at 10:10 AM David Hildenbrand wrote: > > > On 21.06.24 10:54, Fuad Tabba wrote: > > > > On Fri, Jun 21, 2024 at 9:44 AM David Hildenbrand > > > > wrote: > > > >> > >

Re: [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-24 Thread Aaron Conole
Aaron Conole writes: > Jakub Kicinski writes: > >> On Thu, 20 Jun 2024 08:55:54 -0400 Aaron Conole wrote: >>> This series enhances the ovs-dpctl utility to provide support for set() >>> and tunnel() flow specifiers, better ipv6 handling support, and the >>> ability to add tunnel vports, and LWT

[PATCH v5 4/4] docs: mm: add enable_soft_offline sysctl

2024-06-24 Thread Jiaqi Yan
Add the documentation for soft offline behaviors / costs, and what the new enable_soft_offline sysctl is for. Acked-by: Oscar Salvador Signed-off-by: Jiaqi Yan --- Documentation/admin-guide/sysctl/vm.rst | 32 + 1 file changed, 32 insertions(+) diff --git a/Documentati

[PATCH v5 3/4] selftest/mm: test enable_soft_offline behaviors

2024-06-24 Thread Jiaqi Yan
Add regression and new tests when hugepage has correctable memory errors, and how userspace wants to deal with it: * if enable_soft_offline=1, mapped hugepage is soft offlined * if enable_soft_offline=0, mapped hugepage is intact Free hugepages case is not explicitly covered by the tests. Hugepag

[PATCH v5 2/4] mm/memory-failure: userspace controls soft-offlining pages

2024-06-24 Thread Jiaqi Yan
Correctable memory errors are very common on servers with large amount of memory, and are corrected by ECC. Soft offline is kernel's additional recovery handling for memory pages having (excessive) corrected memory errors. Impacted page is migrated to a healthy page if inuse; the original page is d

[PATCH v5 1/4] mm/memory-failure: refactor log format in soft offline code

2024-06-24 Thread Jiaqi Yan
Logs from soft_offline_page and soft_offline_in_use_page have different formats than majority of the memory failure code: "Memory failure: 0x${pfn}: ${lower_case_message}" Convert them to the following format: "Soft offline: 0x${pfn}: ${lower_case_message}" No functional change in this comm

[PATCH v5 0/4] Userspace controls soft-offline pages

2024-06-24 Thread Jiaqi Yan
Correctable memory errors are very common on servers with large amount of memory, and are corrected by ECC, but with two pain points to users: 1. Correction usually happens on the fly and adds latency overhead 2. Not-fully-proved theory states excessive correctable memory errors can develop into

Re: [PATCH v4 2/4] mm/memory-failure: userspace controls soft-offlining pages

2024-06-24 Thread Jiaqi Yan
On Sun, Jun 23, 2024 at 8:41 PM Miaohe Lin wrote: > > On 2024/6/21 2:48, Jiaqi Yan wrote: > > Correctable memory errors are very common on servers with large > ... > > > > /* > > @@ -2749,8 +2760,9 @@ static int soft_offline_in_use_page(struct page *page) > > * @pfn: pfn to soft-offline > > *

Re: [PATCH 0/2] Modify the watchdog selftest for execution with

2024-06-24 Thread Laura Nao
On 6/21/24 23:08, Shuah Khan wrote: > On 6/18/24 07:40, Laura Nao wrote: >> Hi Shuah, >> >> On 6/7/24 23:07, Shuah Khan wrote: >>> On 6/7/24 03:53, Laura Nao wrote: Hi Shuah, On 6/7/24 01:03, Shuah Khan wrote: > On 6/6/24 03:57, Laura Nao wrote: >> Hi Shuah, >> >> On

Re: [PATCH v2 3/3] Turn off test_uffdio_wp if CONFIG_PTE_MARKER_UFFD_WP is not configured.

2024-06-24 Thread Peter Xu
On Mon, Jun 24, 2024 at 09:53:57AM -0400, Audra Mitchell wrote: > On Fri, Jun 21, 2024 at 05:27:43PM -0400, Peter Xu wrote: > > On Fri, Jun 21, 2024 at 02:12:24PM -0400, Audra Mitchell wrote: > > > If CONFIG_PTE_MARKER_UFFD_WP is disabled, then testing with test_uffdio_up > > > > Here you're talki

Re: [PATCH net 1/3] skmsg: null check for page in sk_msg_recvmsg

2024-06-24 Thread Eric Dumazet
On Mon, Jun 24, 2024 at 3:28 PM Geliang Tang wrote: > > From: Geliang Tang > > Run the following BPF selftests on loongarch: > > # ./test_progs -t sockmap_basic > > A Kernel panic occurs: > > ''' > Oops[#1]: > CPU: 22 PID: 2824 Comm: test_progs Tainted: G OE 6.10.0-rc2+ > #18 >

Re: [PATCH v2 3/3] Turn off test_uffdio_wp if CONFIG_PTE_MARKER_UFFD_WP is not configured.

2024-06-24 Thread Audra Mitchell
On Fri, Jun 21, 2024 at 05:27:43PM -0400, Peter Xu wrote: > On Fri, Jun 21, 2024 at 02:12:24PM -0400, Audra Mitchell wrote: > > If CONFIG_PTE_MARKER_UFFD_WP is disabled, then testing with test_uffdio_up > > Here you're talking about pte markers, then.. > > > enables calling uffdio_regsiter with t

Re: [PATCH net 2/3] inet: null check for close in inet_release

2024-06-24 Thread Eric Dumazet
On Mon, Jun 24, 2024 at 3:28 PM Geliang Tang wrote: > > From: Geliang Tang > > Run the following BPF selftests on loongarch: > > # ./test_progs -t sockmap_listen > > A Kernel panic occurs: > > ''' > Oops[#1]: > CPU: 49 PID: 233429 Comm: new_name Tainted: G OE 6.10.0-rc2+ > #20 >

[PATCH net 3/3] selftests/bpf: Null checks for link in bpf_tcp_ca

2024-06-24 Thread Geliang Tang
From: Geliang Tang Run BPF selftests bpf_tcp_ca on loongarch: # ./test_progs -t bpf_tcp_ca A "Segmentation fault" error occurs: ''' test_dctcp:PASS:bpf_dctcp__open_and_load 0 nsec test_dctcp:FAIL:bpf_map__attach_struct_ops unexpected error: -524 #29/1bpf_tcp_ca/dctcp:FAIL test_cubic:PA

[PATCH net 2/3] inet: null check for close in inet_release

2024-06-24 Thread Geliang Tang
From: Geliang Tang Run the following BPF selftests on loongarch: # ./test_progs -t sockmap_listen A Kernel panic occurs: ''' Oops[#1]: CPU: 49 PID: 233429 Comm: new_name Tainted: G OE 6.10.0-rc2+ #20 Hardware name: LOONGSON Dabieshan/Loongson-TC542F0, BIOS Loongson-UDK2018-V

[PATCH net 1/3] skmsg: null check for page in sk_msg_recvmsg

2024-06-24 Thread Geliang Tang
From: Geliang Tang Run the following BPF selftests on loongarch: # ./test_progs -t sockmap_basic A Kernel panic occurs: ''' Oops[#1]: CPU: 22 PID: 2824 Comm: test_progs Tainted: G OE 6.10.0-rc2+ #18 Hardware name: LOONGSON Dabieshan/Loongson-TC542F0, BIOS Loongson-UDK2018-V4

[PATCH net 0/3] Fixes for BPF selftests on loongarch

2024-06-24 Thread Geliang Tang
From: Geliang Tang When I ran BPF selftests on loongarch recently, some errors occur. Fix them in this set. Geliang Tang (3): skmsg: null check for page in sk_msg_recvmsg inet: null check for close in inet_release selftests/bpf: Null checks for link in bpf_tcp_ca net/core/skmsg.c

Re: [PATCH v7 08/16] riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb

2024-06-24 Thread Conor Dooley
On Mon, Jun 24, 2024 at 10:24:51AM +0200, Clément Léger wrote: > > > On 23/06/2024 17:42, Conor Dooley wrote: > > On Wed, Jun 19, 2024 at 01:35:18PM +0200, Clément Léger wrote: > >> The Zc* standard extension for code reduction introduces new extensions. > >> This patch adds support for Zca, Zcf,

[PATCH v1 2/2] selftests: rtc: rtctest: skip alarm test if alarm resolution is one minute

2024-06-24 Thread Emanuele Ghidoli
From: Emanuele Ghidoli There are two types of alarm tests: one that tests alarms on minute boundaries and another that tests alarms on second boundaries. For RTCs with one-minute resolution, only the minute boundary test should be run. Skip the second boundary alarm test for these RTCs. Signed-

[PATCH v1 1/2] rtc: ds1307: set one-minute alarm resolution for rx_8130

2024-06-24 Thread Emanuele Ghidoli
From: Emanuele Ghidoli Set one-minute alarm resolution for the rx_8130 by setting the RTC_FEATURE_ALARM_RES_MINUTE flag according to the hw capabilities. Additionally, set the no_upd_irq flag to disable update interrupts, as it is not possible to generate update IRQs. hwclock fails reading the d

[PATCH v1 0/2] Fixes for RX8310 RTC Configuration and rtctest Alarm

2024-06-24 Thread Emanuele Ghidoli
From: Emanuele Ghidoli Hi, I am submitting two patches related to the RX8310 RTC configuration: 1. **Correct RX8310 RTC Features Configuration:** - Sets one-minute alarm resolution. - Disables update IRQ. Without this patch, if the interrupt is configured in the device tree, `hwcl

Re: [PATCH HID 06/12] HID: bpf: add HID-BPF hooks for hid_hw_output_report

2024-06-24 Thread Benjamin Tissoires
On Jun 21 2024, Alexei Starovoitov wrote: > On Fri, Jun 21, 2024 at 9:08 AM Benjamin Tissoires wrote: > > > > On Jun 21 2024, Alexei Starovoitov wrote: > > > On Fri, Jun 21, 2024 at 1:56 AM Benjamin Tissoires > > > wrote: > > > > > > > > Same story than hid_hw_raw_requests: > > > > > > > > This

Re: [PATCH v7 08/16] riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb

2024-06-24 Thread Clément Léger
On 23/06/2024 17:42, Conor Dooley wrote: > On Wed, Jun 19, 2024 at 01:35:18PM +0200, Clément Léger wrote: >> The Zc* standard extension for code reduction introduces new extensions. >> This patch adds support for Zca, Zcf, Zcd and Zcb. Zce, Zcmt and Zcmp >> are left out of this patch since they

Re: [PATCH] selftests/mm: Introduce a test program to assess swap entry allocation for thp_swapout

2024-06-24 Thread Barry Song
On Mon, Jun 24, 2024 at 7:01 PM Huang, Ying wrote: > > Barry Song <21cn...@gmail.com> writes: > > > On Mon, Jun 24, 2024 at 3:44 PM Huang, Ying wrote: > >> > >> Barry Song <21cn...@gmail.com> writes: > >> > >> > On Fri, Jun 21, 2024 at 9:24 PM Huang, Ying wrote: > >> >> > >> >> Barry Song <21cn.

[PATCH v16 9/9] selftests/udmabuf: Add tests to verify data after page migration

2024-06-24 Thread Vivek Kasireddy
Since the memfd pages associated with a udmabuf may be migrated as part of udmabuf create, we need to verify the data coherency after successful migration. The new tests added in this patch try to do just that using 4k sized pages and also 2 MB sized huge pages for the memfd. Successful completion

Re: [PATCH] selftests/mm: Introduce a test program to assess swap entry allocation for thp_swapout

2024-06-24 Thread Huang, Ying
Barry Song <21cn...@gmail.com> writes: > On Mon, Jun 24, 2024 at 3:44 PM Huang, Ying wrote: >> >> Barry Song <21cn...@gmail.com> writes: >> >> > On Fri, Jun 21, 2024 at 9:24 PM Huang, Ying wrote: >> >> >> >> Barry Song <21cn...@gmail.com> writes: >> >> >> >> > On Fri, Jun 21, 2024 at 7:25 PM Rya