Hi,
I was looking through recent commits in wireless-dev and found
e226b8aa8921b6b75dcd0142a990b8c7bc1548fd which is correct, but I was
wondering if it may be possible to do it more efficiently.
We don't really need this code running every second after we init,
having it run every second on average is good enough. I don't see any
way to do this with the delayed work API though since
schedule_delayed_work simply adds the timer at jiffies+delay.
Should we be using a timer and round_jiffies() instead?
johannes
On Thu, 2007-02-15 at 19:16 +0100, Arjan van de Ven wrote:
> there is round_jiffies_relative() you can use for this kind of purpose.....
I actually looked at the code for it but didn't make the connection.
Sorry, I really should have. I'll see if I can do some patches.
johannes
John W. Linville wrote:
> On Wed, Feb 14, 2007 at 10:39:23PM +0100, Johannes Berg wrote:
>> Hi,
>>
>> I was looking through recent commits in wireless-dev and found
>> e226b8aa8921b6b75dcd0142a990b8c7bc1548fd which is correct, but I was
>> wondering if it may be possible to do it more efficiently.
>>
>> We don't really need this code running every second after we init,
>> having it run every second on average is good enough. I don't see any
>> way to do this with the delayed work API though since
>> schedule_delayed_work simply adds the timer at jiffies+delay.
>>
>> Should we be using a timer and round_jiffies() instead?
>
> Using round_jiffies seems reasonable. Perhaps the delayed work API
> can be extended to use it?
there is round_jiffies_relative() you can use for this kind of purpose....
On Wed, Feb 14, 2007 at 10:39:23PM +0100, Johannes Berg wrote:
> Hi,
>
> I was looking through recent commits in wireless-dev and found
> e226b8aa8921b6b75dcd0142a990b8c7bc1548fd which is correct, but I was
> wondering if it may be possible to do it more efficiently.
>
> We don't really need this code running every second after we init,
> having it run every second on average is good enough. I don't see any
> way to do this with the delayed work API though since
> schedule_delayed_work simply adds the timer at jiffies+delay.
>
> Should we be using a timer and round_jiffies() instead?
Using round_jiffies seems reasonable. Perhaps the delayed work API
can be extended to use it?
John
--
John W. Linville
[email protected]