All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maurilio Longo <maurilio.longo@libero.it>
To: linux mailing list <linux-msdos@vger.kernel.org>
Subject: Re: Dosemu and clipper applications eating all CPU
Date: Mon, 15 Mar 2004 19:07:17 +0100	[thread overview]
Message-ID: <4055F0D5.725E3D34@libero.it> (raw)
In-Reply-To: 4055ECD5.70902@aknet.ru

Stas,


> > it probably depends on the linker used to create the clipper app, here
> > we use blinker to create a protect mode application
> Yes, the prog I now have, also uses
> blinker.
> Btw, in both dosemu-1.2.1 and 1.3.0
> it works only in real mode since the
> proper Blinker support was added only
> in 1.3.1. Does your prog work in real
> or protected mode for you?
>

it is in protect mode, I don't know if it could run at all in real mode.


> > In 1.1.3 (which is the dosemu we use)
> 1.1.3 is too old and buggy. Why are you
> still using it? 1.3.0 or 1.3.1 should
> be much better.
>

I've switched to 1.2.1 the other day and set hog_threshold to 45, but it uses
nearly 60% of cpu while completely idle (lower values make serial transmission
stop working) and 99% of cpu while inside dos prompt.

>
> > I had to make the changes I told you, and I
> > use hog_threshold(0) to have the clipper app to give back all the time
> > it doesn't use.
> OK, but not everything is clear.
> You said you call usleep() every 50th
> call and set $_hogthreshold=(0).
> But then, if you set $_hogthreshold=(1)
> with an unmodified dosemu, it should
> call usleep() on *every* call of int21/ah=2c,
> so it must release much more CPU time!
> How it happens that it doesn't?
> (please see int.c line 1201, where 0x2c
> is trapped).
> -

Yes, it _does_ and this makes our clipper program unresponsive to user
commands, so I changed INT2F_ to INT28_IDLE_SEC and it was better but not
enough, so I put the 50 calls per usleep() hack, and this way it is responsive
and cpu is around 1, 2%.

But the problem, in my opinion is that usleep() sleeps a fixed amount of time
(either INT2F_IDLE_SEC or INT28_IDLE_SEC) while it should simply (if at all
possible on linux) give back the rest of current time slice, this way if it
has someting to do for, let's say,  1/10th of its time slice, it does it and
then gives 9/10th back to linux instead of sleeping for a certain _fixed_
amount of time.

regards.


--
 __________
|  |  | |__| md2520@mclink.it
|_|_|_|____| Team OS/2 Italia



  reply	other threads:[~2004-03-15 18:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 17:50 Dosemu and clipper applications eating all CPU Stas Sergeev
2004-03-15 18:07 ` Maurilio Longo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-28 17:32 Stas Sergeev
2004-04-28  5:55 Mgr. Peter Tuharsky
2004-04-28 19:52 ` Maximiliano Curia
2004-03-15 19:17 Stas Sergeev
2004-03-12 22:33 Stas Sergeev
2004-03-15 11:53 ` Maurilio Longo
2004-03-11 18:44 Stas Sergeev
2004-03-10 19:36 Stas Sergeev
2004-03-10 22:55 ` Maurilio Longo
2004-03-11  8:29   ` Maurilio Longo
2004-03-10 18:36 Stas Sergeev
2004-03-09 20:16 Stas Sergeev
2004-03-10 15:29 ` Peter B. Steiger
2004-03-10 19:11 ` Maximiliano Curia
2004-03-08 16:11 Maximiliano Curia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4055F0D5.725E3D34@libero.it \
    --to=maurilio.longo@libero.it \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.