Re: [RFC v3 net-next 1/7] net: add rx_sk to trace_kfree_skb

2024-06-07 Thread David Ahern
On 6/6/24 9:37 AM, Yan Zhai wrote: > # cat /sys/kernel/debug/tracing/events/skb/kfree_skb/format > name: kfree_skb > ID: 2260 > format: > field:unsigned short common_type; offset:0; > size:2; signed:0; > field:unsigned char common_flags; offset:2; > size:1; signed:0; >

Re: [PATCH RFC 0/4] static key support for error injection functions

2024-06-02 Thread David Rientjes
On Fri, 31 May 2024, Vlastimil Babka wrote: > Patches 3 and 4 implement the static keys for the two mm fault injection > sites in slab and page allocators. For a quick demonstration I've run a > VM and the simple test from [1] that stresses the slab allocator and got > this time before the

[PATCH] arm64: dts: qcom: sm8550-samsung-q5q: fix typo

2024-05-31 Thread David Wronek
It looks like "cdsp_mem" was pasted in the license header by accident. Fix the typo by removing it. Signed-off-by: David Wronek --- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8550-samsu

Re: [linus:master] [mm] d99e3140a4: BUG:KCSAN:data-race_in_folio_remove_rmap_ptes/print_report

2024-05-28 Thread David Hildenbrand
uldn't really result in false positives (what we care about), but READ_ONCE shouldn't hurt or make a difference. From b03dc9bf27571442d886d8da624a4e4f737433f2 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 28 May 2024 09:37:20 +0200 Subject: [PATCH] mm: read page_type using READ_ONCE K

Re: [PATCH] virt: acrn: Remove unusted list 'acrn_irqfd_clients'

2024-05-17 Thread Dr. David Alan Gilbert
* li...@treblig.org (li...@treblig.org) wrote: > From: "Dr. David Alan Gilbert" > > It doesn't look like this was ever used. > > Build tested only. > > Signed-off-by: Dr. David Alan Gilbert Ping > --- > drivers/virt/acrn/irqfd.c | 2 -- > 1 file

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-16 Thread David Hildenbrand
On 16.05.24 19:44, Guillaume Morin wrote: On 02 May 5:59, Guillaume Morin wrote: On 30 Apr 21:25, David Hildenbrand wrote: I tried to get the hugepd stuff right but this was the first I heard about it :-) Afaict follow_huge_pmd and friends were already DTRT I'll have to have a closer look

Re: [PATCH v2 6/8] riscv: Enable memory hotplugging for RISC-V

2024-05-14 Thread David Hildenbrand
M today to maybe require SPARSEMEM_VMEMMAP for hotplug. Would that work here as well? -- Cheers, David / dhildenb

Re: [PATCH v2 5/8] riscv: mm: Take memory hotplug read-lock during kernel page table dump

2024-05-14 Thread David Hildenbrand
nline_mems(); ptdump_walk(m, m->private); + put_online_mems(); return 0; } Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 4/8] riscv: mm: Add memory hotplugging support

2024-05-14 Thread David Hildenbrand
g a PG_reserved page that has to be freed differently. -- Cheers, David / dhildenb

Re: [PATCH v2 3/8] riscv: mm: Refactor create_linear_mapping_range() for memory hot add

2024-05-14 Thread David Hildenbrand
On 14.05.24 16:04, Björn Töpel wrote: From: Björn Töpel Add a parameter to the direct map setup function, so it can be used in arch_add_memory() later. Signed-off-by: Björn Töpel --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 2/8] riscv: mm: Change attribute from __init to __meminit for page functions

2024-05-14 Thread David Hildenbrand
--- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 7/8] virtio-mem: Enable virtio-mem for RISC-V

