Date: Wed, 27 Sep 2000 15:13:27 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: non@ever.sanda.gr.jp Cc: freebsd-current@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG Subject: Re: [CFR] ncv, nsp, stg SCSI drivers Message-ID: <48276.970060407@critter> In-Reply-To: Your message of "Wed, 27 Sep 2000 22:08:38 %2B0900." <20000927220838X.non@ever.sanda.gr.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20000927220838X.non@ever.sanda.gr.jp>, non@ever.sanda.gr.jp writes: >From: Poul-Henning Kamp <phk@critter.freebsd.dk> >Date: Wed, 27 Sep 2000 15:01:13 +0200 >> >I would like to have review especially on the changes in >> >i386/isa/clock.c for counting delay loop numbers, >> >> Could you explain the functionality you need here ? We already >> have a DELAY() macro/function in the kernel... > >There are codes like; > int tout = sc->sc_wc; > ; > while (slp->sl_scp.scp_datalen > 0 && tout -- > 0) > { > ; > } > >To calculate the tout we use; > sc->sc_wc = delaycount * 2000; /* 2 sec */ > >And we initialize the delaycount in clock.c. This is called "busy polling" and there must be a better way to do it. Has this code been profiled to examine typical actual delay lengths ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48276.970060407>