Subject: Re: [PATCH net] bnx2x: limit fw delay in kdump to 5s after boot

From: Michal Schmidt <[email-masked]>
Date: Thu, 07 May 2015 23:19:57 +0200

Dne 7.5.2015 v 21:03 Yuval Mintz napsal(a):
>> +       if (is_kdump_kernel()) {
>> +               ktime_t now = ktime_get_boottime();
>> +               ktime_t fw_ready_time = ktime_set(5, 0);
>> +
>> +               if (ktime_before(now, fw_ready_time))
>> +                       msleep(ktime_ms_delta(fw_ready_time, now));
>
> Can't really say I'm familiar with these APIs , but what about the lower
> msleep limit (is 20 or 50 milliseconds today?)?
> Shouldn't there be an msleep variant that's good for such cases?
> [Or is it a non-issue, since at most msleep will be inaccurate]

msleep(<small_number>) may sleep for a couple of jiffies more than one 
would expect. I think that's what you mean by "the lower msleep limit". 
It does not matter. It's not like we have to hit the 5 seconds mark exactly.

> Regardless, the patch itself looks good.

Thanks,
Michal