All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Franco <stratus@acm.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] [PATCH] Replaces yield() with schedule_timeout()
Date: Sun, 25 Apr 2004 23:10:41 +0000	[thread overview]
Message-ID: <408C4571.5020902@acm.org> (raw)
In-Reply-To: <408AB344.6010000@acm.org>

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Domen Puncer wrote:

>On Sat, Apr 24, 2004 at 03:34:44PM -0300, Gustavo Franco wrote:
>  
>
>>Hi list,
>>
>>Following what i've said, i'm looking each yield() call to check if it 
>>needs to be
>>replaced.I'll send two more patches today and a status message, if 
>>everything
>>is ok, i'm planning to complete this task on the next week.
>>
>>Thanks,
>>Gustavo Franco
>>
>>--- drivers/scsi/megaraid.c.orig     2004-04-24 13:54:26.000000000 -0300
>>+++ drivers/scsi/megaraid.c  2004-04-24 13:54:36.000000000 -0300
>>@@ -1691,7 +1691,7 @@
>>       for (counter = 0; counter < 10000; counter++) {
>>               if (!mbox->m_in.busy)
>>                       return 0;
>>-               udelay(100); yield();
>>+               udelay(100); schedule_timeout(1);
>>    
>>
>
>This makes no sense to me.
>schedule without set_current_state (also missing in other patches);
>Why leave udelay?
>
>How about something like:
>	for (counter = 0; counter < 1000; counter++) {
>		if (!mbox->m_in.busy)
>			return 0;
>		set_current_state(TASK_INTERRUPTIBLE);
>		schedule_timeout(1);
>
>counter < 1000 test is on purpose, to get >= 1 second, not 10.
>
>  
>
Hi Domen,

My failure, i haven't checked if the set_current_state() was really 
needed.I'm working
on the TODO item "Calling yield() Considered Harmful" written by Matthew 
Wilcox.Since
set_current_state() isn't cited by him and wasn't by Randy, i'll wait 
until Randy ask for rediffied
patches.Randy?

Thanks,
Gustavo Franco


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2004-04-25 23:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-24 18:34 [Kernel-janitors] [PATCH] Replaces yield() with schedule_timeout() Gustavo Franco
2004-04-24 19:28 ` Gustavo Franco
2004-04-24 19:35 ` Gustavo Franco
2004-04-25 18:38 ` [Kernel-janitors] [PATCH] Replaces yield() with Domen Puncer
2004-04-25 23:10 ` Gustavo Franco [this message]
2004-04-25 23:25 ` Randy.Dunlap
2004-04-26  0:47 ` [Kernel-janitors] [PATCH] Replaces yield() with schedule_timeout() Gustavo Franco
2004-04-26  1:29 ` [Kernel-janitors] [PATCH] Replaces yield() with Randy.Dunlap
2004-04-26 12:23 ` [Kernel-janitors] [PATCH] Replaces yield() with schedule_timeout() Felipe W Damasio
2004-04-28 21:03 ` [Kernel-janitors] [PATCH] Replaces yield() with maximilian attems
2004-04-28 21:07 ` Randy.Dunlap
2004-04-28 21:13 ` [Kernel-janitors] [PATCH] Replaces yield() with schedule_timeout() Felipe W Damasio

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=408C4571.5020902@acm.org \
    --to=stratus@acm.org \
    --cc=kernel-janitors@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.