public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Umanets <umka-nJ1KrdHEGnBBDgjK7y7TUQ@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: os_wait_semaphore()
Date: Fri, 03 Oct 2003 16:37:53 +0400	[thread overview]
Message-ID: <3F7D6DA1.9070801@namesys.com> (raw)

Hello all,

I have took a look to acpi_os_wait_semphore() function and realized, 
that the the following code:

                /*
                 * Wait w/ Timeout:
                 * ----------------
                 */
                default:
                // TODO: A better timeout algorithm?
                {
                        int i = 0;
                        static const int quantum_ms = 1000/HZ;
                                                                                        

                        ret = down_trylock(sem);
                        for (i = timeout; (i > 0 && ret < 0); i -= 
quantum_ms) {
                                current->state = TASK_INTERRUPTIBLE;
                                schedule_timeout(1);
                                ret = down_trylock(sem);
                        }
                                                                                        

                        if (ret != 0)
                                status = AE_TIME;
                }
                break;


will behave not very good with Andrea Arcangeli's 2.4.23pre6aa1, where 
some intersting dynamic functionality was introduced. And namely, you 
are able to pass "desktop" or for instnace "HZ=500" as parameter to the 
kernel in lilo or another boot loader. This makes all time slices 
shorter and forces kernel to behave optimally for a desktop machine.

Thus, @quantum_ms will be calculated longer for shorter HZ and this is 
definitelly not good in my opinion. Am I right?

-- 
umka




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

             reply	other threads:[~2003-10-03 12:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 12:37 Yury Umanets [this message]
     [not found] ` <3F7D6DA1.9070801-nJ1KrdHEGnBBDgjK7y7TUQ@public.gmane.org>
2003-10-03 14:25   ` down_timeout Matthew Wilcox
     [not found]     ` <20031003142518.GN24824-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2003-10-03 20:36       ` down_timeout Andrew Morton

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=3F7D6DA1.9070801@namesys.com \
    --to=umka-nj1krdhegnbbdgjk7y7tuq@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox