lkml.org 
[lkml]   [2018]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC v1] mm: add the preempt check into alloc_vmap_area()
On Fri, Mar 02, 2018 at 03:34:52PM -0800, Andrew Morton wrote:
> On Tue, 27 Feb 2018 05:06:43 -0800 Matthew Wilcox <willy@infradead.org> wrote:
>
> > On Tue, Feb 27, 2018 at 11:22:59AM +0100, Uladzislau Rezki (Sony) wrote:
> > > During finding a suitable hole in the vmap_area_list
> > > there is an explicit rescheduling check for latency reduction.
> > > We do it, since there are workloads which are sensitive for
> > > long (more than 1 millisecond) preemption off scenario.
> >
> > I understand your problem, but this is a horrid solution. If it takes
> > us a millisecond to find a suitable chunk of free address space, something
> > is terribly wrong. On a 3GHz CPU, that's 3 million clock ticks!
>
> Yup.
>
> > I think our real problem is that we have no data structure that stores
> > free VA space. We have the vmap_area which stores allocated space, but no
> > data structure to store free space.
>
> I wonder if we can reuse free_vmap_cache as a quick fix: if
> need_resched(), point free_vmap_cache at the current rb_node, drop the
> lock, cond_resched, goto retry?
>
It sounds like we can. But there is a concern if that potentially can
introduce a degrade of search time due to changing a starting point
for our search.

--
Vlad Rezki

\
 
 \ /
  Last update: 2018-03-03 22:18    [W:0.083 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site