Re: [PATCH 11/11] x86/mm, pat: convert pat tree to generic interval tree

2019-10-21 Thread Davidlohr Bueso
On Mon, 07 Oct 2019, Ingo Molnar wrote: I suppose this will be carried in -mm? I've just sent out a new patchset for -tip that only modified the pat tree. It seems that this series will at least take some more time due to the mmu_notifier rework being done - and there was some worries about

Re: [PATCH] drm/msm/a5xx: Fix barrier usage in set_preempt_state()

2019-10-15 Thread Davidlohr Bueso
Forgot to Cc lkml. On Mon, 14 Oct 2019, Davidlohr Bueso wrote: Because it is not a Rmw operation, atomic_set() is never serialized, and therefore the 'upgradable' smp_mb__{before,after}_atomic() calls that order the write to preempt_state are completely bogus. This patch replaces

[PATCH] drm/msm/a5xx: Fix barrier usage in set_preempt_state()

2019-10-15 Thread Davidlohr Bueso
was written. Signed-off-by: Davidlohr Bueso --- drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c index 9cf9353a7ff1..d27d8d3208c6 100644

Re: [PATCH 09/11] lib/interval-tree: convert interval_tree to half closed intervals

2019-10-08 Thread Davidlohr Bueso
On Fri, 04 Oct 2019, Koenig, Christian wrote: Am 04.10.19 um 08:57 schrieb Christian König: Am 03.10.19 um 22:18 schrieb Davidlohr Bueso: The generic tree tree really wants [a, b) intervals, not fully closed. As such convert it to use the new interval_tree_gen.h. Most of the conversions

Re: [PATCH 07/11] vhost: convert vhost_umem_interval_tree to half closed intervals

