All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: root@chaos.analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: SCHED_YIELD undeclared with Trond's NFS patch w/2.4.19-pre2-ac2
Date: Thu, 07 Mar 2002 14:20:00 +0000	[thread overview]
Message-ID: <3C877710.CAE1AFD3@redhat.com> (raw)
In-Reply-To: <20020307084514.C16224@lapsony.mydomain.here> <Pine.LNX.3.95.1020307085809.19727A-100000@chaos.analogic.com>

 
> You need to change loops that do something like:
> 
>     while(something)
>     {
>         current->policy |= SCHED_YIELD;
>         schedule();
>     }
> 
>     to:
> 
>     while(something)
>         sys_sched_yield();
> 

such loops are a great way to create livelock and other nasties in the
kernel
and should be avoided at all cost (esp if you use preemptable kernels)

  reply	other threads:[~2002-03-07 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-07 13:45 SCHED_YIELD undeclared with Trond's NFS patch w/2.4.19-pre2-ac2 Steven A. DuChene
2002-03-07 13:54 ` Morten Helgesen
2002-03-07 14:00 ` Richard B. Johnson
2002-03-07 14:20   ` Arjan van de Ven [this message]
2002-03-07 14:58     ` Richard B. Johnson
2002-03-07 14:20   ` Steven A. DuChene

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=3C877710.CAE1AFD3@redhat.com \
    --to=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /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.