STREAMS/UX for the HP 9000 Reference Manual
87
STREAMS/UX Multiprocessor Support
Writing MP Scalable Modules and Drivers
Configuring the NSTRSCHED Tunable
STREAMS/UX provides a new tunable, NSTRSCHED, which allows you to
set the number of STREAMS/UX scheduler daemons running on a
multiprocessor system. The default value is 0, which indicates that
STREAMS/UX will determine the number of daemons based on the number
of processors in the system. The minimum value is 0 and the maximum is
32.
You should leave NSTRSCHED set to the default value. STREAMS/UX
will set the number of daemons based on the number of processors in the
system. STREAMS/UX will create fewer daemons than there are
processors. There is no benefit to creating more daemons than processors.
You might want to increase the value of NSTRSCHED if the system does a
lot of STREAMS/UX processing or decrease it if the system does very little
STREAMS/UX work. You can determine the number of scheduler daemons
running on the system by executing the ps -ef command, and counting the
number of smpsched processes.
Guidelines for MP Scalable Modules and Drivers
• It is easier to develop STREAMS/UX-based software that runs completely MP
scalable or completely under UP emulation. Try to avoid mixing MP scalable and
UP emulation modules and drivers in the same stream or multiplexor.
• MP scalable STREAMS/UX modules and drivers cannot call UP emulation
software. A put or service routine cannot acquire the I/O semaphore because put
int
D_install()
{
int retval;
/* Configure driver and obtain dynamically assigned major number. */
if ((retval = install_driver(&d_drv_info, &d_drv_ops)) != 0)
return(retval);
/* Configure streams specific parameters. */
if ((retval = str_install(&d_str_info)) != 0) {
uninstall_driver(&d_drv_info);
return(retval);
}
/* Success */
return 0;
}