2019-10-04 Thread Davidlohr Bueso
On Fri, 04 Oct 2019, Michel Lespinasse wrote: On Thu, Oct 03, 2019 at 01:18:54PM -0700, Davidlohr Bueso wrote: @@ -1320,15 +1320,14 @@ static bool iotlb_access_ok(struct vhost_virtqueue *vq, { const struct vhost_umem_node *node; struct vhost_umem *umem = vq->iotlb; -

Re: [PATCH 05/11] IB/hfi1: convert __mmu_int_rb to half closed intervals

2019-10-04 Thread Davidlohr Bueso
On Fri, 04 Oct 2019, Michel Lespinasse wrote: On Thu, Oct 03, 2019 at 01:18:52PM -0700, Davidlohr Bueso wrote: diff --git a/drivers/infiniband/hw/hfi1/mmu_rb.c b/drivers/infiniband/hw/hfi1/mmu_rb.c index 14d2a90964c3..fb6382b2d44e 100644 --- a/drivers/infiniband/hw/hfi1/mmu_rb.c +++ b/drivers

Re: [PATCH -next 00/11] lib/interval-tree: move to half closed intervals

2019-10-04 Thread Davidlohr Bueso
On Fri, 04 Oct 2019, Matthew Wilcox wrote: On Fri, Oct 04, 2019 at 06:15:11AM -0700, Michel Lespinasse wrote: My take is that this (Davidlohr's) patch series does not necessarily need to be applied all at once - we could get the first change in (adding the interval_tree_gen.h header), and

[PATCH 03/11] drm/amdgpu: convert amdgpu_vm_it to half closed intervals

2019-10-04 Thread Davidlohr Bueso
a conversion when doing insertion or lookup. Cc: Jerome Glisse Cc: Alex Deucher Cc: "Christian König" Cc: Daniel Vetter Cc: amd-...@lists.freedesktop.org Signed-off-by: Davidlohr Bueso --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_obj

Re: [PATCH -next 00/11] lib/interval-tree: move to half closed intervals

2019-10-03 Thread Davidlohr Bueso
On Thu, 03 Oct 2019, Jason Gunthorpe wrote: On Thu, Oct 03, 2019 at 01:18:47PM -0700, Davidlohr Bueso wrote: Hi, It has been discussed[1,2] that almost all users of interval trees would better be served if the intervals were actually not [a,b], but instead [a, b). This series attempts

Re: [PATCH -next 00/11] lib/interval-tree: move to half closed intervals

2019-10-03 Thread Davidlohr Bueso
On Thu, 03 Oct 2019, Matthew Wilcox wrote: On Thu, Oct 03, 2019 at 01:18:47PM -0700, Davidlohr Bueso wrote: It has been discussed[1,2] that almost all users of interval trees would better be served if the intervals were actually not [a,b], but instead [a, b). This So how does a user

[PATCH 04/11] drm: convert drm_mm_interval_tree to half closed intervals

2019-10-03 Thread Davidlohr Bueso
-by: Davidlohr Bueso --- drivers/gpu/drm/drm_mm.c | 8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/selftests/test-drm_mm.c | 2 +- include/drm/drm_mm.h | 6 +++--- 4 files changed, 9

[PATCH 09/11] lib/interval-tree: convert interval_tree to half closed intervals

2019-10-03 Thread Davidlohr Bueso
stian König" Cc: Alex Deucher Cc: David Airlie Cc: Daniel Vetter Cc: Doug Ledford Cc: Joerg Roedel Cc: "Jérôme Glisse" Cc: dri-devel@lists.freedesktop.org Cc: linux-r...@vger.kernel.org Signed-off-by: Davidlohr Bueso --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 12 +++--

[PATCH 02/11] lib/interval-tree: add an equivalent tree with [a,b) intervals

2019-10-03 Thread Davidlohr Bueso
, such that users need not need to do the subtraction by one fixup. No users are ported over in this patch. Signed-off-by: Davidlohr Bueso --- include/linux/interval_tree_gen.h | 179 ++ 1 file changed, 179 insertions(+) create mode 100644 include/linux

[PATCH 06/11] IB,usnic: convert usnic_uiom_interval_tree to half closed intervals

2019-10-03 Thread Davidlohr Bueso
Cc: Christian Benvenuti Cc: Nelson Escobar Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-r...@vger.kernel.org Signed-off-by: Davidlohr Bueso --- drivers/infiniband/hw/usnic/usnic_uiom.c | 8 +++ .../infiniband/hw/usnic/usnic_uiom_interval_tree.c |

[PATCH 11/11] x86/mm, pat: convert pat tree to generic interval tree

2019-10-03 Thread Davidlohr Bueso
and so far see no differences in the returned pointer node when doing memtype_rb_lowest_match() lookups. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Signed-off-by: Davidlohr Bueso --- arch/x86/mm/pat.c| 22 +++ arch/x86/mm

[PATCH 10/11] lib: drop interval_tree_generic.h

2019-10-03 Thread Davidlohr Bueso
Now that we have the semi-open equivalent, interval_tree_gen.h, and all users updated, we can do without this header file. Signed-off-by: Davidlohr Bueso --- include/linux/interval_tree_generic.h | 187 -- 1 file changed, 187 deletions(-) delete mode 100644

[PATCH 05/11] IB/hfi1: convert __mmu_int_rb to half closed intervals

2019-10-03 Thread Davidlohr Bueso
The __mmu_int_rb interval tree really wants [a, b) intervals, not fully closed as currently. As such convert it to use the new interval_tree_gen.h. Cc: Mike Marciniszyn Cc: Dennis Dalessandro Cc: Doug Ledford Cc: linux-r...@vger.kernel.org Signed-off-by: Davidlohr Bueso --- drivers

[PATCH 08/11] mm: convert vma_interval_tree to half closed intervals

2019-10-03 Thread Davidlohr Bueso
The vma and anon vma interval tree really wants [a, b) intervals, not fully closed. As such convert it to use the new interval_tree_gen.h. Because of vma_last_pgoff(), the conversion is quite straightforward. Signed-off-by: Davidlohr Bueso --- include/linux/mm.h | 4 ++-- mm/interval_tree.c | 4

[PATCH 07/11] vhost: convert vhost_umem_interval_tree to half closed intervals

2019-10-03 Thread Davidlohr Bueso
of some caller being missed. Cc: Michael S. Tsirkin" Cc: Jason Wang Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Davidlohr Bueso --- drivers/vhost/vhost.c | 19 +-- drivers/vhost/vhost.h | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff

[PATCH 01/11] mm: introduce vma_interval_tree_foreach_stab()

2019-10-03 Thread Davidlohr Bueso
not change any semantics. Signed-off-by: Davidlohr Bueso --- arch/arm/mm/fault-armv.c | 2 +- arch/arm/mm/flush.c| 2 +- arch/nios2/mm/cacheflush.c | 2 +- arch/parisc/kernel/cache.c | 2 +- fs/dax.c | 2 +- include/linux/mm.h | 6 ++ kernel/events/uprobes.c

[PATCH -next 00/11] lib/interval-tree: move to half closed intervals

2019-10-03 Thread Davidlohr Bueso
kernel.org/patchwork/patch/1114629/ Davidlohr Bueso (11): mm: introduce vma_interval_tree_foreach_stab() lib/interval-tree: add an equivalent tree with [a,b) intervals drm/amdgpu: convert amdgpu_vm_it to half closed intervals drm: convert drm_mm_interval_tree to half closed interval

Re: [PATCH v4 0/4] Implement lazy unmapping for GEM VRAM buffers

2019-09-09 Thread Davidlohr Bueso
| 4 + 4 files changed, 198 insertions(+), 65 deletions(-) Thanks for the prompt fix, feel free to add my: Reported-and-tested-by: Davidlohr Bueso ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman

Re: [PATCH v2 0/3] ast, mgag200: Map console BO while it's being displayed

2019-09-05 Thread Davidlohr Bueso
On Wed, 04 Sep 2019, Daniel Vetter wrote: I'm also not sure whether we have a real problem here, it's just debug noise that we're fighting here? It is non stop debug noise as the memory range in question is being added + deleted over and over. I doubt we want to be burning cycles like this.

potential regression in drm/mgag200

2019-09-04 Thread Davidlohr Bueso
Hi, While doing some changes to x86's pat code and thus having 'debugpat', I noticed some weird behavior in a server running linux-next as of -- yes, reverting does 'fix' the issue: 90f479ae51a (drm/mgag200: Replace struct mga_fbdev with generic framebuffer emulation) Where the following

Re: [PATCH 1/2] lib/rbtree,drm/mm: Add rbtree_replace_node_cached()

2017-11-13 Thread Davidlohr Bueso
. Furthermore the only user of drm_mm_replace_node() is its testsuite... Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Testcase: igt/drm_mm/replace Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Davidlohr Bueso <dbu...@suse.de> Cc: Jérôme Glis

[PATCH 11/17] lib/interval_tree: fast overlap detection

2017-07-19 Thread Davidlohr Bueso
: Peter Zijlstra (Intel) <pet...@infradead.org> Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +

[PATCH 6/9] lib/interval_tree: Fast overlap detection

2017-06-29 Thread Davidlohr Bueso
org Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Jason Wang <jasow...@redhat.com> Cc: Doug Ledford <dledf...@redhat.com> Cc: Christian Benvenuti <be...@cisco.com> Cc: linux-r...@vger.kernel.org Acked-by: Christian König <christian.koe...@amd.com>

[PATCH 5/8] lib/interval_tree: Fast overlap detection

2017-06-08 Thread Davidlohr Bueso
org Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Jason Wang <jasow...@redhat.com> Cc: Doug Ledford <dledf...@redhat.com> Cc: Christian Benvenuti <be...@cisco.com> Cc: linux-r...@vger.kernel.org Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- This is par

[PATCH 6/6] drm/exynos: call find_vma with the mmap_sem held

2014-04-19 Thread Davidlohr Bueso
iterating through the vmacache and/or rbtree. This patch is completely *untested*. Signed-off-by: Jonathan Gonzalez V Signed-off-by: Davidlohr Bueso Cc: Inki Dae Cc: Joonyoung Shim Cc: David Airlie Cc: dri-devel at lists.freedesktop.org Cc: linux-samsung-soc at vger.kernel.org --- drivers/gpu/d

[PATCH RESEND] drm: include missing types header to drm_mode.h

2010-10-25 Thread Davidlohr Bueso
On Fri, 2010-10-22 at 17:02 -0700, Randy Dunlap wrote: > On Fri, 22 Oct 2010 16:55:17 -0700 Andrew Morton wrote: > > > On Fri, 22 Oct 2010 10:13:19 -0300 > > Davidlohr Bueso wrote: > > > > > drm: include missing types header to drm_mode.h > >

[PATCH RESEND] drm: include missing types header to drm_mode.h

2010-10-22 Thread Davidlohr Bueso
drm: include missing types header to drm_mode.h Signed-off-by: Davidlohr Bueso --- include/drm/drm_mode.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397..eddd7f4 100644 --- a/include/drm/drm_mode.h +++ b

[PATCH RESEND] drm: include missing types header to drm_mode.h

2010-10-22 Thread Davidlohr Bueso
drm: include missing types header to drm_mode.h Signed-off-by: Davidlohr Bueso d...@gnu.org --- include/drm/drm_mode.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397..eddd7f4 100644 --- a/include/drm

[PATCH] drm: include missing types header to drm_mode.h

2010-10-18 Thread Davidlohr Bueso
drm: include missing types header to drm_mode.h Signed-off-by: Davidlohr Bueso --- include/drm/drm_mode.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397..eddd7f4 100644 --- a/include/drm/drm_mode.h +++ b

[PATCH] drm: include missing types header to drm_mode.h

2010-10-18 Thread Davidlohr Bueso
drm: include missing types header to drm_mode.h Signed-off-by: Davidlohr Bueso d...@gnu.org --- include/drm/drm_mode.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397..eddd7f4 100644 --- a/include/drm

[PATCH] DRM: Replace kmalloc/memset combos with kzalloc

2010-08-11 Thread Davidlohr Bueso
On Wed, 2010-08-11 at 07:35 -0700, Joe Perches wrote: > On Wed, 2010-08-11 at 09:18 -0400, Davidlohr Bueso wrote: > > memory allocation in drm_bufs.c is followed by initializing the memory with > > 0. > > > > Replace the use of kmalloc+memset with kzalloc. > >

[PATCH] DRM: Replace kmalloc/memset combos with kzalloc

2010-08-11 Thread Davidlohr Bueso
Currently most, if not all, memory allocation in drm_bufs.c is followed by initializing the memory with 0. Replace the use of kmalloc+memset with kzalloc. Signed-off-by: Davidlohr Bueso --- drivers/gpu/drm/drm_bufs.c | 33 +++-- 1 files changed, 11 insertions

[PATCH] i915: Remove redundant NULL check upon kfree()

2010-08-11 Thread Davidlohr Bueso
i915: Remove redundant NULL check upon kfree(). Signed-off-by: Davidlohr Bueso --- drivers/gpu/drm/i915/intel_dvo.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 227feca..b3955bc 100644

[PATCH] i915: Remove redundant NULL check upon kfree()

2010-08-11 Thread Davidlohr Bueso
i915: Remove redundant NULL check upon kfree(). Signed-off-by: Davidlohr Bueso d...@gnu.org --- drivers/gpu/drm/i915/intel_dvo.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 227feca..b3955bc

[PATCH] DRM: Replace kmalloc/memset combos with kzalloc

2010-08-11 Thread Davidlohr Bueso
Currently most, if not all, memory allocation in drm_bufs.c is followed by initializing the memory with 0. Replace the use of kmalloc+memset with kzalloc. Signed-off-by: Davidlohr Bueso d...@gnu.org --- drivers/gpu/drm/drm_bufs.c | 33 +++-- 1 files changed, 11