mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: avi@redhat.com, mingo@elte.hu
Cc: linux@horizon.com, linux-kernel@vger.kernel.org, npiggin@suse.de
Subject: Re: [PATCH 0/4] Really lazy fpu
Date: 16 Jun 2010 07:32:53 -0400	[thread overview]
Message-ID: <20100616113253.24017.qmail@science.horizon.com> (raw)

> But on busy servers where most wakeups are IRQ based the chance of being on 
> the right CPU is 1/nr_cpus - i.e. decreasing with every new generation of 
> CPUs.

That doesn't seem right.  If the server is busy with FPU-using tasks, then
the FPU state has already been swapped out, and no IPI is necessary.

The worst-case seems to be a lot of non-FPU CPU hogs, and a few FPU-using tasks
that get bounced around the CPUs like pinballs.

It is an explicit scheduler goal to keep tasks on the same CPU across
schedules, so they get to re-use their cache state.  The IPI only happens
when that goal is not met, *and* the FPU state has not been forced out
by another FPU-using task.

Not completely trivial to arrange.


(An halfway version of this optimization whoch sould avoid the need for
an IPI would be *save* the FPU state, but mark it "clean", so the re-load
can be skipped if we're lucky.  If the code supported this as well as the
IPI alternative, you could make a heuristic guess at switch-out time
whether to save immediately or hope the odds of needing the IPI are less than
the fxsave/IPI cost ratio.)

             reply	other threads:[~2010-06-16 11:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 11:32 George Spelvin [this message]
2010-06-16 11:46 ` Avi Kivity
2010-06-17  9:38   ` George Spelvin
  -- strict thread matches above, loose matches on Subject: below --
2010-06-13 15:03 Avi Kivity
2010-06-13 20:45 ` Valdis.Kletnieks
2010-06-14  7:47   ` Avi Kivity
2010-06-16  7:24 ` Avi Kivity
2010-06-16  7:32   ` H. Peter Anvin
2010-06-16  8:02     ` Avi Kivity
2010-06-16  8:39       ` Ingo Molnar
2010-06-16  9:01         ` Samuel Thibault
2010-06-16  9:43           ` Avi Kivity
2010-06-16  9:10         ` Nick Piggin
2010-06-16  9:30           ` Avi Kivity
2010-06-16  9:28         ` Avi Kivity

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=20100616113253.24017.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=avi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    /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

Powered by JetHome