Re: [PATCH v3] mm: compaction: update the cc->nr_migratepages when allocating or freeing the freepages

2024-02-19 Thread Vlastimil Babka
On 2/20/24 07:16, Baolin Wang wrote: > Currently we will use 'cc->nr_freepages >= cc->nr_migratepages' comparison > to ensure that enough freepages are isolated in isolate_freepages(), however > it just decreases the cc->nr_freepages without updating cc->nr_migratepages > in compaction_alloc(),

[PATCH v3] mm: compaction: update the cc->nr_migratepages when allocating or freeing the freepages

2024-02-19 Thread Baolin Wang
Currently we will use 'cc->nr_freepages >= cc->nr_migratepages' comparison to ensure that enough freepages are isolated in isolate_freepages(), however it just decreases the cc->nr_freepages without updating cc->nr_migratepages in compaction_alloc(), which will waste more CPU cycles and cause too

Re: WARNING in shmem_release_dquot

2024-02-19 Thread Hugh Dickins
On Mon, 29 Jan 2024, Ubisectech Sirius wrote: > Hello. > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > Recently, our team has discovered a issue in Linux kernel > 6.8.0-rc1-gecb1b8288dc7. Attached to the email were a POC file of the issue. > > Stack dump: > [

Re: [v2 PATCH 0/1] ALSA: virtio: add support for audio controls

2024-02-19 Thread Anton Yakovlev
Hi Marcin, Thanks for the help! On 20.02.2024 02:24, Marcin Radomski wrote: Thanks Anton for the reupload. I tested this series with a 6.1 kernel guest on a proprietary hypervisor. The controls exposed by the host (BOOLEAN/INTEGER ones, as that was all I could get) worked as expected when

Re: [PATCH 10/10] csky/vdso: Use generic union vdso_data_store

2024-02-19 Thread Guo Ren
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen wrote: > > There is already a generic union definition for vdso_data_store in vdso > datapage header. > > Use this definition to prevent code duplication. > > Signed-off-by: Anna-Maria Behnsen > Cc: Guo Ren > Cc: linux-c...@vger.kernel.org >

Re: [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery

2024-02-19 Thread Guo Ren
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen wrote: > > CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent > ifdeffery is superfluous. Clean it up. > > Signed-off-by: Anna-Maria Behnsen > Cc: Guo Ren > Cc: linux-c...@vger.kernel.org > --- > arch/csky/include/asm/vdso.h

Re: [syzbot] [virtualization?] linux-next boot error: WARNING: refcount bug in __free_pages_ok

2024-02-19 Thread Andrew Morton
On Mon, 19 Feb 2024 02:35:20 -0500 "Michael S. Tsirkin" wrote: > On Sun, Feb 18, 2024 at 09:06:18PM -0800, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:d37e1e4c52bc Add linux-next specific files for 20240216 > > git tree: linux-next > >

[PATCH v3] ring-buffer: Simplify reservation with try_cmpxchg() loop

2024-02-19 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Instead of using local_add_return() to reserve the ring buffer data, Mathieu Desnoyers suggested using local_cmpxchg(). This would simplify the reservation with the time keeping code. Although, it does not get rid of the double time stamps (before_stamp and

Re: [PATCH v2] ring-buffer: Simplify reservation with try_cmpxchg() loop

2024-02-19 Thread Steven Rostedt
On Mon, 19 Feb 2024 17:30:03 -0500 Steven Rostedt wrote: > - /*C*/ write = local_add_return(info->length, _page->write); > + /*C*/ if (!local_try_cmpxchg(_page->write, , w + > info->length)) { > + if (info.add_timestamp & (RB_ADD_STAMP_FORCE | > RB_ADD_STAMP_EXTEND)) >

Re: [RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Jarkko Sakkinen
On Mon Feb 19, 2024 at 10:25 PM UTC, Haitao Huang wrote: > On Mon, 19 Feb 2024 14:42:29 -0600, Jarkko Sakkinen > wrote: > > > On Mon Feb 19, 2024 at 3:56 PM UTC, Dave Hansen wrote: > >> On 2/19/24 07:39, Haitao Huang wrote: > >> > Remove all boolean parameters for 'reclaim' from the function >

[PATCH v2] ring-buffer: Simplify reservation with try_cmpxchg() loop

2024-02-19 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Instead of using local_add_return() to reserve the ring buffer data, Mathieu Desnoyers suggested using local_cmpxchg(). This would simplify the reservation with the time keeping code. Although, it does not get rid of the double time stamps (before_stamp and

Re: [RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Haitao Huang
On Mon, 19 Feb 2024 14:42:29 -0600, Jarkko Sakkinen wrote: On Mon Feb 19, 2024 at 3:56 PM UTC, Dave Hansen wrote: On 2/19/24 07:39, Haitao Huang wrote: > Remove all boolean parameters for 'reclaim' from the function > sgx_alloc_epc_page() and its callers by making two versions of each >

[PATCH v3 2/2] ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 8.0 Wi-Fi

2024-02-19 Thread Bryant Mairs
Add support for this tablet based on the MSM8226 SoC, codenamed "milletwifi". Acked-by: Linus Walleij Reviewed-by: Luca Weiss Signed-off-by: Bryant Mairs --- arch/arm/boot/dts/qcom/Makefile | 1 + .../qcom/qcom-apq8026-samsung-milletwifi.dts | 573 ++ 2 files

[PATCH v3 1/2] dt-bindings: arm: qcom: Document samsung,milletwifi device

2024-02-19 Thread Bryant Mairs
Add binding documentation for Samsung Galaxy Tab 4 8.0 Wi-Fi tablet which is based on Snapdragon 400 (apq8026) SoC. Acked-by: Linus Walleij Acked-by: Conor Dooley Signed-off-by: Bryant Mairs --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 0/2] Add samsung-milletwifi

2024-02-19 Thread Bryant Mairs
This series adds support for samsung-milletwifi, the smaller cousin to samsung-matisselte. I've used the manufacturer's naming convention for consistency. Hardware currently supported: - Display - Cover detection - Physical buttons - Touchscreen and touchkeys - Accelerometer Acked-by: Linus

Re: [RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Jarkko Sakkinen
On Mon Feb 19, 2024 at 3:56 PM UTC, Dave Hansen wrote: > On 2/19/24 07:39, Haitao Huang wrote: > > Remove all boolean parameters for 'reclaim' from the function > > sgx_alloc_epc_page() and its callers by making two versions of each > > function. > > > > Also opportunistically remove non-static

Re: [RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Jarkko Sakkinen
On Mon Feb 19, 2024 at 3:39 PM UTC, Haitao Huang wrote: > Remove all boolean parameters for 'reclaim' from the function > sgx_alloc_epc_page() and its callers by making two versions of each > function. > > Also opportunistically remove non-static declaration of > __sgx_alloc_epc_page() and a typo

Re: [PATCH v9 10/15] x86/sgx: Add EPC reclamation in cgroup try_charge()

2024-02-19 Thread Jarkko Sakkinen
On Mon Feb 19, 2024 at 3:12 PM UTC, Haitao Huang wrote: > On Tue, 13 Feb 2024 19:52:25 -0600, Jarkko Sakkinen > wrote: > > > On Tue Feb 13, 2024 at 1:15 AM EET, Haitao Huang wrote: > >> Hi Jarkko > >> > >> On Mon, 12 Feb 2024 13:55:46 -0600, Jarkko Sakkinen > >> wrote: > >> > >> > On Mon Feb

Re: [PATCH v17 3/6] tracing: Add snapshot refcount

2024-02-19 Thread Steven Rostedt
On Mon, 19 Feb 2024 13:17:54 -0500 Steven Rostedt wrote: > On Tue, 13 Feb 2024 11:49:42 + > Vincent Donnefort wrote: > > > @@ -9678,7 +9739,9 @@ trace_array_create_systems(const char *name, const > > char *systems) > > raw_spin_lock_init(>start_lock); > > > > tr->max_lock =

Re: [PATCH v17 3/6] tracing: Add snapshot refcount

2024-02-19 Thread Steven Rostedt
On Tue, 13 Feb 2024 11:49:42 + Vincent Donnefort wrote: > @@ -9678,7 +9739,9 @@ trace_array_create_systems(const char *name, const char > *systems) > raw_spin_lock_init(>start_lock); > > tr->max_lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; > - > +#ifdef

Re: [PATCH v11 0/4] add zynqmp TCM bindings

2024-02-19 Thread Tanmay Shah
Hello, By mistake same set of patches were sent twice in same git send-email command. Anyone can be reviewed. Please let me know if I need to take any action to fix it. Thanks. On 2/19/24 11:44 AM, Tanmay Shah wrote: > Tightly-Coupled Memories(TCMs) are low-latency memory that provides >

[PATCH v11 4/4] remoteproc: zynqmp: parse TCM from device tree

2024-02-19 Thread Tanmay Shah
ZynqMP TCM information was fixed in driver. Now ZynqMP TCM information is available in device-tree. Parse TCM information in driver as per new bindings. Signed-off-by: Tanmay Shah --- Changes in v11: - Remove redundant initialization of the variable - return correct error code if memory

[PATCH v11 3/4] dts: zynqmp: add properties for TCM in remoteproc

2024-02-19 Thread Tanmay Shah
Add properties as per new bindings in zynqmp remoteproc node to represent TCM address and size. This patch also adds alternative remoteproc node to represent remoteproc cluster in split mode. By default lockstep mode is enabled and users should disable it before using split mode dts. Both

[PATCH v11 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-19 Thread Tanmay Shah
From: Radhey Shyam Pandey Introduce bindings for TCM memory address space on AMD-xilinx Zynq UltraScale+ platform. It will help in defining TCM in device-tree and make it's access platform agnostic and data-driven. Tightly-coupled memories(TCMs) are low-latency memory that provides predictable

[PATCH v11 0/4] add zynqmp TCM bindings

2024-02-19 Thread Tanmay Shah
Tightly-Coupled Memories(TCMs) are low-latency memory that provides predictable instruction execution and predictable data load/store timing. Each Cortex-R5F processor contains exclusive two 64 KB memory banks on the ATCM and BTCM ports, for a total of 128 KB of memory. In lockstep mode, both

[PATCH v11 1/4] remoteproc: zynqmp: fix lockstep mode memory region

2024-02-19 Thread Tanmay Shah
In lockstep mode, r5 core0 uses TCM of R5 core1. Following is lockstep mode memory region as per hardware reference manual. | *TCM* | *R5 View* | *Linux view* | | R5_0 ATCM (128 KB) | 0x_ | 0xFFE0_ | | R5_0 BTCM (128 KB) | 0x0002_ | 0xFFE2_ |

[PATCH v11 4/4] remoteproc: zynqmp: parse TCM from device tree

2024-02-19 Thread Tanmay Shah
ZynqMP TCM information was fixed in driver. Now ZynqMP TCM information is available in device-tree. Parse TCM information in driver as per new bindings. Signed-off-by: Tanmay Shah --- Changes in v11: - Remove redundant initialization of the variable - return correct error code if memory

[PATCH v11 3/4] dts: zynqmp: add properties for TCM in remoteproc

2024-02-19 Thread Tanmay Shah
Add properties as per new bindings in zynqmp remoteproc node to represent TCM address and size. This patch also adds alternative remoteproc node to represent remoteproc cluster in split mode. By default lockstep mode is enabled and users should disable it before using split mode dts. Both

[PATCH v11 1/4] remoteproc: zynqmp: fix lockstep mode memory region

2024-02-19 Thread Tanmay Shah
In lockstep mode, r5 core0 uses TCM of R5 core1. Following is lockstep mode memory region as per hardware reference manual. | *TCM* | *R5 View* | *Linux view* | | R5_0 ATCM (128 KB) | 0x_ | 0xFFE0_ | | R5_0 BTCM (128 KB) | 0x0002_ | 0xFFE2_ |

[PATCH v11 2/4] dt-bindings: remoteproc: add Tightly Coupled Memory (TCM) bindings

2024-02-19 Thread Tanmay Shah
From: Radhey Shyam Pandey Introduce bindings for TCM memory address space on AMD-xilinx Zynq UltraScale+ platform. It will help in defining TCM in device-tree and make it's access platform agnostic and data-driven. Tightly-coupled memories(TCMs) are low-latency memory that provides predictable

[PATCH v11 0/4] add zynqmp TCM bindings

2024-02-19 Thread Tanmay Shah
Tightly-Coupled Memories(TCMs) are low-latency memory that provides predictable instruction execution and predictable data load/store timing. Each Cortex-R5F processor contains exclusive two 64 KB memory banks on the ATCM and BTCM ports, for a total of 128 KB of memory. In lockstep mode, both

Re: [v2 PATCH 0/1] ALSA: virtio: add support for audio controls

2024-02-19 Thread Marcin Radomski
Thanks Anton for the reupload. I tested this series with a 6.1 kernel guest on a proprietary hypervisor. The controls exposed by the host (BOOLEAN/INTEGER ones, as that was all I could get) worked as expected when adjusted via ALSA APIs. Reviewed-by: Marcin Radomski Tested-By: Marcin Radomski

[PATCH] vduse: implement DMA sync callbacks

2024-02-19 Thread Maxime Coquelin
Since commit 295525e29a5b ("virtio_net: merge dma operations when filling mergeable buffers"), VDUSE device require support for DMA's .sync_single_for_cpu() operation as the memory is non-coherent between the device and CPU because of the use of a bounce buffer. This patch implements both

Re: [PATCH v7 22/36] function_graph: Add a new entry handler with parent_ip and ftrace_regs

2024-02-19 Thread Steven Rostedt
On Wed, 7 Feb 2024 00:11:34 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Add a new entry handler to fgraph_ops as 'entryregfunc' which takes > parent_ip and ftrace_regs. Note that the 'entryfunc' and 'entryregfunc' > are mutual exclusive. You can set only

Re: [RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Dave Hansen
On 2/19/24 07:39, Haitao Huang wrote: > Remove all boolean parameters for 'reclaim' from the function > sgx_alloc_epc_page() and its callers by making two versions of each > function. > > Also opportunistically remove non-static declaration of > __sgx_alloc_epc_page() and a typo > >

[PATCH 10/10] csky/vdso: Use generic union vdso_data_store

2024-02-19 Thread Anna-Maria Behnsen
There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Guo Ren Cc: linux-c...@vger.kernel.org --- arch/csky/kernel/vdso.c | 10 ++ 1 file changed, 2 insertions(+),

[PATCH 03/10] csky/vdso: Remove superfluous ifdeffery

2024-02-19 Thread Anna-Maria Behnsen
CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent ifdeffery is superfluous. Clean it up. Signed-off-by: Anna-Maria Behnsen Cc: Guo Ren Cc: linux-c...@vger.kernel.org --- arch/csky/include/asm/vdso.h | 5 - arch/csky/kernel/vdso.c | 4 2 files changed, 9

[RFC PATCH] x86/sgx: Remove 'reclaim' boolean parameters

2024-02-19 Thread Haitao Huang
Remove all boolean parameters for 'reclaim' from the function sgx_alloc_epc_page() and its callers by making two versions of each function. Also opportunistically remove non-static declaration of __sgx_alloc_epc_page() and a typo Signed-off-by: Haitao Huang Suggested-by: Jarkko Sakkinen ---

Re: [PATCH v9 10/15] x86/sgx: Add EPC reclamation in cgroup try_charge()

2024-02-19 Thread Haitao Huang
On Tue, 13 Feb 2024 19:52:25 -0600, Jarkko Sakkinen wrote: On Tue Feb 13, 2024 at 1:15 AM EET, Haitao Huang wrote: Hi Jarkko On Mon, 12 Feb 2024 13:55:46 -0600, Jarkko Sakkinen wrote: > On Mon Feb 5, 2024 at 11:06 PM EET, Haitao Huang wrote: >> From: Kristen Carlson Accardi >> >> When

[PATCH] arm64: dts: qcom: Fix type of "wdog" IRQs for remoteprocs

2024-02-19 Thread Luca Weiss
,sm8250-adsp-pas"; reg = <0 0x1730 0 0x100>; - interrupts-extended = < 6 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = < 6 IRQ_TYPE_EDGE_RISING>, <_adsp_in 0 IRQ_TYPE_EDGE_RISING>, <_adsp_in 1 IRQ_TYPE_EDGE_RISING>, <_adsp_in 2 IRQ_TYPE_EDGE_RISING>, --- base-commit: 35a4fdde2466b9d90af297f249436a270ef9d30e change-id: 20240219-remoteproc-irqs-63f3293af260 Best regards, -- Luca Weiss

Re: [PATCH v7 23/36] function_graph: Add a new exit handler with parent_ip and ftrace_regs

2024-02-19 Thread Google
Hi Steve, On Sun, 18 Feb 2024 11:53:28 +0900 Masami Hiramatsu (Google) wrote: > On Fri, 16 Feb 2024 17:51:08 +0900 > Masami Hiramatsu (Google) wrote: > > > > > @@ -798,10 +798,6 @@ ftrace_pop_return_trace(struct ftrace_graph_ret > > > > *trace, unsigned long *ret, > > > > > > > >

Re: [PATCH v9 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-02-19 Thread Huang, Kai

[PATCH] dax: constify the struct device_type usage

2024-02-19 Thread Ricardo B. Marliere
ase-commit: b401b621758e46812da61fa58a67c3fd8d91de0d change-id: 20240219-device_cleanup-dax-d82fd0c67ffd Best regards, -- Ricardo B. Marliere

Re: [PATCH] tracing: Inform kmemleak of saved_cmdlines allocation

2024-02-19 Thread Catalin Marinas
On Wed, Feb 14, 2024 at 10:26:14AM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The allocation of the struct saved_cmdlines_buffer structure changed from: > > s = kmalloc(sizeof(*s), GFP_KERNEL); > s->saved_cmdlines = kmalloc_array(TASK_COMM_LEN, val,

Re: [PATCH v4 6/6] LoongArch: Add pv ipi support on LoongArch system

2024-02-19 Thread maobibo
On 2024/2/19 下午5:02, Huacai Chen wrote: On Mon, Feb 19, 2024 at 3:37 PM maobibo wrote: On 2024/2/19 下午3:16, Huacai Chen wrote: On Mon, Feb 19, 2024 at 12:18 PM maobibo wrote: On 2024/2/19 上午10:45, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 1, 2024 at 11:20 AM Bibo Mao wrote: On

Re: [PATCH v4 4/6] LoongArch: Add paravirt interface for guest kernel

2024-02-19 Thread maobibo
On 2024/2/19 下午5:38, Huacai Chen wrote: On Mon, Feb 19, 2024 at 5:21 PM maobibo wrote: On 2024/2/19 下午4:48, Huacai Chen wrote: On Mon, Feb 19, 2024 at 12:11 PM maobibo wrote: On 2024/2/19 上午10:42, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 1, 2024 at 11:19 AM Bibo Mao wrote: The

Re: [PATCH v4 4/6] LoongArch: Add paravirt interface for guest kernel

2024-02-19 Thread Huacai Chen
On Mon, Feb 19, 2024 at 5:21 PM maobibo wrote: > > > > On 2024/2/19 下午4:48, Huacai Chen wrote: > > On Mon, Feb 19, 2024 at 12:11 PM maobibo wrote: > >> > >> > >> > >> On 2024/2/19 上午10:42, Huacai Chen wrote: > >>> Hi, Bibo, > >>> > >>> On Thu, Feb 1, 2024 at 11:19 AM Bibo Mao wrote: > >

Re: [PATCH v18 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-19 Thread Ankit Agrawal
>> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c >> b/drivers/vfio/pci/nvgrace-gpu/main.c new file mode 100644 >> index ..5a251a6a782e >> --- /dev/null >> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c >> @@ -0,0 +1,888 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> +/* >> + *

Re: [PATCH v18 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-19 Thread Zhi Wang
On Fri, 16 Feb 2024 08:31:28 +0530 wrote: > From: Ankit Agrawal > > NVIDIA's upcoming Grace Hopper Superchip provides a PCI-like device > for the on-chip GPU that is the logical OS representation of the > internal proprietary chip-to-chip cache coherent interconnect. > > The device is

Re: [PATCH v4 4/6] LoongArch: Add paravirt interface for guest kernel

2024-02-19 Thread maobibo
On 2024/2/19 下午4:48, Huacai Chen wrote: On Mon, Feb 19, 2024 at 12:11 PM maobibo wrote: On 2024/2/19 上午10:42, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 1, 2024 at 11:19 AM Bibo Mao wrote: The patch adds paravirt interface for guest kernel, function pv_guest_initi() firstly checks

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-19 Thread Dan Carpenter
On Fri, Feb 16, 2024 at 05:17:20PM -0800, Dan Williams wrote: > > commit 807fbe9cac9b190dab83e3ff377a30d18859c8ab > > Author: Ira Weiny > > Date: Wed Feb 14 15:25:24 2024 -0800 > > > > Revert "acpi/ghes: Process CXL Component Events" > > > > This reverts commit

Re: [PATCH v4 6/6] LoongArch: Add pv ipi support on LoongArch system

2024-02-19 Thread Huacai Chen
On Mon, Feb 19, 2024 at 3:37 PM maobibo wrote: > > > > On 2024/2/19 下午3:16, Huacai Chen wrote: > > On Mon, Feb 19, 2024 at 12:18 PM maobibo wrote: > >> > >> > >> > >> On 2024/2/19 上午10:45, Huacai Chen wrote: > >>> Hi, Bibo, > >>> > >>> On Thu, Feb 1, 2024 at 11:20 AM Bibo Mao wrote: > >

Re: [PATCH v4 4/6] LoongArch: Add paravirt interface for guest kernel

2024-02-19 Thread Huacai Chen
On Mon, Feb 19, 2024 at 12:11 PM maobibo wrote: > > > > On 2024/2/19 上午10:42, Huacai Chen wrote: > > Hi, Bibo, > > > > On Thu, Feb 1, 2024 at 11:19 AM Bibo Mao wrote: > >> > >> The patch adds paravirt interface for guest kernel, function > >> pv_guest_initi() firstly checks whether system runs