Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1692246 > unrolled thread

Re: [PATCH -next v3 0/9] rbtree: Cache leftmost node internally

Started byAndrew Morton <akpm@linux-foundation.org>
First post2017-07-20 01:00 +0200
Last post2017-07-20 01:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH -next v3 0/9] rbtree: Cache leftmost node internally Andrew Morton <akpm@linux-foundation.org> - 2017-07-20 01:00 +0200
    Re: [PATCH -next v3 0/9] rbtree: Cache leftmost node internally Davidlohr Bueso <dave@stgolabs.net> - 2017-07-20 01:10 +0200

#1692246 — Re: [PATCH -next v3 0/9] rbtree: Cache leftmost node internally

FromAndrew Morton <akpm@linux-foundation.org>
Date2017-07-20 01:00 +0200
SubjectRe: [PATCH -next v3 0/9] rbtree: Cache leftmost node internally
Message-ID<u566K-6L0-15@gated-at.bofh.it>
On Thu, 29 Jun 2017 10:15:44 -0700 Davidlohr Bueso <dave@stgolabs.net> wrote:

> Changes from v2 (https://lkml.org/lkml/2017/6/8/857):
> - Fixed 0day reported crash for drm_mm selftest program. We were
> not correctly using the cached version of rbtree with the allocated
> nodes.
> - Added cfq patch to use internal rbtree caching.
> - Added Christian's and Jan's reviews.
> 
> Changes from v1 (https://marc.info/?l=linux-kernel&m=149611025616685):
> - No longer rfc.
> - Removed bogus semimcolon in rb_first_cached()
> - Updated missing interval tree user drivers/infiniband/hw/hfi1/
> - Removed redundant @cached arg in when erasing a node.
> - Added more patches that make use of rb_first_cached(), which I
>   thought might be worth it: procfs and epoll.
> - Cc more people for patch 5, which touches drivers such as infiniband
> and gpu. The rest of the changes are pretty covered with the current
> Cc'ed maintainers and mm folks.
> 
> Hi,
> 
> Here's a proposal for extending rbtrees to internally cache the leftmost
> node such that we can have fast overlap check optimization for all interval
> tree users[1]. The benefits of this series are that:
> 
> (i)   Unify users that do internal leftmost node caching.

That's nice.  Except the series adds more lines than it removes.

> (ii)  Optimize all interval tree users.

Was any attempt made to quantify the benefit?

> (iii) Convert at least two new users (epoll and procfs) to the new interface.
> 

[toc] | [next] | [standalone]


#1692253

FromDavidlohr Bueso <dave@stgolabs.net>
Date2017-07-20 01:10 +0200
Message-ID<u56gp-73P-13@gated-at.bofh.it>
In reply to#1692246
On Wed, 19 Jul 2017, Andrew Morton wrote:

>On Thu, 29 Jun 2017 10:15:44 -0700 Davidlohr Bueso <dave@stgolabs.net> wrote:
>
>> Changes from v2 (https://lkml.org/lkml/2017/6/8/857):
>> - Fixed 0day reported crash for drm_mm selftest program. We were
>> not correctly using the cached version of rbtree with the allocated
>> nodes.
>> - Added cfq patch to use internal rbtree caching.
>> - Added Christian's and Jan's reviews.
>>
>> Changes from v1 (https://marc.info/?l=linux-kernel&m=149611025616685):
>> - No longer rfc.
>> - Removed bogus semimcolon in rb_first_cached()
>> - Updated missing interval tree user drivers/infiniband/hw/hfi1/
>> - Removed redundant @cached arg in when erasing a node.
>> - Added more patches that make use of rb_first_cached(), which I
>>   thought might be worth it: procfs and epoll.
>> - Cc more people for patch 5, which touches drivers such as infiniband
>> and gpu. The rest of the changes are pretty covered with the current
>> Cc'ed maintainers and mm folks.
>>
>> Hi,
>>
>> Here's a proposal for extending rbtrees to internally cache the leftmost
>> node such that we can have fast overlap check optimization for all interval
>> tree users[1]. The benefits of this series are that:
>>
>> (i)   Unify users that do internal leftmost node caching.
>
>That's nice.  Except the series adds more lines than it removes.
>
>> (ii)  Optimize all interval tree users.
>
>Was any attempt made to quantify the benefit?

Yes, but ultimately it will depend a lot on the workload and size of the tree.
For bare numbers, on a Xeon E5-2450 @ 2.10GHz the cost of a rb_first() was
~60 cycles for 100 nodes, and ~75 cycles with 1000 nodes. fwiw.

Thanks,
Davidlohr

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web