mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: minyard@acm.org, linux-kernel@vger.kernel.org,
	peter@palfrader.org, openipmi-developer@lists.sourceforge.net
Subject: Re: [PATCH] IPMI: use schedule in kthread
Date: Mon, 26 Jun 2006 12:59:12 -0700	[thread overview]
Message-ID: <20060626125912.240587af.akpm@osdl.org> (raw)
In-Reply-To: <20060626194937.GA16528@lists.us.dell.com>

On Mon, 26 Jun 2006 14:49:37 -0500
Matt Domsch <Matt_Domsch@dell.com> wrote:

> On Mon, Jun 26, 2006 at 12:00:48PM -0700, Andrew Morton wrote:
> > On Mon, 26 Jun 2006 09:08:19 -0500
> > MAILER-DAEMON@osdl.org wrote:
> > 
> > > The kthread used to speed up polling for IPMI was using udelay
> > > when the lower-level state machine told it to do a short delay.
> > > This just used CPU and didn't help scheduling, thus causing bad
> > > problems with other tasks.  Call schedule() instead.
> > > 
> > > Signed-off-by: Corey Minyard <minyard@acm.org>
> > > 
> > > Index: linux-2.6.17/drivers/char/ipmi/ipmi_si_intf.c
> > > ===================================================================
> > > --- linux-2.6.17.orig/drivers/char/ipmi/ipmi_si_intf.c
> > > +++ linux-2.6.17/drivers/char/ipmi/ipmi_si_intf.c
> > > @@ -809,7 +809,7 @@ static int ipmi_thread(void *data)
> > >  			/* do nothing */
> > >  		}
> > >  		else if (smi_result == SI_SM_CALL_WITH_DELAY)
> > > -			udelay(1);
> > > +			schedule();
> > >  		else
> > >  			schedule_timeout_interruptible(1);
> > >  	}
> > 
> > calling schedule() isn't a lot of use either.
> > 
> > If CONFIG_PREEMPT it's of no benefit and will just chew CPU.
> > 
> > If !CONFIG_PREEMPT && !need_resched() then it's a no-op and will chew CPU.
> > 
> > If !CONFIG_PREEMPT && need_resched() then yes, it'll schedule away.  This
> > is pretty much the only time that a simple schedule() is useful.
> > 
> > 
> > What are we actually trying to do in here?
> 
> Make up for a lack of poor hardware design.  Most IPMI controllers
> that use the standard-specified KCS interface don't implement
> interrupts to signal data availability, and its a character-at-a-time
> interface.

ah, OK, you're screwed ;) There's no fix for that, so blowing CPU while
offering reschedule opportunities is better than just blowing CPU.


  parent reply	other threads:[~2006-06-26 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060626140819.GA17804@localdomain>
2006-06-26 15:04 ` [Openipmi-developer] " Matt Domsch
2006-06-26 19:00 ` Andrew Morton
2006-06-26 19:49   ` Matt Domsch
2006-06-26 19:58     ` Arjan van de Ven
2006-06-26 20:06       ` Jeremy Fitzhardinge
2006-06-26 19:59     ` Andrew Morton [this message]
2006-06-26 19:52   ` Corey Minyard

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=20060626125912.240587af.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Matt_Domsch@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=peter@palfrader.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

all inboxes | Powered by JetHome®