lkml.org 
[lkml]   [2014]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 1/2]percpu_ida: fix a live lock
    On Mon, Jan 06, 2014 at 01:47:26PM -0800, Kent Overstreet wrote:
    > Ok, so I hadn't really given any thought to that kind of use case; insofar as I
    > had I would've been skeptical percpu tag allocation made sense for 32 different
    > tags at all.
    >
    > We really don't want to screw over the users that aren't so constrained by the
    > size of their tag space; there really is a huge performance tradeoff here
    > (otherwise you're stealing tags and bouncing cachelines for _every_ tag
    > allocation when the queue is full, and your percpu tag allocation is no longer
    > very percpu).
    >
    > I'm not sure what the best strategy is for NCQ-type max nr_tags, though -
    > thoughts?
    >
    > Easy thing to do for now is just to add another parameter to percpu_ida_init()
    > for the number of tags that are allowed to sit unused on other cpu's freelists -
    > users that have large relatively unbounded nr_tags can set that to nr_tags / 2,
    > for NCQ you'd set it to 0.
    >
    > I suspect we can do better for NCQ though, w.r.t. worst case performance.

    Yeah, that was my first thought when I posted "percpu_ida: Allow variable
    maximum number of cached tags" patch some few months ago. But I am back-
    pedalling as it does not appear solves the fundamental problem - what is the
    best threshold?

    May be we can walk off with a per-cpu timeout that flushes batch nr of tags
    from local caches to the pool? Each local allocation would restart the timer,
    but once allocation requests stopped coming on a CPU the tags would not gather
    dust in local caches.

    --
    Regards,
    Alexander Gordeev
    agordeev@redhat.com


    \
     
     \ /
      Last update: 2014-02-09 17:21    [W:6.430 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site