public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Pawel Dziekonski <dzieko@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: CPU scheduler question/problem
Date: Mon, 26 Jan 2009 14:55:00 +0100	[thread overview]
Message-ID: <1232978100.4863.87.camel@laptop> (raw)
In-Reply-To: <2cd4df870901260548s2376a01anae0db9707dcfa14@mail.gmail.com>

On Mon, 2009-01-26 at 14:48 +0100, Pawel Dziekonski wrote:
> 2009/1/23 Peter Zijlstra <peterz@infradead.org>:
> 
> > The pipe workload you mentioned has would behave that way because pipes
> > 'assume' a produces/consumer behaviour, and thus are more likely to
> > place both tasks on the same cpu -- but will eventually pull them apart
> > if they want to run concurrently.
> >
> > You might enable SCHED_DEBUG=y and try
> >  echo NO_SYNC_WAKEUPS > /debug/sched_features
> 
> Hello,
> 
> that did the trick. Openssl now gets a whole core exclusively and gives full
> performance.
> 
> Regarding quantum chemistry application -- it is also using pipes
> for communication between worker processes. Now this app works OK.

Hmm, how long does a worker run for each received packet? The thing is,
if the data is cache affine for the issuing cpu, and the worker runs
short it often doesn't make sense to run it remote, as the cache
transfer will hurt more.

If it runs longer, the balancer will usually pick it up and move it
around.

/debug/sched_features is mostly a debug tool, its not a supported/stable
tuning interface.

> Where I can read more on tuning sched_features for different workloads?

kernel/sched*.[ch] ;-)

> Also, is there a way get a list of available schedulers and how to switch
> between them?

include/linux/sched.h:

#define SCHED_NORMAL		0
#define SCHED_FIFO		1
#define SCHED_RR		2
#define SCHED_BATCH		3
/* SCHED_ISO: reserved but not implemented yet */
#define SCHED_IDLE		5

and the posix sched_{set,get}schedule() functions.


  reply	other threads:[~2009-01-26 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 21:34 CPU scheduler question/problem Pawel Dziekonski
2009-01-23 15:40 ` Peter Zijlstra
2009-01-26 13:48   ` Pawel Dziekonski
2009-01-26 13:55     ` Peter Zijlstra [this message]
2009-01-26 22:55     ` Ingo Molnar
2009-01-27 16:04       ` Pawel Dziekonski
     [not found] <2cd4df870902031544h5f0b4e59na2c0a0804125dd9a@mail.gmail.com>
     [not found] ` <2cd4df870902040600r2974362r4e9eabf2608b05b4@mail.gmail.com>
     [not found]   ` <20090204142455.GE4411@elte.hu>
     [not found]     ` <2cd4df870902040751l19332473ic36e2642723f5ec8@mail.gmail.com>
     [not found]       ` <20090205192502.GC27422@elte.hu>
     [not found]         ` <2cd4df870902051514k31582fbal11113b37b756dda0@mail.gmail.com>
     [not found]           ` <1233914595.10894.1.camel@laptop>
     [not found]             ` <20090206155311.GQ18368@elte.hu>
     [not found]               ` <2cd4df870902061444p335a9433l73fe6e820ec11c6@mail.gmail.com>
     [not found]                 ` <20090209122538.GI17782@elte.hu>
     [not found]                   ` <2cd4df870902091056v7287e53fx8e7c8c5599b856b3@mail.gmail.com>
2009-02-11  9:06                     ` Yinghai Lu

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=1232978100.4863.87.camel@laptop \
    --to=peterz@infradead.org \
    --cc=dzieko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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