public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* os_wait_semaphore()
@ 2003-10-03 12:37 Yury Umanets
       [not found] ` <3F7D6DA1.9070801-nJ1KrdHEGnBBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Yury Umanets @ 2003-10-03 12:37 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-03 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-03 12:37 os_wait_semaphore() Yury Umanets
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox