Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-05 Thread Uladzislau Rezki
On Mon, May 04, 2020 at 01:16:41PM -0700, Paul E. McKenney wrote: > On Mon, May 04, 2020 at 09:51:28PM +0200, Uladzislau Rezki wrote: > > > > > Since we don't care about traversing backwards, isn't it better to > > > > > use llist > > > > > for this usecase? > > > > > > > > > > I think Vlad is

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Paul E. McKenney
On Mon, May 04, 2020 at 09:51:28PM +0200, Uladzislau Rezki wrote: > > > > Since we don't care about traversing backwards, isn't it better to use > > > > llist > > > > for this usecase? > > > > > > > > I think Vlad is using locking as we're also tracking the size of the > > > > llist to > > > >

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread joel
On May 4, 2020 3:51:28 PM EDT, Uladzislau Rezki wrote: >> > > Since we don't care about traversing backwards, isn't it better >to use llist >> > > for this usecase? >> > > >> > > I think Vlad is using locking as we're also tracking the size of >the llist to >> > > know when to free pages. This

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Uladzislau Rezki
> > > Since we don't care about traversing backwards, isn't it better to use > > > llist > > > for this usecase? > > > > > > I think Vlad is using locking as we're also tracking the size of the > > > llist to > > > know when to free pages. This tracking could suffer from the lost-update > > >

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Joel Fernandes
Hi Paul, On Mon, May 4, 2020 at 3:01 PM Paul E. McKenney wrote: > > On Mon, May 04, 2020 at 02:08:05PM -0400, Joel Fernandes wrote: > > On Mon, May 04, 2020 at 07:48:22PM +0200, Uladzislau Rezki wrote: > > > On Mon, May 04, 2020 at 08:24:37AM -0700, Paul E. McKenney wrote: > > [..] > > > > > >

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Paul E. McKenney
On Mon, May 04, 2020 at 02:08:05PM -0400, Joel Fernandes wrote: > On Mon, May 04, 2020 at 07:48:22PM +0200, Uladzislau Rezki wrote: > > On Mon, May 04, 2020 at 08:24:37AM -0700, Paul E. McKenney wrote: > [..] > > > > > Presumably the list can also be accessed without holding this lock, > > > > >

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Joel Fernandes
On Mon, May 04, 2020 at 07:48:22PM +0200, Uladzislau Rezki wrote: > On Mon, May 04, 2020 at 08:24:37AM -0700, Paul E. McKenney wrote: [..] > > > > Presumably the list can also be accessed without holding this lock, > > > > because otherwise we shouldn't need llist... > > > > > > > Hm... We

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Paul E. McKenney
On Mon, May 04, 2020 at 07:48:22PM +0200, Uladzislau Rezki wrote: > On Mon, May 04, 2020 at 08:24:37AM -0700, Paul E. McKenney wrote: > > On Mon, May 04, 2020 at 02:43:23PM +0200, Uladzislau Rezki wrote: > > > On Fri, May 01, 2020 at 02:27:49PM -0700, Paul E. McKenney wrote: > > > > On Tue, Apr

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Uladzislau Rezki
On Mon, May 04, 2020 at 08:24:37AM -0700, Paul E. McKenney wrote: > On Mon, May 04, 2020 at 02:43:23PM +0200, Uladzislau Rezki wrote: > > On Fri, May 01, 2020 at 02:27:49PM -0700, Paul E. McKenney wrote: > > > On Tue, Apr 28, 2020 at 10:58:48PM +0200, Uladzislau Rezki (Sony) wrote: > > > > Cache

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Paul E. McKenney
On Mon, May 04, 2020 at 02:43:23PM +0200, Uladzislau Rezki wrote: > On Fri, May 01, 2020 at 02:27:49PM -0700, Paul E. McKenney wrote: > > On Tue, Apr 28, 2020 at 10:58:48PM +0200, Uladzislau Rezki (Sony) wrote: > > > Cache some extra objects per-CPU. During reclaim process > > > some pages are

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-04 Thread Uladzislau Rezki
On Fri, May 01, 2020 at 02:27:49PM -0700, Paul E. McKenney wrote: > On Tue, Apr 28, 2020 at 10:58:48PM +0200, Uladzislau Rezki (Sony) wrote: > > Cache some extra objects per-CPU. During reclaim process > > some pages are cached instead of releasing by linking them > > into the list. Such approach

Re: [PATCH 09/24] rcu/tree: cache specified number of objects

2020-05-01 Thread Paul E. McKenney
On Tue, Apr 28, 2020 at 10:58:48PM +0200, Uladzislau Rezki (Sony) wrote: > Cache some extra objects per-CPU. During reclaim process > some pages are cached instead of releasing by linking them > into the list. Such approach provides O(1) access time to > the cache. > > That reduces number of

[PATCH 09/24] rcu/tree: cache specified number of objects

2020-04-28 Thread Uladzislau Rezki (Sony)
Cache some extra objects per-CPU. During reclaim process some pages are cached instead of releasing by linking them into the list. Such approach provides O(1) access time to the cache. That reduces number of requests to the page allocator, also that makes it more helpful if a low memory condition