From: Shaohua Li Date: Tue, 31 Dec 2013 03:38:27 +0000 (+0800) Subject: percpu_ida: fix a live lock X-Git-Tag: v3.14-rc3~22^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d835502f3dacad1638d516ab156d66f0ba377cf5;p=pandora-kernel.git percpu_ida: fix a live lock 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: Shaohua Li Signed-off-by: Jens Axboe --- Reading git-diff-tree failed