mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: [PATCH] provide hrtimer exports for module use [Was: Exportsfor hrtimer APIs]
@ 2006-03-14 22:34 Stone, Joshua I
  2006-03-14 22:49 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Stone, Joshua I @ 2006-03-14 22:34 UTC (permalink / raw)
  To: tglx; +Cc: Andrew Morton, linux-kernel

Thomas Gleixner wrote:
> What means "more for defining intervals" ? Which intervals  (period in
> ms)? What are the timers used for ?

The user can write a block of code that they would like to be executed
repeatedly in fixed intervals.  A trivial example might look like this:
    probe timer.ms(10) { flush_data(); }

This would flush the data every 10ms.

A example of polling might be:
    probe timer.ms(1) { log(scheduler_queue_length()); }

I hope this answers your questions...


Josh

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

* RE: [PATCH] provide hrtimer exports for module use [Was: Exportsfor hrtimer APIs]
  2006-03-14 22:34 [PATCH] provide hrtimer exports for module use [Was: Exportsfor hrtimer APIs] Stone, Joshua I
@ 2006-03-14 22:49 ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2006-03-14 22:49 UTC (permalink / raw)
  To: Stone, Joshua I; +Cc: Andrew Morton, linux-kernel

On Tue, 2006-03-14 at 14:34 -0800, Stone, Joshua I wrote:
> Thomas Gleixner wrote:
> > What means "more for defining intervals" ? Which intervals  (period in
> > ms)? What are the timers used for ?
> 
> The user can write a block of code that they would like to be executed
> repeatedly in fixed intervals.  A trivial example might look like this:
>     probe timer.ms(10) { flush_data(); }
> 
> This would flush the data every 10ms.
> 
> A example of polling might be:
>     probe timer.ms(1) { log(scheduler_queue_length()); }
> 
> I hope this answers your questions...

Not all all.

I have no clue where the block of code written by the user is executed
and why it needs exports. When a user writes code he can use the
existing userpsace interfaces, so why does the module need that
exports ?

	tglx



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

* RE: [PATCH] provide hrtimer exports for module use [Was:Exportsfor hrtimer APIs]
@ 2006-03-14 23:31 Stone, Joshua I
  0 siblings, 0 replies; 3+ messages in thread
From: Stone, Joshua I @ 2006-03-14 23:31 UTC (permalink / raw)
  To: tglx; +Cc: Andrew Morton, linux-kernel

Thomas Gleixner wrote:
> I have no clue where the block of code written by the user is executed
> and why it needs exports. When a user writes code he can use the
> existing userpsace interfaces, so why does the module need that
> exports ?

Sorry - by user I mean a SystemTap user, who must be a priviledged user
to run SystemTap and load a kernel module in the first place.  When a
script is executed, the following happens:

1. The script with the user's probes is parsed by SystemTap.
2. SystemTap generates C code for a kernel module that implements the
probes.
3. The module is compiled and loaded into the kernel.
4. On loading, the probes register with the appropriate kernel APIs.
For function probes, this means using the kprobes interface.  For
asynchronous timer probes, the module must call timer APIs - e.g.
hrtimers.
5. As the events occur, the probe bodies are executed.
6. Finally the module terminates, unregisters all probes, and is
unloaded from the kernel.

In order to call hrtimer_init and such in step 4, those functions need
to be exported.


Josh

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

end of thread, other threads:[~2006-03-14 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-14 22:34 [PATCH] provide hrtimer exports for module use [Was: Exportsfor hrtimer APIs] Stone, Joshua I
2006-03-14 22:49 ` Thomas Gleixner
2006-03-14 23:31 [PATCH] provide hrtimer exports for module use [Was:Exportsfor " Stone, Joshua I

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome