Displaying 13 results from an estimated 13 matches for "hash_add".
2019 Oct 24
0
[PATCH v2 1/3] kcov: remote coverage support
...if (kcov_remote_find(handle))
> + return ERR_PTR(-EEXIST);
> + remote = kmalloc(sizeof(*remote), GFP_ATOMIC);
> + if (!remote)
> + return ERR_PTR(-ENOMEM);
> + remote->handle = handle;
> + remote->kcov = kcov;
> + hash_add(kcov_remote_map, &remote->hnode, handle);
I think it will make sense to check that there is no existing kcov
with the same handle registered. Such condition will be extremely hard
to debug based on episodically missing coverage.
...
> void kcov_task_exit(struct task_struct *t)
> {...
2019 Oct 23
0
[PATCH v2 1/3] kcov: remote coverage support
...> +{
> + struct kcov_remote *remote;
> +
> + if (kcov_remote_find(handle))
> + return ERR_PTR(-EEXIST);
> + remote = kmalloc(sizeof(*remote), GFP_ATOMIC);
> + if (!remote)
> + return ERR_PTR(-ENOMEM);
> + remote->handle = handle;
> + remote->kcov = kcov;
> + hash_add(kcov_remote_map, &remote->hnode, handle);
> + return remote;
> +}
> +
>
> ...
>
> + spin_lock(&kcov_remote_lock);
> + for (i = 0; i < remote_arg->num_handles; i++) {
> + kcov_debug("handle %llx\n", remote_arg->handles[i]);
> + if (!k...
2017 Jan 28
0
[ANNOUNCE] libdrm 2.4.75
...el: Clear execobject flags before preserving object in reuse cache
intel: Export a function to re-enable implicit synchronisation
Dave Airlie (2):
Revert "Bump version for 2.4.75 release"
intel: fix make distcheck
Dongwon Kim (1):
intel: update global_name before HASH_ADD
Emil Velikov (16):
xf86drm: use maj/min in drmParsePciDeviceInfo()
xf86drm: add plumbing to not retrieve PCI device revision
xf86drm: parse the separate sysfs files for vendor... info
xf86drm: introduce drmGetDevice[s]2
tests/drmdevice: use drmGetDevice[s]2
test...
2019 Oct 29
0
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
...lease_locks;
> - }
> -
> - amn->adev = adev;
> - init_rwsem(&amn->lock);
> - amn->type = type;
> -
> - amn->mirror.ops = &amdgpu_hmm_mirror_ops[type];
> - r = hmm_mirror_register(&amn->mirror, mm);
> - if (r)
> - goto free_amn;
> -
> - hash_add(adev->mn_hash, &amn->node, AMDGPU_MN_KEY(mm, type));
> -
> -release_locks:
> - up_write(&mm->mmap_sem);
> - mutex_unlock(&adev->mn_lock);
> -
> - return amn;
> -
> -free_amn:
> - up_write(&mm->mmap_sem);
> - mutex_unlock(&adev->mn_...
2019 Oct 28
1
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
...KERNEL);
- if (!amn) {
- amn = ERR_PTR(-ENOMEM);
- goto release_locks;
- }
-
- amn->adev = adev;
- init_rwsem(&amn->lock);
- amn->type = type;
-
- amn->mirror.ops = &amdgpu_hmm_mirror_ops[type];
- r = hmm_mirror_register(&amn->mirror, mm);
- if (r)
- goto free_amn;
-
- hash_add(adev->mn_hash, &amn->node, AMDGPU_MN_KEY(mm, type));
-
-release_locks:
- up_write(&mm->mmap_sem);
- mutex_unlock(&adev->mn_lock);
-
- return amn;
-
-free_amn:
- up_write(&mm->mmap_sem);
- mutex_unlock(&adev->mn_lock);
- kfree(amn);
-
- return ERR_PTR(r);
-}
-...
2019 Nov 12
0
[PATCH v3 12/14] drm/amdgpu: Use mmu_interval_notifier instead of hmm_mirror
...KERNEL);
- if (!amn) {
- amn = ERR_PTR(-ENOMEM);
- goto release_locks;
- }
-
- amn->adev = adev;
- init_rwsem(&amn->lock);
- amn->type = type;
-
- amn->mirror.ops = &amdgpu_hmm_mirror_ops[type];
- r = hmm_mirror_register(&amn->mirror, mm);
- if (r)
- goto free_amn;
-
- hash_add(adev->mn_hash, &amn->node, AMDGPU_MN_KEY(mm, type));
-
-release_locks:
- up_write(&mm->mmap_sem);
- mutex_unlock(&adev->mn_lock);
-
- return amn;
-
-free_amn:
- up_write(&mm->mmap_sem);
- mutex_unlock(&adev->mn_lock);
- kfree(amn);
-
- return ERR_PTR(r);
-}
-...
2019 Oct 29
4
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
On Tue, Oct 29, 2019 at 07:22:37PM +0000, Yang, Philip wrote:
> Hi Jason,
>
> I did quick test after merging amd-staging-drm-next with the
> mmu_notifier branch, which includes this set changes. The test result
> has different failures, app stuck intermittently, GUI no display etc. I
> am understanding the changes and will try to figure out the cause.
Thanks! I'm not
2019 Oct 21
0
[PATCH RFC 1/3] kcov: remote coverage support
...if (kcov_remote_find(handle))
> + return ERR_PTR(-EEXIST);
> + remote = kmalloc(sizeof(*remote), GFP_ATOMIC);
> + if (!remote)
> + return ERR_PTR(-ENOMEM);
> + remote->handle = handle;
> + remote->kcov = kcov;
> + hash_add(kcov_remote_map, &remote->hnode, handle);
> + return remote;
> +}
> +
> +static struct kcov_remote_area *kcov_remote_area_get(unsigned int size)
> +{
> + struct kcov_remote_area *area;
> + struct list_head *pos;
> +
> + kcov_debug("size...
2019 Aug 09
6
[RFC PATCH v6 71/92] mm: add support for remote mapping
...;
+
+ hash_for_each_possible(tdb_hash, tdb, db_link, (unsigned long)mm)
+ if (tdb->mm == mm && refcount_inc_not_zero(&tdb->refcnt)) {
+ found = true;
+ break;
+ }
+
+ if (!found && allocated != NULL) {
+ tdb = allocated;
+ allocated = NULL;
+
+ tdb->mm = mm;
+ hash_add(tdb_hash, &tdb->db_link, (unsigned long)mm);
+ refcount_set(&tdb->refcnt, 1);
+ }
+
+ spin_unlock(&tdb_lock);
+
+ if (allocated != NULL)
+ target_db_free(allocated);
+
+ if (found || tdb == NULL)
+ return tdb;
+
+ /*
+ * register a mmu notifier when adding this entry to the li...
2019 Nov 12
20
[PATCH hmm v3 00/14] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2019 Oct 28
32
[PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running
on the host or in a separate VM, to control the execution of other VM-s
(pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.),
alter the page access bits in the shadow page tables (only for the hardware
backed ones, eg. Intel's EPT) and receive notifications when events of
interest have taken place
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running
on the host or in a separate VM, to control the execution of other VM-s
(pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.),
alter the page access bits in the shadow page tables (only for the hardware
backed ones, eg. Intel's EPT) and receive notifications when events of
interest have taken place