• Jens Axboe's avatar
    block: relax jiffies rounding for timeouts · 9054650f
    Jens Axboe authored
    In doing high IOPS testing, blk-mq is generally pretty well optimized.
    There are a few things that stuck out as using more CPU than what is
    really warranted, and one thing is the round_jiffies_up() that we do
    twice for each request. That accounts for about 0.8% of the CPU in
    my testing.
    
    We can make this cheaper by avoiding an integer division, by just adding
    a rough HZ mask that we can AND with instead. The timeouts are only on a
    second granularity already, we don't have to be that accurate here and
    this patch barely changes that. All we care about is nice grouping.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    9054650f
blk-timeout.c 4.12 KB