search for: vm_area_struct

Displaying 20 results from an estimated 718 matches for "vm_area_struct".

2011 Mar 07
6
[PATCH] xen/gntdev,gntalloc: Remove unneeded VM flags
...etions(-) diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index a7ffdfe..f6832f4 100644 --- a/drivers/xen/gntalloc.c +++ b/drivers/xen/gntalloc.c @@ -427,6 +427,17 @@ static long gntalloc_ioctl(struct file *filp, unsigned int cmd, return 0; } +static void gntalloc_vma_open(struct vm_area_struct *vma) +{ + struct gntalloc_gref *gref = vma->vm_private_data; + if (!gref) + return; + + spin_lock(&gref_lock); + gref->users++; + spin_unlock(&gref_lock); +} + static void gntalloc_vma_close(struct vm_area_struct *vma) { struct gntalloc_gref *gref = vma->vm_private_data; @@ -...
2018 Apr 15
0
[RFC] Rewrite page fault interception in TTM drivers
...; - r = ttm_vm_ops->fault(vmf); - return r; + return ttm_bo_vm_fault(vmf); } +static const struct vm_operations_struct qxl_ttm_vm_ops = { + .fault = qxl_ttm_fault, + .open = ttm_bo_vm_open, + .close = ttm_bo_vm_close, + .access = ttm_bo_vm_access, +}; + int qxl_mmap(struct file *filp, struct vm_area_struct *vma) { struct drm_file *file_priv; @@ -139,11 +141,6 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma) r = ttm_bo_mmap(filp, vma, &qdev->mman.bdev); if (unlikely(r != 0)) return r; - if (unlikely(ttm_vm_ops == NULL)) { - ttm_vm_ops = vma->vm_ops; - qxl_ttm_vm_ops...
2011 Nov 29
3
[PATCH] fs: push file_update_time into ->page_mkwrite
...c | 8 -------- security/selinux/selinuxfs.c | 1 + 15 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 62857a8..ae2968f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -610,6 +610,7 @@ v9fs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) P9_DPRINTK(P9_DEBUG_VFS, "page %p fid %lx\n", page, (unsigned long)filp->private_data); + file_update_time(filp); v9inode = V9FS_I(inode); /* make sure the cache has finished storing the page */ v9fs_fscache_wait_on_page_write(inode, page); d...
2024 Jan 22
2
[PATCH] mm: Remove double faults once write a device pfn
...eturn code > @@ -180,7 +181,8 @@ EXPORT_SYMBOL(ttm_bo_vm_reserve); > */ > vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, > pgprot_t prot, > - pgoff_t num_prefault) > + pgoff_t num_prefault, > + bool mkwrite) > { > struct vm_area_struct *vma = vmf->vma; > struct ttm_buffer_object *bo = vma->vm_private_data; > @@ -263,7 +265,7 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, > * at arbitrary times while the data is mmap'ed. > * See vmf_insert_pfn_prot() for a discussion. > */ &...
2024 Jan 24
1
[PATCH] mm: Remove double faults once write a device pfn
...t;> - pgoff_t num_prefault) >> >>>>> + pgoff_t num_prefault, >> >>>>> + bool mkwrite) >> >>>>> { >> >>>>> struct vm_area_struct *vma = vmf->vma; >> >>>>> struct ttm_buffer_object *bo = vma->vm_private_data; @@ >> >>>>> -263,7 >> >>>>> +265,7 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault >> >>>>> +*vmf, >> >>&...
2024 Jan 23
2
[PATCH] mm: Remove double faults once write a device pfn
...f, >>> pgprot_t prot, >>> - pgoff_t num_prefault) >>> + pgoff_t num_prefault, >>> + bool mkwrite) >>> { >>> struct vm_area_struct *vma = vmf->vma; >>> struct ttm_buffer_object *bo = vma->vm_private_data; @@ -263,7 >>> +265,7 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, >>> * at arbitrary times while the data is mmap'ed. >>> * See vm...
2024 Jan 24
2
[PATCH] mm: Remove double faults once write a device pfn
...pgprot_t prot, >>>>> - pgoff_t num_prefault) >>>>> + pgoff_t num_prefault, >>>>> + bool mkwrite) >>>>> { >>>>> struct vm_area_struct *vma = vmf->vma; >>>>> struct ttm_buffer_object *bo = vma->vm_private_data; @@ -263,7 >>>>> +265,7 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, >>>>> * at arbitrary times while the data is mmap'ed. >>&...
2020 Jun 22
1
[PATCH 14/16] mm/thp: add THP allocation helper
...order, > alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false) > #define alloc_page_vma_node(gfp_mask, vma, addr, node) \ > alloc_pages_vma(gfp_mask, 0, vma, addr, node, false) > +#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION > +extern struct page *alloc_transhugepage(struct vm_area_struct *vma, > + unsigned long addr); > +#else > +static inline struct page *alloc_transhugepage(struct vm_area_struct *vma, > + unsigned long addr) > +{ > + return NULL; > +} > +#endif > > extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); &...
2013 Apr 06
1
[PATCH 3/4] fsfreeze: manage kill signal when sb_start_pagefault is called
...include/linux/fs.h | 6 ++++-- mm/filemap.c | 7 +++++-- 9 files changed, 30 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 09c58a3..a6166f4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7559,7 +7559,9 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) u64 page_start; u64 page_end; - sb_start_pagefault(inode->i_sb); + ret = sb_start_pagefault(inode->i_sb); + if (ret) + return VM_FAULT_RETRY; ret = btrfs_delalloc_reserve_space(inode, PAGE_CACHE_SIZE); if (!ret) { ret = file_update_time(vma->vm_fi...
2019 Jul 29
24
turn the hmm migrate_vma upside down
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 4 files changed, 285 insertions(+), 602 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git
2019 Jul 29
0
[PATCH 1/9] mm: turn migrate_vma upside down
...memory =================================== Because the CPU cannot access device memory, migration must use the device DMA -engine to perform copy from and to device memory. For this we need a new -migration helper:: - - int migrate_vma(const struct migrate_vma_ops *ops, - struct vm_area_struct *vma, - unsigned long mentries, - unsigned long start, - unsigned long end, - unsigned long *src, - unsigned long *dst, - void *private); - -Unlike other migration functions it works on a range of virtua...
2019 Aug 14
0
[PATCH 01/10] mm: turn migrate_vma upside down
...memory =================================== Because the CPU cannot access device memory, migration must use the device DMA -engine to perform copy from and to device memory. For this we need a new -migration helper:: - - int migrate_vma(const struct migrate_vma_ops *ops, - struct vm_area_struct *vma, - unsigned long mentries, - unsigned long start, - unsigned long end, - unsigned long *src, - unsigned long *dst, - void *private); - -Unlike other migration functions it works on a range of virtua...
2019 Jul 31
1
[PATCH 1/9] mm: turn migrate_vma upside down
...====== > > Because the CPU cannot access device memory, migration must use the device DMA > -engine to perform copy from and to device memory. For this we need a new > -migration helper:: > - > - int migrate_vma(const struct migrate_vma_ops *ops, > - struct vm_area_struct *vma, > - unsigned long mentries, > - unsigned long start, > - unsigned long end, > - unsigned long *src, > - unsigned long *dst, > - void *private); > - > -Unlike other migration...
2019 Sep 13
0
[PATCH 2/8] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
...eate(struct drm_device *dev, size_t size); @@ -143,9 +143,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); -int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma); - -extern const struct vm_operations_struct drm_gem_shmem_vm_ops; +int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void drm_gem_shmem_print_info(struct drm_printer *p, unsigned int indent, const struct drm_gem_object *obj); diff --git a/drivers/gp...
2019 Sep 17
0
[PATCH v2 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
...eate(struct drm_device *dev, size_t size); @@ -143,9 +143,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); -int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma); - -extern const struct vm_operations_struct drm_gem_shmem_vm_ops; +int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void drm_gem_shmem_print_info(struct drm_printer *p, unsigned int indent, const struct drm_gem_object *obj); diff --git a/drivers/gp...
2019 Sep 19
0
[PATCH v3 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
...eate(struct drm_device *dev, size_t size); @@ -143,9 +143,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); -int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma); - -extern const struct vm_operations_struct drm_gem_shmem_vm_ops; +int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void drm_gem_shmem_print_info(struct drm_printer *p, unsigned int indent, const struct drm_gem_object *obj); diff --git a/drivers/gp...
2019 Aug 14
20
turn hmm migrate_vma upside down v3
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 7 files changed, 282 insertions(+), 614 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git
2019 Oct 16
0
[PATCH v4 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
...eate(struct drm_device *dev, size_t size); @@ -143,9 +143,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); -int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma); - -extern const struct vm_operations_struct drm_gem_shmem_vm_ops; +int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void drm_gem_shmem_print_info(struct drm_printer *p, unsigned int indent, const struct drm_gem_object *obj); diff --git a/drivers/gp...
2019 Aug 08
10
turn hmm migrate_vma upside down v2
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 5 files changed, 281 insertions(+), 607 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git
2012 Oct 04
49
[RFC 00/14] arm: implement ballooning and privcmd foreign mappings based on x86 PVH
This series implements ballooning for Xen on ARM and builds and Mukesh''s PVH privcmd stuff to implement foreign page mapping on ARM, replacing the old "HACK: initial (very hacky) XENMAPSPACE_gmfn_foreign" patch. The baseline is a bit complex, it is basically Stefano''s xenarm-forlinus branch (commit bbd6eb29214e) merged with Konrad''s linux-next-pvh branch