All of lore.kernel.org
 help / color / mirror / Atom feed
* round_jiffies for schedule_delayed_work?
@ 2007-02-14 21:39 Johannes Berg
  2007-02-15 15:06 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2007-02-14 21:39 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, Arjan van de Ven

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: round_jiffies for schedule_delayed_work?
  2007-02-14 21:39 round_jiffies for schedule_delayed_work? Johannes Berg
@ 2007-02-15 15:06 ` John W. Linville
  2007-02-15 18:16   ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2007-02-15 15:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Larry Finger, linux-wireless, Arjan van de Ven

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
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: round_jiffies for schedule_delayed_work?
  2007-02-15 15:06 ` John W. Linville
@ 2007-02-15 18:16   ` Arjan van de Ven
  2007-02-16  9:03     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2007-02-15 18:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: Johannes Berg, Larry Finger, linux-wireless

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....

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: round_jiffies for schedule_delayed_work?
  2007-02-15 18:16   ` Arjan van de Ven
@ 2007-02-16  9:03     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2007-02-16  9:03 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: John W. Linville, Larry Finger, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-16  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 21:39 round_jiffies for schedule_delayed_work? Johannes Berg
2007-02-15 15:06 ` John W. Linville
2007-02-15 18:16   ` Arjan van de Ven
2007-02-16  9:03     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.