From: Ryan Arnold <rsa@us.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: Will Schmidt <will_schmidt@vnet.ibm.com>,
Steven Munroe <sjmunroe@us.ibm.com>
Subject: [RFC] Moving toward smarter disabling of FPRs, VRs, and VSRs in the MSR
Date: Fri, 13 Mar 2009 15:23:51 -0500 [thread overview]
Message-ID: <1236975831.3137.61.camel@localhost.localdomain> (raw)
Hi all,
Those of us working on the POWER toolchain can envision a certain class
of customers who may benefit from intelligently disabling certain
register class enable bits on context switches, i.e. not disabling by
default.
Currently, per process, if the MSR enable bits for FPs, VRs or VSRs are
set to disabled, an interrupt will be generated as soon as an FP, VMX,
or VSX instruction is encountered. At this point the kernel enables the
relevant bits in the MSR and returns.
Currently, the kernel will disable all of the bits on a context switch.
If a customer _knows_ a process will be using a register class
extensively, e.g. VRs, they're paying the interrupt->enable-VMX price
with every context switch. It'd be nice if we could intelligently leave
the bits enabled.
Solutions:
- A boot flag which always enables VSRs, VRs, FPRs, etc. These are
cumulative, i.e. VSRs implies VRs and FPRS; VRs implies FPRs.
- A heuristic which permanently enables said register classes for a
process if they've been enabled during the previous X interrupts.
- The same heuristic could disable the register class bits after a
certain criteria is met.
We have some ideas on how to benchmark this to verify the expense of the
interrupt->enable. As it presently works this stands in the way of
using VMX or VSX for optimized string routines in GLIBC.
Regards,
Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development
next reply other threads:[~2009-03-13 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 20:23 Ryan Arnold [this message]
2009-03-13 21:15 ` [RFC] Moving toward smarter disabling of FPRs, VRs, and VSRs in the MSR Kumar Gala
2009-03-13 22:45 ` Benjamin Herrenschmidt
2009-03-13 23:52 ` Josh Boyer
2009-03-14 2:31 ` Ryan Arnold
2009-03-14 3:22 ` Benjamin Herrenschmidt
2009-03-14 13:55 ` Segher Boessenkool
2009-03-14 13:49 ` Segher Boessenkool
2009-03-14 14:58 ` Ryan Arnold
2009-03-16 0:49 ` Benjamin Herrenschmidt
2009-03-16 6:43 ` Michael Neuling
2009-03-16 10:52 ` Gabriel Paubert
2009-03-14 8:20 ` Michael Neuling
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=1236975831.3137.61.camel@localhost.localdomain \
--to=rsa@us.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=sjmunroe@us.ibm.com \
--cc=will_schmidt@vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).