search for: memory_notifier

Displaying 20 results from an estimated 31 matches for "memory_notifier".

2020 Jun 08
0
[vhost:vhost 18/52] drivers/virtio/virtio_mem.c:1391:5: warning: Variable 'rc' is reassigned a value before the old one has been used.
...the virtqueue */ > 1391 rc = virtio_mem_init_vq(vm); 1392 if (rc) 1393 goto out_free_vm; 1394 1395 /* initialize the device by querying the config */ 1396 rc = virtio_mem_init(vm); 1397 if (rc) 1398 goto out_del_vq; 1399 1400 /* register callbacks */ 1401 vm->memory_notifier.notifier_call = virtio_mem_memory_notifier_cb; 1402 rc = register_memory_notifier(&vm->memory_notifier); 1403 if (rc) 1404 goto out_del_vq; 1405 rc = register_virtio_mem_device(vm); 1406 if (rc) 1407 goto out_unreg_mem; 1408 1409 virtio_device_ready(vdev); 1410...
2019 Oct 18
2
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Wed 16-10-19 16:14:52, David Hildenbrand wrote: > On 16.10.19 16:03, Michal Hocko wrote: [...] > > But why cannot you keep the reference count at 1 (do get_page when > > offlining the page)? In other words as long as the driver knows the page > > has been returned to the host then it has ref count at 1. Once the page > > is returned to the guest for whatever reason it
2019 Oct 18
2
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Wed 16-10-19 16:14:52, David Hildenbrand wrote: > On 16.10.19 16:03, Michal Hocko wrote: [...] > > But why cannot you keep the reference count at 1 (do get_page when > > offlining the page)? In other words as long as the driver knows the page > > has been returned to the host then it has ref count at 1. Once the page > > is returned to the guest for whatever reason it
2019 Oct 16
3
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Wed 16-10-19 14:50:30, David Hildenbrand wrote: > On 16.10.19 13:43, Michal Hocko wrote: > > On Thu 19-09-19 16:22:25, David Hildenbrand wrote: > > > virtio-mem wants to allow to offline memory blocks of which some parts > > > were unplugged, especially, to later offline and remove completely > > > unplugged memory blocks. The important part is that
2019 Oct 16
3
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Wed 16-10-19 14:50:30, David Hildenbrand wrote: > On 16.10.19 13:43, Michal Hocko wrote: > > On Thu 19-09-19 16:22:25, David Hildenbrand wrote: > > > virtio-mem wants to allow to offline memory blocks of which some parts > > > were unplugged, especially, to later offline and remove completely > > > unplugged memory blocks. The important part is that
2019 Oct 16
0
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On 16.10.19 13:43, Michal Hocko wrote: > On Thu 19-09-19 16:22:25, David Hildenbrand wrote: >> virtio-mem wants to allow to offline memory blocks of which some parts >> were unplugged, especially, to later offline and remove completely >> unplugged memory blocks. The important part is that PageOffline() has >> to remain set until the section is offline, so these pages
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...ter the virtqueue */ 1389 rc = virtio_mem_init_vq(vm); 1390 if (rc) 1391 goto out_free_vm; 1392 1393 /* initialize the device by querying the config */ 1394 rc = virtio_mem_init(vm); 1395 if (rc) 1396 goto out_del_vq; 1397 1398 /* register callbacks */ 1399 vm->memory_notifier.notifier_call = virtio_mem_memory_notifier_cb; 1400 rc = register_memory_notifier(&vm->memory_notifier); 1401 if (rc) 1402 goto out_del_vq; 1403 rc = register_virtio_mem_device(vm); 1404 if (rc) 1405 goto out_unreg_mem; 1406 1407 virtio_device_ready(vdev); 1408...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...ter the virtqueue */ 1389 rc = virtio_mem_init_vq(vm); 1390 if (rc) 1391 goto out_free_vm; 1392 1393 /* initialize the device by querying the config */ 1394 rc = virtio_mem_init(vm); 1395 if (rc) 1396 goto out_del_vq; 1397 1398 /* register callbacks */ 1399 vm->memory_notifier.notifier_call = virtio_mem_memory_notifier_cb; 1400 rc = register_memory_notifier(&vm->memory_notifier); 1401 if (rc) 1402 goto out_del_vq; 1403 rc = register_virtio_mem_device(vm); 1404 if (rc) 1405 goto out_unreg_mem; 1406 1407 virtio_device_ready(vdev); 1408...
2019 Oct 16
0
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On 16.10.19 15:45, Michal Hocko wrote: > On Wed 16-10-19 14:50:30, David Hildenbrand wrote: >> On 16.10.19 13:43, Michal Hocko wrote: >>> On Thu 19-09-19 16:22:25, David Hildenbrand wrote: >>>> virtio-mem wants to allow to offline memory blocks of which some parts >>>> were unplugged, especially, to later offline and remove completely >>>>
2019 Oct 18
2
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Fri 18-10-19 10:50:24, David Hildenbrand wrote: > On 18.10.19 10:15, Michal Hocko wrote: > > On Wed 16-10-19 16:14:52, David Hildenbrand wrote: > > > On 16.10.19 16:03, Michal Hocko wrote: > > [...] > > > > But why cannot you keep the reference count at 1 (do get_page when > > > > offlining the page)? In other words as long as the driver knows the
2019 Oct 18
2
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Fri 18-10-19 10:50:24, David Hildenbrand wrote: > On 18.10.19 10:15, Michal Hocko wrote: > > On Wed 16-10-19 16:14:52, David Hildenbrand wrote: > > > On 16.10.19 16:03, Michal Hocko wrote: > > [...] > > > > But why cannot you keep the reference count at 1 (do get_page when > > > > offlining the page)? In other words as long as the driver knows the
2019 Oct 18
0
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On 18.10.19 10:15, Michal Hocko wrote: > On Wed 16-10-19 16:14:52, David Hildenbrand wrote: >> On 16.10.19 16:03, Michal Hocko wrote: > [...] >>> But why cannot you keep the reference count at 1 (do get_page when >>> offlining the page)? In other words as long as the driver knows the page >>> has been returned to the host then it has ref count at 1. Once the
2019 Oct 16
4
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Thu 19-09-19 16:22:25, David Hildenbrand wrote: > virtio-mem wants to allow to offline memory blocks of which some parts > were unplugged, especially, to later offline and remove completely > unplugged memory blocks. The important part is that PageOffline() has > to remain set until the section is offline, so these pages will never > get accessed (e.g., when dumping). The pages
2019 Oct 16
4
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On Thu 19-09-19 16:22:25, David Hildenbrand wrote: > virtio-mem wants to allow to offline memory blocks of which some parts > were unplugged, especially, to later offline and remove completely > unplugged memory blocks. The important part is that PageOffline() has > to remain set until the section is offline, so these pages will never > get accessed (e.g., when dumping). The pages
2019 Oct 18
0
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
On 18.10.19 13:20, Michal Hocko wrote: > On Fri 18-10-19 10:50:24, David Hildenbrand wrote: >> On 18.10.19 10:15, Michal Hocko wrote: >>> On Wed 16-10-19 16:14:52, David Hildenbrand wrote: >>>> On 16.10.19 16:03, Michal Hocko wrote: >>> [...] >>>>> But why cannot you keep the reference count at 1 (do get_page when >>>>> offlining
2020 Mar 02
0
[PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug
...*/ + bool broken; + + /* The driver is being removed. */ + spinlock_t removal_lock; + bool removing; + + /* Timer for retrying to plug/unplug memory. */ + struct hrtimer retry_timer; +#define VIRTIO_MEM_RETRY_TIMER_MS 30000 + + /* Memory notifier (online/offline events). */ + struct notifier_block memory_notifier; + + /* Next device in the list of virtio-mem devices. */ + struct list_head next; +}; + +/* + * We have to share a single online_page callback among all virtio-mem + * devices. We use RCU to iterate the list in the callback. + */ +static DEFINE_MUTEX(virtio_mem_mutex); +static LIST_HEAD(virtio_mem...
2020 May 07
17
[PATCH v4 00/15] virtio-mem: paravirtualized memory
This series is based on v5.7-rc4. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v4 This is basically a resend of v3 [1], now based on v5.7-rc4 and restested. One patch was reshuffled and two ACKs I missed to add were added. The rebase did not require any modifications to patches. Details about virtio-mem can be found in the cover letter of v2 [2]. A
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was
2019 Dec 21
0
[PATCH 3/8] iommu/vt-d: Remove IOVA handling code from non-dma_ops path
..._mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) { ret = iommu_domain_identity_map(si_domain, - PFN_PHYS(start_pfn), PFN_PHYS(end_pfn)); + mm_to_dma_pfn(start_pfn), + mm_to_dma_pfn(end_pfn)); if (ret) return ret; } @@ -4593,58 +4585,37 @@ static int intel_iommu_memory_notifier(struct notifier_block *nb, unsigned long val, void *v) { struct memory_notify *mhp = v; - unsigned long long start, end; - unsigned long start_vpfn, last_vpfn; + unsigned long start_vpfn = mm_to_dma_pfn(mhp->start_pfn); + unsigned long last_vpfn = mm_to_dma_pfn(mhp->start_pfn +...