From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: Dosemu and clipper applications eating all CPU Date: Sat, 13 Mar 2004 01:33:08 +0300 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <40523AA4.8040304@aknet.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080604090405020108090405" Return-path: List-Id: To: linux-msdos@vger.kernel.org --------------080604090405020108090405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello. Maximiliano Curia wrote: > Yes, that dosemu doesn't detect the clipper idle calls. OK, some nice guy at SF finally provided a clipper-based program for testing (that's why I like the SF tracker) and I was able to have a look at what it does myself. Indeed it calls int21h/1Ch, although so infrequently, that it doesn't seem to be usefull here. It calls int16h/11h a bit more frequently, although also rather rarely. The attached patch makes it to release the CPU a little, although perhaps still not enough. Also note that clipper will work in protected mode only in dosemu 1.3.1. On any other versions it can work in real mode only, which may have a different CPU loads. --------------080604090405020108090405 Content-Type: text/plain; name="delay.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="delay.diff" --- src/base/bios/int16.c Sat Mar 13 00:40:05 2004 +++ src/base/bios/int16.c Sat Mar 13 01:15:29 2004 @@ -126,7 +126,7 @@ trigger1=0; if(trigger1 >= config.hogthreshold*500) { if(oldESP==_ESP) { - if (++trigger >= config.hogthreshold*20) { + if (trigger++ >= (config.hogthreshold - 1) * 20) { usleep(INT2F_IDLE_USECS); trigger=0; keyptr = get_key(extended); --------------080604090405020108090405 Content-Type: text/plain Scanned by evaluation version of Dr.Web antivirus Daemon http://drweb.ru/unix/ --------------080604090405020108090405--