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



Wow - I didn't realize it was so widely used! (Next time, before I comment, I'll learn to use grep!)

As already pointed out, a large percentage of those references are part of the various buttons' integration with sysmon/powerd. I think that a simple mention of this "intended usage" would be appropriate for the man page. I also think that the "run all tasks before checking for exit" semantics should be mentioned.

But we can forget about relocating it.  :)

BTW, thanks for documenting it!


On Mon, 25 Jan 2010, Jukka Ruohonen wrote:

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.


-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index