From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: DOSEmu on SMP systems. Date: Tue, 26 Aug 2003 21:08:47 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3F4B941F.2060208@aknet.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090106080904010207040108" Return-path: List-Id: To: linux-msdos@vger.kernel.org This is a multi-part message in MIME format. --------------090106080904010207040108 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello. Sergey Suleymanov wrote: > I have Tyan Athlon MP platform with Linux kernel 2.4.21. Dosemu > eats ~30 %CPU time in a plain DOS command prompt. Playing with > config.hogthreshold multipliers in int.c, int16.c and *_IDLE_USECS > values gives nothing. Not sure about an SMP, but the $_hogthreshold doesn't work reliably for me without the attached patch. See if probably it helps you. --------------090106080904010207040108 Content-Type: text/plain; name="int16.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="int16.diff" --- int16.c.old Mon Jun 23 04:02:08 2003 +++ int16.c Tue Aug 26 21:02:31 2003 @@ -116,7 +116,6 @@ static unsigned check_key_available(int extended) { unsigned keyptr = get_key(extended); - static Bit32u oldESP; static int trigger = 0, trigger1 = 0; if(keyptr == -1 && config.hogthreshold && CAN_SLEEP()) { @@ -125,17 +124,12 @@ else trigger1=0; if(trigger1 >= config.hogthreshold*500) { - if(oldESP==_ESP) { - if (++trigger >= config.hogthreshold*20) { - usleep(INT2F_IDLE_USECS); - trigger=0; - keyptr = get_key(extended); - } - } else { + if (++trigger >= config.hogthreshold*20) { + usleep(INT2F_IDLE_USECS); trigger=0; + keyptr = get_key(extended); } trigger1--; - oldESP=_ESP; } } return get_key(extended); --------------090106080904010207040108--