[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170111231937.GH8388@tassilo.jf.intel.com>
Date: Wed, 11 Jan 2017 15:19:37 -0800
From: Andi Kleen <ak@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>,
"Huang, Ying" <ying.huang@...el.com>, dave.hansen@...el.com,
aaron.lu@...el.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Hugh Dickins <hughd@...gle.com>,
Shaohua Li <shli@...nel.org>, Minchan Kim <minchan@...nel.org>,
Rik van Riel <riel@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Hillf Danton <hillf.zj@...baba-inc.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH v5 3/9] mm/swap: Split swap cache into 64MB trunks
> Switching from a single radix-tree to an array of radix-trees to reduce
> contention seems a bit hacky. That we can do this and have everything
> continue to work tells me that we're simply using an inappropriate data
> structure to hold this info.
What would you use instead?
A tree with fine grained locking?
FWIW too fine grained locking (e.g. on every node) is usually a bad idea:
it slows down the single thread performance and it causes much more overhead
when there is actual contention because too much time is spent bouncing cache
lines around.
So I actually like the "a little bit more fine grained, but not too much"
approach.
Or a hash table?
Not sure if this would work here.
-Andi
Powered by blists - more mailing lists