search for: down_write

Displaying 20 results from an estimated 187 matches for "down_write".

2008 Nov 05
0
[PATCH] blktap: ensure vma->vm_mm''s mmap_sem is being held whenever it is being modified
...0000000 +0200 +++ head-2008-11-04/drivers/xen/blktap/blktap.c 2008-11-05 14:27:58.000000000 +0100 @@ -611,9 +611,13 @@ static int blktap_release(struct inode * /* Clear any active mappings and free foreign map table */ if (info->vma) { + struct mm_struct *mm = info->vma->vm_mm; + + down_write(&mm->mmap_sem); zap_page_range( info->vma, info->vma->vm_start, info->vma->vm_end - info->vma->vm_start, NULL); + up_write(&mm->mmap_sem); kfree(info->vma->vm_private_data); @@ -993,12 +997,13 @@ static void fast_flush_area(pending_req_...
2017 Feb 10
3
[PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
It was found when running fio sequential write test with a XFS ramdisk on a VM running on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 69.75% 0.59% fio [k] down_write 69.15% 0.01% fio [k] call_rwsem_down_write_failed 67.12% 1.12% fio [k] rwsem_down_write_failed 63.48% 52.77% fio [k] osq_lock 9.46% 7.88% fio [k] __raw_callee_save___kvm_vcpu_is_preempt 3.93% 3.93% fio [k] __kvm_vcpu_is_preempted Making vcpu_is_preempted() a callee-save functi...
2017 Feb 10
3
[PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
It was found when running fio sequential write test with a XFS ramdisk on a VM running on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 69.75% 0.59% fio [k] down_write 69.15% 0.01% fio [k] call_rwsem_down_write_failed 67.12% 1.12% fio [k] rwsem_down_write_failed 63.48% 52.77% fio [k] osq_lock 9.46% 7.88% fio [k] __raw_callee_save___kvm_vcpu_is_preempt 3.93% 3.93% fio [k] __kvm_vcpu_is_preempted Making vcpu_is_preempted() a callee-save functi...
2009 Nov 03
2
[PATCH]] Btrfs: fix destroy snapshot to get the right parent dentry
...ry *dentry; struct inode *dir = parent->d_inode; struct inode *inode; @@ -793,9 +793,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, dest = BTRFS_I(inode)->root; mutex_lock(&inode->i_mutex); - err = d_invalidate(dentry); - if (err) - goto out_unlock; down_write(&root->fs_info->subvol_sem); @@ -827,7 +824,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, inode->i_flags |= S_DEAD; out_up_write: up_write(&root->fs_info->subvol_sem); -out_unlock: + mutex_unlock(&inode->i_mutex); if (!err) { shrink...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...static int __btrfs_reserve_extent(struct btrfs_trans_handle *trans, @@ -5079,9 +5019,9 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) rb_erase(&block_group->cache_node, &info->block_group_cache_tree); - spin_lock(&block_group->space_info->lock); + down_write(&block_group->space_info->groups_sem); list_del(&block_group->list); - spin_unlock(&block_group->space_info->lock); + up_write(&block_group->space_info->groups_sem); kfree(block_group); } spin_unlock(&info->block_group_cache_lock); @@ -5142,9...
2007 Apr 18
1
[PATCH 1/10] I386 sysenter arch pages fix.patch
...- a/arch/i386/kernel/sysenter.c Fri Apr 06 14:25:09 2007 -0700 +++ b/arch/i386/kernel/sysenter.c Fri Apr 06 14:27:31 2007 -0700 @@ -254,7 +254,7 @@ int arch_setup_additional_pages(struct l { struct mm_struct *mm = current->mm; unsigned long addr; - int ret; + int ret = 0; bool compat; down_write(&mm->mmap_sem);
2007 Apr 18
1
[PATCH 1/10] I386 sysenter arch pages fix.patch
...- a/arch/i386/kernel/sysenter.c Fri Apr 06 14:25:09 2007 -0700 +++ b/arch/i386/kernel/sysenter.c Fri Apr 06 14:27:31 2007 -0700 @@ -254,7 +254,7 @@ int arch_setup_additional_pages(struct l { struct mm_struct *mm = current->mm; unsigned long addr; - int ret; + int ret = 0; bool compat; down_write(&mm->mmap_sem);
2017 Feb 08
4
[PATCH 1/2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
It was found when running fio sequential write test with a XFS ramdisk on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 71.27% 0.28% fio [k] down_write 70.99% 0.01% fio [k] call_rwsem_down_write_failed 69.43% 1.18% fio [k] rwsem_down_write_failed 65.51% 54.57% fio [k] osq_lock 9.72% 7.99% fio [k] __raw_callee_save___kvm_vcpu_is_preempted 4.16% 4.16% fio [k] __kvm_vcpu_is_preempted So making vcpu_is_preempted() a callee-save f...
2017 Feb 08
4
[PATCH 1/2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
It was found when running fio sequential write test with a XFS ramdisk on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 71.27% 0.28% fio [k] down_write 70.99% 0.01% fio [k] call_rwsem_down_write_failed 69.43% 1.18% fio [k] rwsem_down_write_failed 65.51% 54.57% fio [k] osq_lock 9.72% 7.99% fio [k] __raw_callee_save___kvm_vcpu_is_preempted 4.16% 4.16% fio [k] __kvm_vcpu_is_preempted So making vcpu_is_preempted() a callee-save f...
2017 Feb 15
0
[PATCH v3 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64
It was found when running fio sequential write test with a XFS ramdisk on a KVM guest running on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 69.75% 0.59% fio [k] down_write 69.15% 0.01% fio [k] call_rwsem_down_write_failed 67.12% 1.12% fio [k] rwsem_down_write_failed 63.48% 52.77% fio [k] osq_lock 9.46% 7.88% fio [k] __raw_callee_save___kvm_vcpu_is_preempt 3.93% 3.93% fio [k] __kvm_vcpu_is_preempted Making vcpu_is_preempted() a callee-save functi...
2017 Feb 15
0
[PATCH v4 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64
It was found when running fio sequential write test with a XFS ramdisk on a KVM guest running on a 2-socket x86-64 system, the %CPU times as reported by perf were as follows: 69.75% 0.59% fio [k] down_write 69.15% 0.01% fio [k] call_rwsem_down_write_failed 67.12% 1.12% fio [k] rwsem_down_write_failed 63.48% 52.77% fio [k] osq_lock 9.46% 7.88% fio [k] __raw_callee_save___kvm_vcpu_is_preempt 3.93% 3.93% fio [k] __kvm_vcpu_is_preempted Making vcpu_is_preempted() a callee-save functi...
2023 Aug 22
0
[PATCH v4 43/48] drm/ttm: introduce pool_shrink_rwsem
...; +/** > + * synchronize_shrinkers - Wait for all running shrinkers to complete. > + * > + * This is useful to guarantee that all shrinker invocations have seen an > + * update, before freeing memory, similar to rcu. > + */ > +static void synchronize_shrinkers(void) > +{ > + down_write(&pool_shrink_rwsem); > + up_write(&pool_shrink_rwsem); > +} > + > /** > * ttm_pool_fini - Cleanup a pool > * > diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h > index c55c07c3f0cb..025c8070dd86 100644 > --- a/include/linux/shrinker.h > +++...
2018 Jul 05
4
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...ithout a panic but there is a warning when unloading the module: sysfs group 'power' not found for kobject 'nv_backlight' WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80 RIP: 0010:sysfs_remove_group+0x76/0x80 Call Trace: device_del+0x56/0x350 ? down_write+0xe/0x40 device_unregister+0x16/0x60 nouveau_backlight_exit+0x4a/0x60 [nouveau] nouveau_display_destroy+0x29/0x80 [nouveau] nouveau_drm_unload+0x61/0xd0 [nouveau] drm_dev_unregister+0x3f/0xe0 [drm] drm_put_dev+0x27/0x50 [drm] nouveau_drm_device_remove+0x47/0x70 [nouveau] pci_device_...
2020 Oct 23
0
kvm+nouveau induced lockdep gripe
...136343] do_syscall_64+0x33/0x40 [ 70.136349] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 70.136354] -> #0 (&mm->mmap_lock#2){++++}-{3:3}: [ 70.136365] __lock_acquire+0x149d/0x1a70 [ 70.136371] lock_acquire+0x1a7/0x3b0 [ 70.136376] down_write+0x38/0x70 [ 70.136382] mpol_rebind_mm+0x1e/0x50 [ 70.136387] cpuset_attach+0x229/0x390 [ 70.136393] cgroup_migrate_execute+0x46d/0x490 [ 70.136398] cgroup_attach_task+0x20c/0x3b0 [ 70.136404] __cgroup1_procs_write.constprop.21+0xf3/0x150 [ 70.136411]...
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...alse; ndev->cur_num_vqs = 0; ndev->mvdev.cvq.received_desc = 0; ndev->mvdev.cvq.completed_desc = 0; @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) struct mlx5_vdpa_virtqueue *mvq; int i; + mlx5_vdpa_info(mvdev, "suspending device\n"); + down_write(&ndev->reslock); ndev->nb_registered = false; mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) suspend_vq(ndev, mvq); } mlx5_vdpa_cvq_suspend(mvdev); + mvdev->suspended = true; up_write...
2009 Jan 12
5
[PATCH 0/5] OCFS2 quota fixes
Hello, the following series of patches fixes some issues with OCFS2 quotas. The first patch modifies VFS quota locking, the next patch uses the fact to simplify OCFS2 quota locking and solves a few deadlock issues. The third and the fourth patches fix another possible deadlocks in OCFS2 quota code and the last patch is a minor cleanup. Honza
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...= 0; > ndev->mvdev.cvq.completed_desc = 0; > @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) > struct mlx5_vdpa_virtqueue *mvq; > int i; > > + mlx5_vdpa_info(mvdev, "suspending device\n"); > + > down_write(&ndev->reslock); > ndev->nb_registered = false; > mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); > @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) > suspend_vq(ndev, mvq); > } > mlx...
2009 Feb 11
1
Possible lock inversion in directory locking
...[<ffffffffa02e25ce>] ocfs2_write_begin_nolock+0x9f6/0x1a99 [ocfs2] [<ffffffff80249424>] find_usage_backwards+0xc7/0xe8 [<ffffffff8024cf83>] __lock_acquire+0x133e/0x156e [<ffffffff80249be9>] add_lock_to_list+0x74/0xb3 [<ffffffff80467e1f>] __down_write_nested+0x17/0xa3 [<ffffffff80467e1f>] __down_write_nested+0x17/0xa3 [<ffffffffa0300719>] ocfs2_journal_access_di+0x0/0xf [ocfs2] [<ffffffffa02e377e>] ocfs2_write_begin+0x10d/0x1c0 [ocfs2] [<ffffffff802608a9>] generic_file_buffered_write+0x132/0x2e...
2019 Oct 29
0
[PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror
...ruct work_struct *work) > -{ > - struct amdgpu_mn *amn = container_of(work, struct amdgpu_mn, work); > - struct amdgpu_device *adev = amn->adev; > - struct amdgpu_mn_node *node, *next_node; > - struct amdgpu_bo *bo, *next_bo; > - > - mutex_lock(&adev->mn_lock); > - down_write(&amn->lock); > - hash_del(&amn->node); > - rbtree_postorder_for_each_entry_safe(node, next_node, > - &amn->objects.rb_root, it.rb) { > - list_for_each_entry_safe(bo, next_bo, &node->bos, mn_list) { > - bo->mn = NULL; > - list_del_init(&...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...ev.cvq.completed_desc = 0; >> @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) >> struct mlx5_vdpa_virtqueue *mvq; >> int i; >> >> + mlx5_vdpa_info(mvdev, "suspending device\n"); >> + >> down_write(&ndev->reslock); >> ndev->nb_registered = false; >> mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); >> @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) >> suspend_vq(ndev, mvq); >>...