Lines Matching defs:helper

84  * Many helper CPUs are needed to prevent bzip2 from being a
122 * and time. Memory used per helper is ~(dump_bzip2_level * 1MB).
143 /* Define multiple buffers per helper to avoid stalling */
227 * helper.
229 * CBUF_USEDMAP: mapping has been consumed by a helper. Needs unmap.
233 * CBUF_WRITE: CBUF_SIZE block of compressed pages from a helper,
236 * CBUF_ERRMSG: CBUF_SIZE block of error messages from a helper
271 * from the master to helper tasks or vice-versa using put and
285 * helperq master -> helper INREADY
286 * master has mapped input for use by helper
288 * mainq master <- helper USEDMAP
289 * helper is done with input
291 * freebufq master -> helper FREEBUF
294 * mainq master <- helper WRITE
295 * block of compressed pages from a helper
297 * mainq master <- helper ERRMSG
298 * error messages from a helper (memory error case)
371 typedef struct helper {
372 int helper; /* bound helper id */
386 #define MAINHELPER (-1) /* helper is also the main task */
387 #define FREEHELPER (-2) /* unbound helper */
388 #define DONEHELPER (-3) /* helper finished */
401 helper_t *helper; /* array of helpers */
404 ulong_t *helpermap; /* set of dumpsys helper CPU ids */
415 lock_t helper_lock; /* protect helper state */
535 * Need multiple buffers per helper so that they do not block waiting
558 if (old->helper != NULL) {
561 hpend = &old->helper[old->nhelper];
562 for (hp = old->helper; hp != hpend; hp++) {
568 kmem_free(old->helper, old->nhelper * sizeof (helper_t));
637 new->helper = kmem_zalloc(new->nhelper * sizeof (helper_t), KM_SLEEP);
638 hpend = &new->helper[new->nhelper];
639 for (hp = new->helper; hp != hpend; hp++) {
641 if (hp < &new->helper[MINHELPERS]) {
877 helper_t *endhp = &cfg->helper[cfg->nhelper];
1007 ohp = cfg->helper;
1010 for (hp = cfg->helper; hp < endhp; hp++) {
1039 * Add output buffers per helper. The number of
1040 * buffers per helper is determined by the ratio of
1731 * just write the message via uprintf. If a helper is running the
1743 if (hp->helper == MAINHELPER) {
1777 * running just write the data. If a helper is running the output is
1785 if (hp->helper == MAINHELPER) {
1839 * Read the helper queue, and copy one mapped page. Return 0 when
1860 * NULL return means the helper queue
1872 * loop in order to empty the helper
1881 /* Stop here when the helper queue is closed. */
1912 if (panicstr && hp->helper != MAINHELPER)
1970 hp->helper, BZ2_bzErrorString(rc),
1992 hp->helper, BZ2_bzErrorString(rc));
2166 * Dump helper called from panic_idle() to compress pages. CPUs in
2174 * panic dump the helper CPUs communicate with the panic CPU using
2183 * take the lock and become a helper, or return.
2190 helper_t *hp, *hpend = &dumpcfg.helper[dumpcfg.nhelper];
2192 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2193 if (hp->helper == FREEHELPER) {
2194 hp->helper = CPU->cpu_id;
2204 hp->helper = DONEHELPER;
2217 * No-wait helper callable in spin loops.
2231 * Dump helper for live dumps.
2255 hp->helper = MAINHELPER;
2310 if (dumpcfg.helper[0].lzbuf == NULL)
2311 dumpcfg.helper[0].lzbuf = dumpcfg.helper[1].page;
2455 dumpsys_lzjb_page(dumpcfg.helper, cp);
2459 /* pass mapped pages to a helper */
2524 helper_t *hp, *hpend = &cfg->helper[cfg->nhelper];
2588 for (hp = cfg->helper; hp != hpend; hp++) {
2626 helper_t *hp, *hpend = &dumpcfg.helper[dumpcfg.nhelper];
2838 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2840 hp->helper = DONEHELPER;
2844 hp->helper = FREEHELPER;
2876 for (hp = dumpcfg.helper; hp != hpend; hp++) {
2879 hp->helper = hp - dumpcfg.helper;