2024-05-14 Thread David Hildenbrand
4 || ARM64 || RISCV depends on VIRTIO depends on MEMORY_HOTPLUG depends on MEMORY_HOTREMOVE Nice! Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v23 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread David Hildenbrand
a->vm_flags & VM_EXEC || + !(vma->vm_flags & VM_MAYSHARE)) + return -EPERM; + + /* +* Make sure the mapping cannot become writable later. Also tell the VM +* to not touch these pages (VM_DONTCOPY | VM_DONTEXPAND). Coment a bit outdated. Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread David Hildenbrand
e instead do if (WARN_ON_ONCE(s >= nr_subbufs)) { err = -EINVAL; goto out; } ? -- Cheers, David / dhildenb

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread David Hildenbrand
fully (we should double-check!). But perhaps, VM_DONTEXPAND and MIXEDMAP (implicitely set by vm_insert_pages) are enough protection? Do we want to dump these pages? VM_DONTDUMP might be reasonabe then. I don't see how anything could use GUP there and as David pointed-out on the previous version, it

Re: [PATCH] ftrace: Remove unused global 'ftrace_direct_func_count'

2024-05-06 Thread Dr. David Alan Gilbert
* li...@treblig.org (li...@treblig.org) wrote: > From: "Dr. David Alan Gilbert" > > Commit 8788ca164eb4b ("ftrace: Remove the legacy _ftrace_direct API") > stopped setting the 'ftrace_direct_func_count' variable, but left > it around. Clean it up. > &

Re: ftrace_direct_func_count ?

2024-05-06 Thread Dr. David Alan Gilbert
* Steven Rostedt (rost...@goodmis.org) wrote: > On Sat, 4 May 2024 13:35:26 + > "Dr. David Alan Gilbert" wrote: > > > Hi, > > I've just posted a patch 'ftrace: Remove unused list > > 'ftrace_direct_funcs'' > > that clears out some old

RE: [PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2024-05-04 Thread David Laight
From: Waiman Long > Sent: 03 May 2024 23:14 > > > On 5/3/24 17:10, David Laight wrote: > > From: Waiman Long > >> Sent: 03 May 2024 17:00 > > ... > >> David, > >> > >> Could you respin the series based on the latest upstream code?

ftrace_direct_func_count ?

2024-05-04 Thread Dr. David Alan Gilbert
our code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

RE: [PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2024-05-03 Thread David Laight
From: Waiman Long > Sent: 03 May 2024 17:00 ... > David, > > Could you respin the series based on the latest upstream code? I've just reapplied the patches to 'master' and they all apply cleanly and diffing the new patches to the old ones gives no differences. So I think they should

RE: [PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2024-05-03 Thread David Laight
From: Waiman Long > Sent: 03 May 2024 17:00 > To: David Laight ; 'linux-kernel@vger.kernel.org' > ker...@vger.kernel.org>; 'pet...@infradead.org' > Cc: 'mi...@redhat.com' ; 'w...@kernel.org' > ; 'boqun.f...@gmail.com' > ; 'Linus Torvalds' ; > 'virtualization@lists

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-02 Thread David Hildenbrand
a, vma->vm_start, pages, _pages); Nit: I did not immediately understand if we could end here with p < nr_pages (IOW, pages[] not completely filled). One source of confusion is the "s < nr_subbufs" check in the while loop: why is "p < nr_pages" insufficient? For the MM bits: Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v22 1/5] ring-buffer: Allocate sub-buffers with __GFP_COMP

2024-05-02 Thread David Hildenbrand
On 30.04.24 13:13, Vincent Donnefort wrote: In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort Acked-by: David Hildenbrand -- Cheers

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread David Hildenbrand
On 26.04.24 21:55, Guillaume Morin wrote: On 26 Apr 9:19, David Hildenbrand wrote: A couple of points: a) Don't use page_mapcount(). Either folio_mapcount(), but likely you want to check PageAnonExclusive. b) If you're not following the can_follow_write_pte/_pmd model, you are doing

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread David Hildenbrand
On 30.04.24 17:22, Guillaume Morin wrote: On 26 Apr 21:55, Guillaume Morin wrote: On 26 Apr 9:19, David Hildenbrand wrote: A couple of points: a) Don't use page_mapcount(). Either folio_mapcount(), but likely you want to check PageAnonExclusive. b) If you're not following

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-26 Thread David Hildenbrand
On 26.04.24 02:09, Guillaume Morin wrote: On 25 Apr 21:56, David Hildenbrand wrote: On 25.04.24 17:19, Guillaume Morin wrote: On 24 Apr 23:00, David Hildenbrand wrote: One issue here is that FOLL_FORCE|FOLL_WRITE is not implemented for hugetlb mappings. However this was also on my TODO and I

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread David Hildenbrand
On 25.04.24 17:19, Guillaume Morin wrote: On 24 Apr 23:00, David Hildenbrand wrote: One issue here is that FOLL_FORCE|FOLL_WRITE is not implemented for hugetlb mappings. However this was also on my TODO and I have a draft patch that implements it. Yes, I documented it back then and added

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread David Hildenbrand
On 25.04.24 17:19, Guillaume Morin wrote: On 24 Apr 23:00, David Hildenbrand wrote: One issue here is that FOLL_FORCE|FOLL_WRITE is not implemented for hugetlb mappings. However this was also on my TODO and I have a draft patch that implements it. Yes, I documented it back then and added

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-24 Thread David Hildenbrand
On 24.04.24 22:44, Guillaume Morin wrote: On 24 Apr 22:09, David Hildenbrand wrote: Let me try to see if we can get this done cleaner. One ugly part (in general here) is the custom page replacement in the registration part. We are guaranteed to have a MAP_PRIVATE mapping. Instead of replacing

Re: [PATCH v21 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-24 Thread David Hildenbrand
On 24.04.24 22:31, Vincent Donnefort wrote: Hi David, Thanks for your quick response. On Wed, Apr 24, 2024 at 05:26:39PM +0200, David Hildenbrand wrote: I gave it some more thought, and I think we are still missing something (I wish PFNMAP/MIXEDMAP wouldn't be that hard

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-24 Thread David Hildenbrand
On 22.04.24 22:53, Guillaume Morin wrote: On 22 Apr 20:59, David Hildenbrand wrote: The benefit - to me - is very clear. People do use hugetlb mappings to run code in production environments. The perf benefits are there for some workloads. Intel has published a whitepaper about it etc. Uprobes

Re: [PATCH v21 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-24 Thread David Hildenbrand
vm_start, pages, _pages); vm_insert_pages() documents: "In case of error, we may have mapped a subset of the provided pages. It is the caller's responsibility to account for this case." Which could for example happen, when allocating a page table fails. Would we able to deal with that here? Again, I wish it would all be easier ... -- Cheers, David / dhildenb

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-23 Thread David Hildenbrand
On 22.04.24 22:31, Vincent Donnefort wrote: On Mon, Apr 22, 2024 at 08:27:17PM +0200, David Hildenbrand wrote: On 22.04.24 20:20, Vincent Donnefort wrote: Hi David, Thanks for having a look, very much appreciated! On Mon, Apr 22, 2024 at 11:27:11AM +0200, David Hildenbrand wrote

Re: [PATCH v3 1/4] virtio_balloon: separate vm events into a function

2024-04-23 Thread David Hildenbrand
-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-22 Thread David Hildenbrand
On 22.04.24 20:11, Guillaume Morin wrote: (Dropping Mike Kravetz as CC since he has retired and his email is no longer valid, adding Muchun since he's the current hugetlb maintainer, as well as linux-trace-kernel) On 22 Apr 11:39, David Hildenbrand wrote: On 19.04.24 20:37, Guillaume Morin

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-22 Thread David Hildenbrand
On 22.04.24 20:20, Vincent Donnefort wrote: Hi David, Thanks for having a look, very much appreciated! On Mon, Apr 22, 2024 at 11:27:11AM +0200, David Hildenbrand wrote: On 19.04.24 20:25, David Hildenbrand wrote: On 06.04.24 19:36, Vincent Donnefort wrote: In preparation for allowing

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-22 Thread David Hildenbrand
On 19.04.24 20:25, David Hildenbrand wrote: On 06.04.24 19:36, Vincent Donnefort wrote: In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap

Re: [PATCH v2 1/4] virtio_balloon: separate vm events into a function

2024-04-22 Thread David Hildenbrand
b, idx++, VIRTIO_BALLOON_S_MEMFREE, pages_to_bytes(i.freeram)); update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMTOT, -- Cheers, David / dhildenb

Re: [PATCH v2 1/4] virtio_balloon: separate vm events into a function

2024-04-22 Thread David Hildenbrand
On 22.04.24 10:04, zhenwei pi wrote: On 4/22/24 15:47, David Hildenbrand wrote: On 22.04.24 09:42, zhenwei pi wrote: All the VM events related statistics have dependence on 'CONFIG_VM_EVENT_COUNTERS', once any stack variable is required by any VM events in future, we would have codes like

Re: [PATCH v2 3/4] virtio_balloon: introduce memory allocation stall counter

2024-04-22 Thread David Hildenbrand
t; \ + VIRTIO_BALLOON_S_NAMES_prefix "oom-kills", \ + VIRTIO_BALLOON_S_NAMES_prefix "alloc-stalls" \ } #define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("") Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 1/4] virtio_balloon: separate vm events into a function

2024-04-22 Thread David Hildenbrand
... #ifdef CONFIG_VM_EVENT_COUNTERS foo = events[XXX] + events[YYY]; update_stat(vb, idx++, VIRTIO_BALLOON_S_XXX, foo); #endif Separate vm events into a single function, also remove Why not simply use __maybe_unused for that variable? -- Cheers, David / dhildenb

[PATCH v2 1/1] virtio: Add support for the virtio suspend feature

2024-04-22 Thread David Stevens
Add support for the VIRTIO_F_SUSPEND feature. When this feature is negotiated, power management can use it to suspend virtio devices instead of resorting to resetting the devices entirely. Signed-off-by: David Stevens --- drivers/virtio/virtio.c| 60

[PATCH v2 0/1] virtio: Add suspend support

2024-04-22 Thread David Stevens
ead of mdelay. David Stevens (1): virtio: Add support for the virtio suspend feature drivers/virtio/virtio.c| 60 ++ drivers/virtio/virtio_pci_common.c | 34 - drivers/virtio/virtio_pci_modern.c | 19 ++ include/linux/virti

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-19 Thread David Matlack
On 2024-04-19 01:47 PM, James Houghton wrote: > On Thu, Apr 11, 2024 at 10:28 AM David Matlack wrote: > > On 2024-04-11 10:08 AM, David Matlack wrote: > > bool kvm_age_gfn(struct kvm *kvm, struct kvm_gfn_range *range) > > { > > bool young = false; > > >

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-19 Thread David Hildenbrand
ated into a user vma". You didn't allocate the shared zeropage. I'm wondering if we even expect VM_MIXEDMAP and VM_PFNMAP to be set at the same time? vm_insert_pages() would BUG_ON in case VM_PFNMAP is already set and it would set VM_MIXEDMAP ... similarly vmf_insert_pfn_prot() would not

Re: [PATCH 3/3] virtio_balloon: introduce memory scan/reclaim info

2024-04-18 Thread David Hildenbrand
quot;direct-scans", \ + VIRTIO_BALLOON_S_NAMES_prefix "async-reclaims", \ + VIRTIO_BALLOON_S_NAMES_prefix "direct-reclaims" \ } #define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("") Not an expert on these counters/events, but LGTM Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH 2/3] virtio_balloon: introduce memory allocation stall counter

2024-04-18 Thread David Hildenbrand
see isolate_lru_folios() -> __count_zid_vm_events(), where we realy on the same ordering) Apart form that, LGTM. -- Cheers, David / dhildenb

Re: [PATCH 1/3] virtio_balloon: introduce oom-kill invocations

2024-04-18 Thread David Hildenbrand
(and the later events). For now we can also grep for magic words in guest kernel log from host side. Rather than this unstable way, virtio balloon reports OOM-KILL invocations instead. Signed-off-by: zhenwei pi Acked-by: David Hildenbrand -- Cheers, David / dhildenb

[PATCH 1/1] virtio: Add support for the virtio suspend feature

2024-04-17 Thread David Stevens
Add support for the VIRTIO_F_SUSPEND feature. When this feature is negotiated, power management can use it to suspend virtio devices instead of resorting to resetting the devices entirely. Signed-off-by: David Stevens --- drivers/virtio/virtio.c| 32

[PATCH 0/1] virtio: Add suspend support

2024-04-17 Thread David Stevens
]. [1] https://lore.kernel.org/all/20230906081637.32185-3-lingshan@intel.com/ [2] https://lists.oasis-open.org/archives/virtio-comment/202402/msg00088.html David Stevens (1): virtio: Add support for the virtio suspend feature drivers/virtio/virtio.c| 32

Re: [PATCH] module: ban '.', '..' as module names, ban '/' in module names

2024-04-15 Thread Dr. David Alan Gilbert
/proc/2821/net/dev_snmp6/eth0 > > This looks exactly like something coming from userspace and making it > into /proc, so the filter function doesn't belong to kernel/module/internal.h You mean like: [24180.292204] tuxthe: renamed from tuxthe root@dalek:/home/dg# ls /sys/class/net/ enp5s0 lo tuxthe tuxthe tuxthe virbr0 virbr1 ? Dave > -- -Open up your eyes, open up your mind, open up your code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

Re: [RFC 3/3] virtio_balloon: introduce memory scan/reclaim info

2024-04-15 Thread David Hildenbrand
"scan-direct", \ + VIRTIO_BALLOON_S_NAMES_prefix "reclaim-async", \ + VIRTIO_BALLOON_S_NAMES_prefix "reclaim-direct" \ ... "async-scans", "async-reclaims" ... -- Cheers, David / dhildenb

Re: [RFC 2/3] virtio_balloon: introduce memory allocation stall counter

2024-04-15 Thread David Hildenbrand
VIRTIO_BALLOON_S_NAMES_prefix "oom-kill" \ + VIRTIO_BALLOON_S_NAMES_prefix "oom-kill", \ + VIRTIO_BALLOON_S_NAMES_prefix "alloc-stall" \ "alloc-stalls" -- Cheers, David / dhildenb

Re: [RFC 1/3] virtio_balloon: introduce oom-kill invocations

2024-04-15 Thread David Hildenbrand
failures", \ + VIRTIO_BALLOON_S_NAMES_prefix "oom-kill" \ "oom-kills" -- Cheers, David / dhildenb

Re: [RFC 0/3] Improve memory statistics for virtio balloon

2024-04-15 Thread David Hildenbrand
currently would for VIRTIO_BALLOON_S_HTLB_PGALLOC without CONFIG_HUGETLB_PAGE. -- Cheers, David / dhildenb

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-12 Thread David Matlack
On 2024-04-01 11:29 PM, James Houghton wrote: > Only handle the TDP MMU case for now. In other cases, if a bitmap was > not provided, fallback to the slowpath that takes mmu_lock, or, if a > bitmap was provided, inform the caller that the bitmap is unreliable. I think this patch will trigger a

Re: [PATCH v3 3/7] KVM: Add basic bitmap support into kvm_mmu_notifier_test/clear_young

2024-04-12 Thread David Matlack
On 2024-04-01 11:29 PM, James Houghton wrote: > Add kvm_arch_prepare_bitmap_age() for architectures to indiciate that > they support bitmap-based aging in kvm_mmu_notifier_test_clear_young() > and that they do not need KVM to grab the MMU lock for writing. This > function allows architectures to

Re: [PATCH 1/4] KVM: delete .change_pte MMU notifier callback

2024-04-12 Thread David Hildenbrand
has ever reported an issue for over 10 years, so I think it's easiest to just rip the code out. Yes. Can always be readded in a possibly cleaner fashion (like you note above), when deemed necessary and we are willing to support it. [1] https://gruss.cc/files/remote_dedup.pdf -- Cheers, David / dhildenb

Re: [PATCH v3 1/7] mm: Add a bitmap into mmu_notifier_{clear,test}_young

2024-04-12 Thread David Matlack
On 2024-04-01 11:29 PM, James Houghton wrote: > The bitmap is provided for secondary MMUs to use if they support it. For > test_young(), after it returns, the bitmap represents the pages that > were young in the interval [start, end). For clear_young, it represents > the pages that we wish the

Re: [PATCH v3 0/7] mm/kvm: Improve parallelism for access bit harvesting

2024-04-12 Thread David Matlack
On 2024-04-01 11:29 PM, James Houghton wrote: > This patchset adds a fast path in KVM to test and clear access bits on > sptes without taking the mmu_lock. It also adds support for using a > bitmap to (1) test the access bits for many sptes in a single call to > mmu_notifier_test_young, and to (2)

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-11 Thread David Matlack
On Thu, Apr 11, 2024 at 11:00 AM David Matlack wrote: > > On Thu, Apr 11, 2024 at 10:28 AM David Matlack wrote: > > > > On 2024-04-11 10:08 AM, David Matlack wrote: > > > On 2024-04-01 11:29 PM, James Houghton wrote: > > > > Only handle the TDP MMU ca

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-11 Thread David Matlack
On Thu, Apr 11, 2024 at 10:28 AM David Matlack wrote: > > On 2024-04-11 10:08 AM, David Matlack wrote: > > On 2024-04-01 11:29 PM, James Houghton wrote: > > > Only handle the TDP MMU case for now. In other cases, if a bitmap was > > > not provided, fallback to th

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-11 Thread David Matlack
On 2024-04-11 10:08 AM, David Matlack wrote: > On 2024-04-01 11:29 PM, James Houghton wrote: > > Only handle the TDP MMU case for now. In other cases, if a bitmap was > > not provided, fallback to the slowpath that takes mmu_lock, or, if a > > bitmap was provided, inform the c

Re: [PATCH v3 5/7] KVM: x86: Participate in bitmap-based PTE aging

2024-04-11 Thread David Matlack
On 2024-04-01 11:29 PM, James Houghton wrote: > Only handle the TDP MMU case for now. In other cases, if a bitmap was > not provided, fallback to the slowpath that takes mmu_lock, or, if a > bitmap was provided, inform the caller that the bitmap is unreliable. > > Suggested-by: Yu Zhao >

Re: [PATCH v3 1/7] mm: Add a bitmap into mmu_notifier_{clear,test}_young

2024-04-09 Thread David Hildenbrand
On 09.04.24 20:31, James Houghton wrote: Ah, I didn't see this in my inbox, sorry David! No worries :) On Thu, Apr 4, 2024 at 11:52 AM David Hildenbrand wrote: On 02.04.24 01:29, James Houghton wrote: diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index

Re: [PATCH 4/4] mm: replace set_pte_at_notify() with just set_pte_at()

2024-04-08 Thread David Hildenbrand
-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH 3/4] mmu_notifier: remove the .change_pte() callback

2024-04-08 Thread David Hildenbrand
be removed. For now, leave in place set_pte_at_notify() even though it is just a synonym for set_pte_at(). Signed-off-by: Paolo Bonzini --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v3 1/7] mm: Add a bitmap into mmu_notifier_{clear,test}_young

2024-04-04 Thread David Hildenbrand
't find any existing usage of that in this file. Further, what is MMU_NOTIFIER_YOUNG you introduce used for? -- Cheers, David / dhildenb

[PATCH v2 0/2] Improvements to virtio_balloon pm

2024-03-20 Thread David Stevens
From: David Stevens The virtio_balloon driver uses wakeup sources to allow the guest to enter system power management sleep states (e.g. s2idle) without running the risk of becoming unresponsive to cooperative memory management requests from the host. This series fixes an issue where wakeup

[PATCH v2 2/2] virtio_balloon: Treat stats requests as wakeup events

2024-03-20 Thread David Stevens
From: David Stevens Treat stats requests as wakeup events to ensure that the driver responds to device requests in a timely manner. Signed-off-by: David Stevens Acked-by: David Hildenbrand --- drivers/virtio/virtio_balloon.c | 75 - 1 file changed, 46

[PATCH v2 1/2] virtio_balloon: Give the balloon its own wakeup source

2024-03-20 Thread David Stevens
From: David Stevens Wakeup sources don't support nesting multiple events, so sharing a single object between multiple drivers can result in one driver overriding the wakeup event processing period specified by another driver. Have the virtio balloon driver use the wakeup source of the device

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-20 Thread David Woodhouse
On Tue, 2024-03-19 at 14:47 +0100, Peter Hilber wrote: > While the virtio-comment list is not available, now also CC'ing Parav, > which may be interested in this virtio-rtc spec related discussion thread. > > On 14.03.24 15:19, David Woodhouse wrote: > > On 14 March 2024 1

Re: [PATCH 2/2] virtio_balloon: Treat stats requests as wakeup events

2024-03-19 Thread David Hildenbrand
On 18.03.24 10:10, David Stevens wrote: From: David Stevens Treat stats requests as wakeup events to ensure that the driver responds to device requests in a timely manner. Signed-off-by: David Stevens --- drivers/virtio/virtio_balloon.c | 75 - 1 file

Re: [PATCH 1/2] virtio_balloon: Give the balloon its own wakeup source

2024-03-19 Thread David Hildenbrand
On 18.03.24 10:10, David Stevens wrote: From: David Stevens Wakeup sources don't support nesting multiple events, so sharing a single object between multiple drivers can result in one driver overriding the wakeup event processing period specified by another driver. Have the virtio balloon

[PATCH v1] virtio-mem: support suspend+resume

2024-03-18 Thread David Hildenbrand
26090] printk: Suspending console(s) (use no_console_suspend to debug) Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Xuan Zhuo Signed-off-by: David Hildenbrand --- I had QEMU support ready [1] but reset-related things just changed upstream that will require a bit of a rework -- and it will end

[PATCH 2/2] virtio_balloon: Treat stats requests as wakeup events

2024-03-18 Thread David Stevens
From: David Stevens Treat stats requests as wakeup events to ensure that the driver responds to device requests in a timely manner. Signed-off-by: David Stevens --- drivers/virtio/virtio_balloon.c | 75 - 1 file changed, 46 insertions(+), 29 deletions(-) diff

[PATCH 1/2] virtio_balloon: Give the balloon its own wakeup source

2024-03-18 Thread David Stevens
From: David Stevens Wakeup sources don't support nesting multiple events, so sharing a single object between multiple drivers can result in one driver overriding the wakeup event processing period specified by another driver. Have the virtio balloon driver use the wakeup source of the device

[PATCH 0/2] Improvements to virtio_balloon pm

2024-03-18 Thread David Stevens
From: David Stevens The virtio_balloon driver uses wakeup sources to allow the guest to enter system power management sleep states (e.g. s2idle) without running the risk of becoming unresponsive to cooperative memory management requests from the host. This series fixes an issue where wakeup

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-14 Thread David Woodhouse
On 14 March 2024 11:13:37 CET, Peter Hilber wrote: >> To a certain extent, as long as the virtio-rtc device is designed to expose >> time precisely and unambiguously, it's less important if the Linux kernel >> *today* can use that. Although of course we should strive for that. Let's >>

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread David Woodhouse
On 13 March 2024 17:50:48 GMT, Peter Hilber wrote: >On 13.03.24 13:45, David Woodhouse wrote: >> Surely the whole point of this effort is to provide guests with precise >> and *unambiguous* knowledge of what the time is? > >I would say, a fundamental point of thi

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread David Woodhouse
On Wed, 2024-03-13 at 13:58 +0100, Alexandre Belloni wrote: > The TSC or whatever CPU counter/clock that is used to keep the system > time is not an RTC, I don't get why it has to be exposed as such to the > guests. PTP is fine and precise, RTC is not. Ah, I see. But the point of the virtio_rtc

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread David Woodhouse
On Wed, 2024-03-13 at 10:45 +0100, Peter Hilber wrote: > On 12.03.24 18:15, David Woodhouse wrote: > > On Mon, 2024-03-11 at 19:24 +0100, Peter Hilber wrote: > > > On 08.03.24 13:33, David Woodhouse wrote: > > > > On Fri, 2024-03-08 at 11:32 +0100, Peter Hilber wrot

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-13 Thread David Woodhouse
On Wed, 2024-03-13 at 12:18 +0100, Alexandre Belloni wrote: > > I still don't know anything about virtio but under Linux, an RTC is > always UTC (or localtime when dual booting but let's not care) and never > accounts for leap seconds. Having an RTC and RTC driver behaving > differently would be

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-12 Thread David Woodhouse
On Mon, 2024-03-11 at 19:24 +0100, Peter Hilber wrote: > On 08.03.24 13:33, David Woodhouse wrote: > > On Fri, 2024-03-08 at 11:32 +0100, Peter Hilber wrote: > > > On 07.03.24 15:02, David Woodhouse wrote: > > > > Hm, should we allow UTC? If you tell me the time in U

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-08 Thread David Woodhouse
On Fri, 2024-03-08 at 11:32 +0100, Peter Hilber wrote: > On 07.03.24 15:02, David Woodhouse wrote: > > On Mon, 2023-12-18 at 08:38 +0100, Peter Hilber wrote: > > > RFC v3 updates > > > -- > > > > > > This series implements a driver for a v

Re: [RFC PATCH v3 0/7] Add virtio_rtc module and related changes

2024-03-07 Thread David Woodhouse
On Mon, 2023-12-18 at 08:38 +0100, Peter Hilber wrote: > RFC v3 updates > -- > > This series implements a driver for a virtio-rtc device conforming to spec > RFC v3 [1]. It now includes an RTC class driver with alarm, in addition to > the PTP clock driver already present before. > >

[PATCH v1] virtio: reenable config if freezing device failed

2024-02-13 Thread David Hildenbrand
changes. Let's fix this by re-enabling the config if freezing fails. Fixes: 22b7050a024d ("virtio: defer config changed notifications") Cc: Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Xuan Zhuo Signed-off-by: David Hildenbrand --- drivers/virtio/virtio.c | 4 +++- 1 file c

How to display a ktime value as trace timestamp in trace output?

2024-01-31 Thread David Howells
with the displayed timestamps? I tried subtracting ktime_get_read() - ktime_get_boottime() from it and displaying the result, but it looked about one and a bit seconds out from the trace timestamp. Thanks, David

Re: [PATCH 02/20] filelock: add coccinelle scripts to move fields to struct file_lock_core

2024-01-17 Thread David Howells
Do we need to keep these coccinelle scripts for posterity? Or can they just be included in the patch description of the patch that generates them? David

Re: [PATCH] driver/virtio: Add Memory Balloon Support for SEV/SEV-ES

2024-01-11 Thread David Hildenbrand
are in need. 2) What about other features? What if the hypervisor enabled free-page-reporting? Would that work (unlikely, I assunme). Don't we have to block that? -- Cheers, David / dhildenb

Re: [PATCH] driver/virtio: Add Memory Balloon Support for SEV/SEV-ES

2024-01-11 Thread David Hildenbrand
and reuse them after balloon deflation both works well with the patch. Hypervisor can normally give the reclaimed memory from one CVM to another, or give back to the origin CVM. I'll comment on your misconception of memory overcommit separately. -- Cheers, David / dhildenb

[PATCH v3] virtio_balloon: stay awake while adjusting balloon

2024-01-09 Thread David Stevens
From: David Stevens A virtio_balloon's parent device may be configured so that a configuration change interrupt is a wakeup event. Extend the processing of such a wakeup event until the balloon finishes inflating or deflating by calling pm_stay_awake/pm_relax in the virtio_balloon driver. Note

Re: REGRESSION: lockdep warning triggered by 15b9ce7ecd: virtio_balloon: stay awake while adjusting balloon

2024-01-09 Thread David Hildenbrand
On 09.01.24 06:50, David Stevens wrote: On Tue, Jan 9, 2024 at 6:50 AM Theodore Ts'o wrote: Hi, while doing final testing before sending a pull request, I merged in linux-next, and commit 5b9ce7ecd7: virtio_balloon: stay awake while adjusting balloon seems to be causing a lockdep warning (see

Re: REGRESSION: lockdep warning triggered by 15b9ce7ecd: virtio_balloon: stay awake while adjusting balloon

2024-01-08 Thread David Stevens
[ 540.789007] > kernel: [ 540.791766] lock(>adjustment_lock); > kernel: [ 540.796014] > kernel: [ 540.798778] lock(>adjustment_lock); > kernel: [ 540.803605] Oh, that's embarrassing, I completely whiffed on interactions with interrupts. The following patch fixes

RE: [PATCH next 2/5] locking/osq_lock: Avoid dirtying the local cpu's 'node' in the osq_lock() fast path.

2024-01-02 Thread David Laight
From: Boqun Feng > Sent: 02 January 2024 18:54 > > On Sat, Dec 30, 2023 at 03:49:52PM +0000, David Laight wrote: > [...] > > But it looks odd that osq_unlock()'s fast path uses _release but the very > > similar code in osq_wait_next() uses _acquire. > > > > Th

RE: [PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2024-01-02 Thread David Laight
From: Ingo Molnar > Sent: 02 January 2024 09:54 > > > * David Laight wrote: > > > per_cpu_ptr() indexes __per_cpu_offset[] with the cpu number. > > This requires the cpu number be 64bit. > > However the value is osq_lock() comes from a 32bit xchg() and the

RE: [PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2024-01-01 Thread David Laight
From: Waiman Long > Sent: 01 January 2024 04:14 ... > You really like micro-optimization. They all add up :-) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

[PATCH next v2 5/5] locking/osq_lock: Optimise decode_cpu() and per_cpu_ptr().

2023-12-31 Thread David Laight
knows the decrement has set the high bits to zero and doesn't add a register-register move (or cltq) to zero/sign extend the value. Not massive but saves two instructions. Signed-off-by: David Laight --- kernel/locking/osq_lock.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH next v2 4/5] locking/osq_lock: Avoid writing to node->next in the osq_lock() fast path.

2023-12-31 Thread David Laight
at can leave it non-NULL check with WARN_ON_ONCE() and NULL if set. Note that without this check the fast path (adding at the list head) doesn't need to to access the per-cpu osq_node at all. Signed-off-by: David Laight --- kernel/locking/osq_lock.c | 14 ++ 1 file changed, 10 insertions

[PATCH next v2 3/5] locking/osq_lock: Use node->prev_cpu instead of saving node->prev.

2023-12-31 Thread David Laight
_next() call in the unqueue path. Normally this is exactly the value that the initial xchg() read from lock->tail (used to obtain 'prev'), but can get updated by concurrent unqueues. Both the 'prev' and 'cpu' members of optimistic_spin_node are now unused and can be deleted. Signed-off-b

  1   2   3   4   5   6   7   8   9   10   >