From owner-freebsd-current Wed Sep 27 6:13:40 2000 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 19F0637B422; Wed, 27 Sep 2000 06:13:34 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.0/8.9.3) with ESMTP id e8RDDRN48278; Wed, 27 Sep 2000 15:13:27 +0200 (CEST) (envelope-from 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 In-Reply-To: Your message of "Wed, 27 Sep 2000 22:08:38 +0900." <20000927220838X.non@ever.sanda.gr.jp> Date: Wed, 27 Sep 2000 15:13:27 +0200 Message-ID: <48276.970060407@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000927220838X.non@ever.sanda.gr.jp>, non@ever.sanda.gr.jp writes: >From: Poul-Henning Kamp >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