Lines Matching defs:helper

88  * Many helper CPUs are needed to prevent bzip2 from being a
126 * and time. Memory used per helper is ~(dump_bzip2_level * 1MB).
147 /* Define multiple buffers per helper to avoid stalling */
231 * helper.
233 * CBUF_USEDMAP: mapping has been consumed by a helper. Needs unmap.
237 * CBUF_WRITE: CBUF_SIZE block of compressed pages from a helper,
240 * CBUF_ERRMSG: CBUF_SIZE block of error messages from a helper
275 * from the master to helper tasks or vice-versa using put and
289 * helperq master -> helper INREADY
290 * master has mapped input for use by helper
292 * mainq master <- helper USEDMAP
293 * helper is done with input
295 * freebufq master -> helper FREEBUF
298 * mainq master <- helper WRITE
299 * block of compressed pages from a helper
301 * mainq master <- helper ERRMSG
302 * error messages from a helper (memory error case)
375 typedef struct helper {
376 int helper; /* bound helper id */
390 #define MAINHELPER (-1) /* helper is also the main task */
391 #define FREEHELPER (-2) /* unbound helper */
392 #define DONEHELPER (-3) /* helper finished */
405 helper_t *helper; /* array of helpers */
408 ulong_t *helpermap; /* set of dumpsys helper CPU ids */
419 lock_t helper_lock; /* protect helper state */
446 * for at least one helper to register in dumpcfg.helpermap, before
449 * available helper to register.
548 * Need multiple buffers per helper so that they do not block waiting
571 if (old->helper != NULL) {
574 hpend = &old->helper[old->nhelper];
575 for (hp = old->helper; hp != hpend; hp++) {
581 kmem_free(old->helper, old->nhelper * sizeof (helper_t));
650 new->helper = kmem_zalloc(new->nhelper * sizeof (helper_t), KM_SLEEP);
651 hpend = &new->helper[new->nhelper];
652 for (hp = new->helper; hp != hpend; hp++) {
654 if (hp < &new->helper[MINHELPERS]) {
902 helper_t *endhp = &cfg->helper[cfg->nhelper];
1032 ohp = cfg->helper;
1035 for (hp = cfg->helper; hp < endhp; hp++) {
1064 * Add output buffers per helper. The number of
1065 * buffers per helper is determined by the ratio of
1756 * just write the message via uprintf. If a helper is running the
1768 if (hp->helper == MAINHELPER) {
1802 * running just write the data. If a helper is running the output is
1810 if (hp->helper == MAINHELPER) {
1864 * Read the helper queue, and copy one mapped page. Return 0 when
1885 * NULL return means the helper queue
1897 * loop in order to empty the helper
1906 /* Stop here when the helper queue is closed. */
1937 if (panicstr && hp->helper != MAINHELPER)
1995 hp->helper, BZ2_bzErrorString(rc),
2017 hp->helper, BZ2_bzErrorString(rc));
2191 * Dump helper called from panic_idle() to compress pages. CPUs in
2199 * panic dump the helper CPUs communicate with the panic CPU using
2208 * take the lock and become a helper, or return.
2215 helper_t *hp, *hpend = &dumpcfg.helper[dumpcfg.nhelper];
2217 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2218 if (hp->helper == FREEHELPER) {
2219 hp->helper = CPU->cpu_id;
2229 hp->helper = DONEHELPER;
2242 * No-wait helper callable in spin loops.
2256 * Dump helper for live dumps.
2280 hp->helper = MAINHELPER;
2325 * at least one helper to register.
2350 if (dumpcfg.helper[0].lzbuf == NULL) {
2351 dumpcfg.helper[0].lzbuf =
2352 dumpcfg.helper[1].page;
2498 dumpsys_lzjb_page(dumpcfg.helper, cp);
2500 /* pass mapped pages to a helper */
2566 helper_t *hp, *hpend = &cfg->helper[cfg->nhelper];
2634 for (hp = cfg->helper; hp != hpend; hp++) {
2672 helper_t *hp, *hpend = &dumpcfg.helper[dumpcfg.nhelper];
2884 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2886 hp->helper = DONEHELPER;
2890 hp->helper = FREEHELPER;
2922 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2925 hp->helper = hp - dumpcfg.helper;