Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Huang, Kai
On Thu, 2023-10-12 at 08:27 -0500, Haitao Huang wrote: > On Tue, 10 Oct 2023 19:51:17 -0500, Huang, Kai wrote: > [...] > > (btw, even you track VA/SECS pages in unreclaimable list, given they > > both have > > 'enclave' as the owner, do you still need SGX_EPC_OWNER_ENCL and > > SGX_EPC_OWNER_PA

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Huang, Kai
On Wed, 2023-10-11 at 01:14 +, Huang, Kai wrote: > On Tue, 2023-10-10 at 11:49 -0500, Haitao Huang wrote: > > > > > > This patch adds SGX_ENCL_NO_MEMORY.  I guess we can use it for virtual  > > > EPC too? > > > > > > > That flag is set for enclaves, do you mean we set similar flag in vepc 

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread Google
Hi Wuqiang, On Mon, 16 Oct 2023 10:45:30 +0800 "wuqiang.matt" wrote: > On 2023/10/16 07:26, Masami Hiramatsu (Google) wrote: > > On Mon, 16 Oct 2023 00:06:11 +0800 > > "wuqiang.matt" wrote: > > > >> On 2023/10/15 23:43, Masami Hiramatsu (Google) wrote: > >>> On Sun, 15 Oct 2023 13:32:47 +0800

Re: [PATCH RFC 04/37] mm: Add MIGRATE_METADATA allocation policy

2023-10-16 Thread Alexandru Elisei
Hello, On Thu, Oct 12, 2023 at 10:28:24AM +0900, Hyesoo Yu wrote: > On Wed, Aug 23, 2023 at 02:13:17PM +0100, Alexandru Elisei wrote: > > Some architectures implement hardware memory coloring to catch incorrect > > usage of memory allocation. One such architecture is arm64, which calls its > > har

Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA

2023-10-16 Thread Alexandru Elisei
Hi, On Thu, Oct 12, 2023 at 10:25:11AM +0900, Hyesoo Yu wrote: > On Wed, Aug 23, 2023 at 02:13:19PM +0100, Alexandru Elisei wrote: > > pcp lists keep MIGRATE_METADATA pages on the MIGRATE_MOVABLE list. Make > > sure pages from the movable list are allocated only when the > > ALLOC_FROM_METADATA al

Re: [PATCH RFC 17/37] arm64: mte: Disable dynamic tag storage management if HW KASAN is enabled

2023-10-16 Thread Alexandru Elisei
Hi, On Thu, Oct 12, 2023 at 10:35:05AM +0900, Hyesoo Yu wrote: > On Wed, Aug 23, 2023 at 02:13:30PM +0100, Alexandru Elisei wrote: > > Reserving the tag storage associated with a tagged page requires the > > ability to migrate existing data if the tag storage is in use for data. > > > > The kerne

Re: [PATCH v5] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-10-16 Thread Daniel Bristot de Oliveira
>> In any case, as you've pointed out, duplicates can arise from names in code >> that is not intended to be a module. >> Therefore, relying solely on the module name would not fully address the >> problem you initially aimed to solve. > > From my POV: > > The source path and the line number is

[PATCH] neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section

2023-10-16 Thread Geert Uytterhoeven
When CONFIG_IPV6=n, and building with W=1: In file included from include/trace/define_trace.h:102, from include/trace/events/neigh.h:255, from net/core/net-traces.c:51: include/trace/events/neigh.h: In function ‘trace_event_raw_event_neigh_create’

Re: [PATCH v10 3/5] kprobes: kretprobe scalability improvement with objpool

2023-10-16 Thread Google
On Sun, 15 Oct 2023 13:32:49 +0800 "wuqiang.matt" wrote: > kretprobe is using freelist to manage return-instances, but freelist, > as LIFO queue based on singly linked list, scales badly and reduces > the overall throughput of kretprobed routines, especially for high > contention scenarios. > >

Re: [PATCH v10 4/5] kprobes: freelist.h removed

2023-10-16 Thread Google
Hi Peter, This freelist has been introduced by you, is it OK to remove this because no other user exists? Thank you, On Sun, 15 Oct 2023 13:32:50 +0800 "wuqiang.matt" wrote: > This patch will remove freelist.h from kernel source tree, since the > only use cases (kretprobe and rethook) are conv

Re: [PATCH 1/3] dt-bindings: usb: fsa4480: Add data-lanes property to endpoint

2023-10-16 Thread Rob Herring
On Fri, Oct 13, 2023 at 01:38:05PM +0200, Luca Weiss wrote: > Allow specifying data-lanes to reverse the SBU muxing orientation where > necessary by the hardware design. What situation in the hardware design makes this necessary. Please describe the problem. > > Signed-off-by: Luca Weiss > ---

Re: [PATCH 1/3] dt-bindings: usb: fsa4480: Add data-lanes property to endpoint

2023-10-16 Thread Neil Armstrong
On 16/10/2023 16:22, Rob Herring wrote: On Fri, Oct 13, 2023 at 01:38:05PM +0200, Luca Weiss wrote: Allow specifying data-lanes to reverse the SBU muxing orientation where necessary by the hardware design. What situation in the hardware design makes this necessary. Please describe the problem.

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread wuqiang.matt
On 2023/10/16 20:18, Masami Hiramatsu (Google) wrote: Hi Wuqiang, On Mon, 16 Oct 2023 10:45:30 +0800 "wuqiang.matt" wrote: On 2023/10/16 07:26, Masami Hiramatsu (Google) wrote: On Mon, 16 Oct 2023 00:06:11 +0800 "wuqiang.matt" wrote: On 2023/10/15 23:43, Masami Hiramatsu (Google) wrote:

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread wuqiang.matt
On 2023/10/16 20:18, Masami Hiramatsu (Google) wrote: Hi Wuqiang, On Mon, 16 Oct 2023 10:45:30 +0800 "wuqiang.matt" wrote: On 2023/10/16 07:26, Masami Hiramatsu (Google) wrote: On Mon, 16 Oct 2023 00:06:11 +0800 "wuqiang.matt" wrote: On 2023/10/15 23:43, Masami Hiramatsu (Google) wrote:

Re: [PATCH v2] bus: mhi: host: Add tracing support

2023-10-16 Thread Steven Rostedt
On Fri, 13 Oct 2023 15:22:19 +0530 Krishna chaitanya chundru wrote: > +++ b/include/trace/events/mhi_host.h > @@ -0,0 +1,287 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. > + */ > + > +#undef TRACE_SYSTEM > +

Re: [PATCH v10 3/5] kprobes: kretprobe scalability improvement with objpool

2023-10-16 Thread wuqiang.matt
On 2023/10/16 21:21, Masami Hiramatsu (Google) wrote: On Sun, 15 Oct 2023 13:32:49 +0800 "wuqiang.matt" wrote: kretprobe is using freelist to manage return-instances, but freelist, as LIFO queue based on singly linked list, scales badly and reduces the overall throughput of kretprobed routines

Re: [RFC PATCH bpf-next] bpf: change syscall_nr type to int in struct syscall_tp_t

2023-10-16 Thread Steven Rostedt
On Fri, 13 Oct 2023 12:43:18 -0700 Andrii Nakryiko wrote: > > Correct. My Ack is based on the current way things are done upstream. > > It was just that linux-rt showed the issue, where the code was not as > > robust as it should have been. To me this was a correctness issue, not > > an issue th

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread wuqiang.matt
Hello Masami, Here's the updated version for your review. --- include/linux/objpool.h | 176 + lib/Makefile| 2 +- lib/objpool.c | 286 3 files changed, 463 insertions(+), 1 deletion(-) create mode 100644

Re: [PATCH] dt-bindings: Drop kernel copy of common reserved-memory bindings

2023-10-16 Thread Mathieu Poirier
On Fri, Oct 13, 2023 at 03:08:49PM -0500, Rob Herring wrote: > The common reserved-memory bindings have recently been copied from the > kernel tree into dtschema. The preference is to host common, stable > bindings in dtschema. As reserved-memory is documented in the DT Spec, > it meets the criteri

Re: [PATCH v5 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-16 Thread Verma, Vishal L
On Thu, 2023-10-12 at 10:40 +0200, David Hildenbrand wrote: > On 12.10.23 07:53, Verma, Vishal L wrote: > > On Mon, 2023-10-09 at 17:04 +0200, David Hildenbrand wrote: > > > On 07.10.23 10:55, Huang, Ying wrote: > > > > Vishal Verma writes: > <..> > > + > > +   for (cur_start = start; cur_sta

Re: [PATCH v2] arm64: dts: qcom: sc7280: Add ports subnodes in usb/dp qmpphy node

2023-10-16 Thread Bjorn Andersson
On Fri, 29 Sep 2023 14:51:22 +0200, Luca Weiss wrote: > Add the USB3+DP Combo QMP PHY port subnodes to facilitate the > description of the connection between the hardware blocks. > > Put it in the SoC DTSI to avoid duplication in the device DTs. > > Applied, thanks! [1/1] arm64: dts: qcom: s

Re: [PATCH] soc: qcom: pmic_glink_altmode: Print error when retimer setup fails

2023-10-16 Thread Bjorn Andersson
On Mon, Oct 16, 2023 at 08:56:31AM +0200, Luca Weiss wrote: > On Mon Oct 16, 2023 at 5:18 AM CEST, Bjorn Andersson wrote: > > On Fri, Oct 13, 2023 at 03:56:40PM +0200, Luca Weiss wrote: > > > It can be useful to know with which return value the retimer_set call > > > failed, so include this info in

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Haitao Huang
On Mon, 16 Oct 2023 05:57:36 -0500, Huang, Kai wrote: On Thu, 2023-10-12 at 08:27 -0500, Haitao Huang wrote: On Tue, 10 Oct 2023 19:51:17 -0500, Huang, Kai wrote: [...] > (btw, even you track VA/SECS pages in unreclaimable list, given they > both have > 'enclave' as the owner, do you still

[PATCH] arm64: dts: qcom: msm8939-longcheer-l9100: Add proximity-near-level

2023-10-16 Thread André Apitzsch
tr559"; reg = <0x23>; + proximity-near-level = <75>; vdd-supply = <&pm8916_l17>; vddio-supply = <&pm8916_l5>; --- base-commit: 4d0515b235dec789578d135a5db586b25c5870cb change-id: 20231016-bqm5_

[PATCH 00/11] splice(file<>pipe) I/O on file as-if O_NONBLOCK

2023-10-16 Thread Ahelenia Ziemiańska
Hi! As it stands, splice(file -> pipe): 1. locks the pipe, 2. does a read from the file, 3. unlocks the pipe. For reading from regular files and blcokdevs this makes no difference. But if the file is a tty or a socket, for example, this means that until data appears, which it may never do, every

[PATCH 04/11] tracing: tracing_buffers_splice_read: behave as-if non-blocking I/O

2023-10-16 Thread Ahelenia Ziemiańska
Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemiańska --- kernel/trace/trace.c | 32

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Huang, Kai
> > > From this perspective, I think the current implementation is > "well-defined": EPC cgroup limits for VMs are only enforced at VM launch > time, not runtime. In practice, SGX VM can be launched only with fixed > EPC size and all those EPCs are fully committed to the VM once launched.

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Sean Christopherson
On Mon, Oct 16, 2023, Haitao Huang wrote: > From this perspective, I think the current implementation is "well-defined": > EPC cgroup limits for VMs are only enforced at VM launch time, not runtime. > In practice, SGX VM can be launched only with fixed EPC size and all those > EPCs are fully commi

[PATCH] fprobe: Fix to ensure the number of active retprobes is not zero

2023-10-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) The number of active retprobes can be zero but it is not acceptable, so return EINVAL error if detected. Reported-by: wuqiang.matt Closes: https://lore.kernel.org/all/20231016222103.cb9f426edc60220eabd8a...@kernel.org/ Fixes: 5b0ab78998e3 ("fprobe: Add exit_hand

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Haitao Huang
Hi Sean On Mon, 16 Oct 2023 16:32:31 -0500, Sean Christopherson wrote: On Mon, Oct 16, 2023, Haitao Huang wrote: From this perspective, I think the current implementation is "well-defined": EPC cgroup limits for VMs are only enforced at VM launch time, not runtime. In practice, SGX VM

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Haitao Huang
On Mon, 16 Oct 2023 16:09:52 -0500, Huang, Kai wrote: [...] still need to fix the bug mentioned above here. I really think you should just go this simple way: When you want to take EPC back from VM, kill the VM. My only concern is that this is a compromise due to current limitation (no o

Re: [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Verma, Vishal L
On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: > Vishal Verma wrote: > > <..> > > + > > +   rc = kstrtobool(buf, &val); > > +   if (rc) > > +   return rc; > > Perhaps: > > if (dev_dax->memmap_on_memory == val) > return len; > > ...and skip the check below wh

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread Google
Hi Wuqiang, This looks good to me. Can you update the series on top of probe/core branch? https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/log/?h=probes/core Thank you, On Tue, 17 Oct 2023 01:05:21 +0800 "wuqiang.matt" wrote: > Hello Masami, > > Here's the updated versio

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-16 Thread Huang, Kai
On Mon, 2023-10-16 at 19:10 -0500, Haitao Huang wrote: > On Mon, 16 Oct 2023 16:09:52 -0500, Huang, Kai wrote: > [...] > > > still need to fix the bug mentioned above here. > > > > I really think you should just go this simple way: > > > > When you want to take EPC back from VM, kill the VM. >

Re: [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Huang, Ying
"Verma, Vishal L" writes: > On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: >> Vishal Verma wrote: >> > > <..> > >> > + >> > + rc = kstrtobool(buf, &val); >> > + if (rc) >> > + return rc; >> >> Perhaps: >> >> if (dev_dax->memmap_on_memory == val) >> return

Re: [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Verma, Vishal L
On Tue, 2023-10-17 at 13:18 +0800, Huang, Ying wrote: > "Verma, Vishal L" writes: > > > On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: > > > Vishal Verma wrote: > > > > > > <..> > > > > > > + > > > > +   rc = kstrtobool(buf, &val); > > > > +   if (rc) > > > > +   ret

[PATCH v6 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-10-16 Thread Vishal Verma
The dax/kmem driver can potentially hot-add large amounts of memory originating from CXL memory expanders, or NVDIMMs, or other 'device memories'. There is a chance there isn't enough regular system memory available to fit the memmap for this new memory. It's therefore desirable, if all other condi

[PATCH v6 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-16 Thread Vishal Verma
The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to 'memblock_size' chunks of memory being added. Adding a larger span of memory precludes memmap_on_memory semantics. For users of hotplug such as kmem, large amounts of memory might get added from the CXL subsystem. In some cases,

[PATCH v6 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-10-16 Thread Vishal Verma
A review of the memmap_on_memory modifications to add_memory_resource() revealed an instance of an open-coded kmemdup(). Replace it with kmemdup(). Cc: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Reported-by: Dan Williams Signed-off-by: Vishal Ver

[PATCH v6 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Vishal Verma
Large amounts of memory managed by the kmem driver may come in via CXL, and it is often desirable to have the memmap for this memory on the new memory itself. Enroll kmem-managed memory for memmap_on_memory semantics if the dax region originates via CXL. For non-CXL dax regions, retain the existin

Re: [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Huang, Ying
"Verma, Vishal L" writes: > On Tue, 2023-10-17 at 13:18 +0800, Huang, Ying wrote: >> "Verma, Vishal L" writes: >> >> > On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: >> > > Vishal Verma wrote: >> > > > >> > <..> >> > >> > > > + >> > > > + rc = kstrtobool(buf, &val); >> > > > +

Re: [PATCH v6 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-16 Thread Huang, Ying
Vishal Verma writes: > The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to > 'memblock_size' chunks of memory being added. Adding a larger span of > memory precludes memmap_on_memory semantics. > > For users of hotplug such as kmem, large amounts of memory might get > added from