Skip to content
  • Shaohua Li's avatar
    percpu_ida: fix a live lock · d835502f
    Shaohua Li authored
    
    
    steal_tags only happens when free tags is more than half of the total
    tags.  This is too strict and can cause live lock. I found that if one
    cpu has free tags, but other cpu can't steal (thread is bound to
    specific cpus), threads which want to allocate tags are always
    sleeping. I found this when I run next patch, but this could happen
    without it I think.
    
    I did performance test too with null_blk. Two cases (each cpu has enough
    percpu tags, or total tags are limited), no performance changes were
    observed.
    
    Signed-off-by: default avatarShaohua Li <shli@fusionio.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    d835502f