Exemplo n.º 1
0
void
viomb_worker(void *arg1, void *arg2)
{
	struct viomb_softc *sc = (struct viomb_softc *)arg1;
	int s;

	s = splbio();
	viomb_read_config(sc);
	if (sc->sc_npages > sc->sc_actual){
		VIOMBDEBUG(sc, "inflating balloon from %u to %u.\n",
			   sc->sc_actual, sc->sc_npages);
		viomb_inflate(sc);
		}
	else if (sc->sc_npages < sc->sc_actual){
		viomb_deflate(sc);
		VIOMBDEBUG(sc, "deflating balloon from %u to %u.\n",
			   sc->sc_actual, sc->sc_npages);
	}
	splx(s);
}
Exemplo n.º 2
0
void
viomb_worker(void *arg1)
{
    struct viomb_softc *sc = (struct viomb_softc *)arg1;
    int s;

    s = splbio();
    viomb_read_config(sc);
    if (sc->sc_npages > sc->sc_actual) {
        VIOMBDEBUG(sc, "inflating balloon from %u to %u.\n",
                   sc->sc_actual, sc->sc_npages);
        viomb_inflate(sc);
    }
    else if (sc->sc_npages < sc->sc_actual) {
        VIOMBDEBUG(sc, "deflating balloon from %u to %u.\n",
                   sc->sc_actual, sc->sc_npages);
        viomb_deflate(sc);
    }

    sc->sc_sens[0].value = sc->sc_npages << PAGE_SHIFT;
    sc->sc_sens[1].value = sc->sc_actual << PAGE_SHIFT;

    splx(s);
}