Re: [PATCH v4 bpf-next 2/2] mm: Introduce VM_SPARSE kind and vm_area_[un]map_pages().

2024-03-06 Thread Pasha Tatashin
pages); > vm_area_unmap_pages(area, kaddr, kend); > > // after bpf program is detached and unloaded > free_vm_area(area); > > Signed-off-by: Alexei Starovoitov Reviewed-by: Pasha Tatashin

Re: [PATCH v4 bpf-next 2/2] mm: Introduce VM_SPARSE kind and vm_area_[un]map_pages().

2024-03-06 Thread Pasha Tatashin
On Wed, Mar 6, 2024 at 5:13 PM Alexei Starovoitov wrote: > > On Wed, Mar 6, 2024 at 1:46 PM Pasha Tatashin > wrote: > > > > > > This interface and in general VM_SPARSE would be useful for > > > > dynamically grown kernel stacks [1]. However, the might_slee

Re: [PATCH v4 bpf-next 2/2] mm: Introduce VM_SPARSE kind and vm_area_[un]map_pages().

2024-03-06 Thread Pasha Tatashin
> > This interface and in general VM_SPARSE would be useful for > > dynamically grown kernel stacks [1]. However, the might_sleep() here > > would be a problem. We would need to be able to handle > > vm_area_map_pages() from interrupt disabled context therefore no > > sleeping. The caller would nee

Re: [PATCH v4 bpf-next 2/2] mm: Introduce VM_SPARSE kind and vm_area_[un]map_pages().

2024-03-06 Thread Pasha Tatashin
On Mon, Mar 4, 2024 at 10:05 PM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > vmap/vmalloc APIs are used to map a set of pages into contiguous kernel > virtual space. > > get_vm_area() with appropriate flag is used to request an area of kernel > address range. It's used for vmalloc,

Re: [Xen-devel] [PATCH RFCv2 6/6] memory-hotplug.txt: Add some details about locking internals

2018-08-30 Thread Pasha Tatashin
Reviewed-by: Pavel Tatashin On 8/21/18 6:44 AM, David Hildenbrand wrote: > Let's document the magic a bit, especially why device_hotplug_lock is > required when adding/removing memory and how it all play together with > requests to online/offline memory from user space. > __

Re: [Xen-devel] [PATCH RFCv2 5/6] powerpc/powernv: hold device_hotplug_lock in memtrace_offline_pages()

2018-08-30 Thread Pasha Tatashin
Reviewed-by: Pavel Tatashin On 8/21/18 6:44 AM, David Hildenbrand wrote: > Let's perform all checking + offlining + removing under > device_hotplug_lock, so nobody can mess with these devices via > sysfs concurrently. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman

Re: [Xen-devel] [PATCH RFCv2 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online()

2018-08-30 Thread Pasha Tatashin
Reviewed-by: Pavel Tatashin On 8/21/18 6:44 AM, David Hildenbrand wrote: > device_online() should be called with device_hotplug_lock() held. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Rashmica Gupta > Cc: Balbir Singh > Cc: Michael Neuling > Signed-off

Re: [Xen-devel] [PATCH RFCv2 3/6] mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock

2018-08-30 Thread Pasha Tatashin
On 8/21/18 6:44 AM, David Hildenbrand wrote: > There seem to be some problems as result of 30467e0b3be ("mm, hotplug: > fix concurrent memory hot-add deadlock"), which tried to fix a possible > lock inversion reported and discussed in [1] due to the two locks > a) device_lock() > b) mem

Re: [Xen-devel] [PATCH RFCv2 1/6] mm/memory_hotplug: make remove_memory() take the device_hotplug_lock

2018-08-30 Thread Pasha Tatashin
> + > +void __ref remove_memory(int nid, u64 start, u64 size) Remove __ref, otherwise looks good: Reviewed-by: Pavel Tatashin > +{ > + lock_device_hotplug(); > + __remove_memory(nid, start, size); > + unlock_device_hotplug(); > +} > EXPORT_SYMBOL_GPL(remove_memory); > #endif /* CO

Re: [Xen-devel] [PATCH RFCv2 2/6] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2018-08-30 Thread Pasha Tatashin
On 8/21/18 6:44 AM, David Hildenbrand wrote: > add_memory() currently does not take the device_hotplug_lock, however > is aleady called under the lock from > arch/powerpc/platforms/pseries/hotplug-memory.c > drivers/acpi/acpi_memhotplug.c > to synchronize against CPU hot-remove and simi

Re: [Xen-devel] [PATCH RFCv2 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-08-30 Thread Pasha Tatashin
On 8/30/18 8:31 AM, David Hildenbrand wrote: > On 21.08.2018 12:44, David Hildenbrand wrote: >> This is the same approach as in the first RFC, but this time without >> exporting device_hotplug_lock (requested by Greg) and with some more >> details and documentation regarding locking. Tested only

Re: [Xen-devel] [PATCH] x86/xen: enable early use of set_fixmap in 32-bit Xen PV guest

2018-08-22 Thread Pasha Tatashin
On Fri, Aug 17, 2018 at 9:41 AM Juergen Gross wrote: > > Commit 7b25b9cb0dad83 ("x86/xen/time: Initialize pv xen time in > init_hypervisor_platform()") moved the mapping of the shared info area > before pagetable_init(). This breaks booting as 32-bit PV guest as the > use of set_fixmap isn't possi