[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4 0/9] mm/swap: Regular page swap optimizations
On Tue, 2017-01-03 at 13:34 +0900, Minchan Kim wrote:
> Hi Jan,
> On Mon, Jan 02, 2017 at 04:48:41PM +0100, Jan Kara wrote:
> >
> > Hi,
> >
> > On Tue 27-12-16 16:45:03, Minchan Kim wrote:
> > >
> > > >
> > > > Patch 3 splits the swap cache radix tree into 64MB chunks, reducing
> > > >         the rate that we have to contende for the radix tree.
> > > To me, it's rather hacky. I think it might be common problem for page cache
> > > so can we think another generalized way like range_lock? Ccing Jan.
> > I agree on the hackyness of the patch and that page cache would suffer with
> > the same contention (although the files are usually smaller than swap so it
> > would not be that visible I guess). But I don't see how range lock would
> > help here - we need to serialize modifications of the tree structure itself
> > and that is difficult to achieve with the range lock. So what you would
> > need is either a different data structure for tracking swap cache entries
> > or a finer grained locking of the radix tree.
> Thanks for the comment, Jan.
> I think there are more general options. One is to shrink batching pages like
> Mel and Tim had approached.

The batching of pages is done in this patch series with a page allocation cache
and page release cache.  It is done a bit differently than my original patch proposal.

This reduces the contention on the swap_info lock. We uses
the splitting of the radix tree to reduce the radix tree lock contention.

In our tests, these two approaches combined are quite effective in reducing the
latency on actual fast solid state drives.  So we hope that the patch series
can be merged to facilitate the use case of using these drives as secondary


> Or concurrent page cache by peter.
> Ccing Nick who might have an interest on lockless page cache.
> Thanks.

 \ /
  Last update: 2017-01-03 18:49    [W:0.331 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site