Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/share/man/man9



On Mon, Jan 25, 2010 at 12:54:45PM -0800, Paul Goyette wrote:
> This routine is really targetted specifically for use by the 
> sysmon_envsys(8) facility.  This man page seems to imply that it's 
> available for general-purpose use.

Well, the sysmon-part is in the name so... :)

While it is targeted for sysmon_envsys(8), the most important task for it on
x86 is to schedule all ACPI notifys, including interrupts, via the
AcpiOsExecute (see sys/dev/acpi/acpica/OsdSchedule.c). I would presume that
this was also the reason why it was originally written.

The other places where it is currently used:

        * sys/arch/arm/xscale/becc_button.c
        * sys/arch/evbarm/hdl_g/btn_obio.c
        * sys/arch/evbarm/nslu2/nslu2_buttons.c
        * sys/arch/hp700/dev/power.c
        * sys/arch/landisk/dev/btn_obio.c
        * sys/arch/landisk/dev/pwrsw_obio.c
        * sys/arch/mips/atheros/dev/argpio.c
        * sys/arch/sgimips/hpc/panel.c
        * sys/arch/sparc/dev/tctrl.c
        * sys/arch/sparc64/dev/psycho.c
        * sys/arch/x68k/dev/pow.c
        * sys/dev/adb/adb_kbd.c
        * sys/arch/arm/xscale/becc_button.c

        ... and probably others.

This makes it pretty "general" to me.

> If we're going to treat it as a general-purpose routine, we should rename 
> and move the files (kern/kern_taskq.[ch] maybe?).  Otherwise, I'd prefer to 
> make this man page more specific to sysmon, and perhaps
> add an example of where it is currently used.

Due to the wide usage listed above, I don't think renaming is worth the
cause. A word or two about the context (sysmon, power, something) wouldn't
do harm though.

> Also, there is some semantics in the current implementation where all the 
> tasks in the queue are run before checking the condvar;  this might not 
> necessarily be appropriate for a general-purpose taskq.
> 
>       /*
>        * Run through all the tasks before we check for the exit
>        * condition; it's probably more important to actually run
>        * all the tasks before we exit.
>        */

This could be mentioned sure.

- Jukka.


Home | Main Index | Thread Index | Old Index