From: "H. Peter Anvin" <hpa@zytor.com>
To: David Miller <davem@davemloft.net>
Cc: bhutchings@solarflare.com, tglx@linutronix.de, mingo@redhat.com,
netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
x86@kernel.org, torvalds@linux-foundation.org
Subject: Re: [PATCH 2/3] x86_64: Define 128-bit memory-mapped I/O operations
Date: Tue, 21 Aug 2012 20:49:20 -0700 [thread overview]
Message-ID: <503456C0.9000203@zytor.com> (raw)
In-Reply-To: <20120821.202945.2278895156403194101.davem@davemloft.net>
On 08/21/2012 08:29 PM, David Miller wrote:
>
> What we do is we have a FPU stack that grows up from the end of the
> thread_info struct, towards the bottom of the kernel stack.
>
We have 8K of kernel stack, and an xstate which is pushing a kilobyte
already. This seems like a nightmare. Even if we allocate a larger
stack for this sole purpose, we'd have to put a pretty hard cap on how
far it could grow.
> Slot 0 is always the user FPU state.
>
> Slot 1 and further are kernel FPU state save areas.
>
> We hold a counter which keep track of how far deeply saved we are
> in the stack.
>
> Not for the purpose of space saving, but for overhead reduction we
> sometimes can get away with only saving away half of the FPU
> registers. The chip provides a pair of dirty bits, one for the lower
> half of the FPU register file and one for the upper half. We only
> save the bits that are actually dirty.
>
> Furthermore, when we have FPU using code in the kernel that only uses
> the lower half of the registers, we only save away that part of the
> state around the routine.
This is messy on x86; it is somewhat doable but it gets really hairy
because of the monolithic [f]xsave/[f]xrstor instruction.
-hpa
next prev parent reply other threads:[~2012-08-22 3:49 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 1:17 [PATCH 0/3] x86_64, sfc: 128-bit memory-mapped I/O Ben Hutchings
2012-08-22 1:20 ` [PATCH 1/3] x86_64: Define 128-bit types for kernel code only Ben Hutchings
2012-08-22 1:23 ` [PATCH 2/3] x86_64: Define 128-bit memory-mapped I/O operations Ben Hutchings
2012-08-22 1:37 ` H. Peter Anvin
2012-08-22 2:04 ` Ben Hutchings
2012-08-22 2:34 ` David Miller
2012-08-22 3:24 ` H. Peter Anvin
2012-08-22 3:29 ` David Miller
2012-08-22 3:49 ` H. Peter Anvin [this message]
2012-08-22 3:52 ` Linus Torvalds
2012-08-22 3:59 ` H. Peter Anvin
2012-08-22 4:14 ` David Miller
2012-08-22 21:14 ` David Miller
2012-08-22 21:28 ` Linus Torvalds
2012-08-22 21:38 ` David Miller
2012-08-22 4:35 ` Linus Torvalds
2012-08-22 5:00 ` David Miller
2012-08-22 14:06 ` Linus Torvalds
2012-08-22 4:42 ` Linus Torvalds
2012-08-22 13:26 ` Ben Hutchings
2012-08-22 14:20 ` Linus Torvalds
2012-08-22 14:24 ` Ben Hutchings
2012-08-22 14:30 ` Benjamin LaHaise
2012-08-22 14:58 ` Ben Hutchings
2012-08-22 15:13 ` H. Peter Anvin
2012-08-22 15:27 ` David Laight
2012-08-22 15:49 ` H. Peter Anvin
2012-08-22 15:51 ` Ben Hutchings
2012-08-22 15:54 ` H. Peter Anvin
2012-08-22 16:44 ` Ben Hutchings
2012-08-22 16:49 ` H. Peter Anvin
2012-08-22 16:55 ` Linus Torvalds
2012-08-22 17:09 ` Ben Hutchings
2012-08-22 17:12 ` H. Peter Anvin
2012-08-22 17:27 ` Ben Hutchings
2012-08-22 17:54 ` Linus Torvalds
2012-08-22 18:11 ` Ben Hutchings
2012-08-22 18:18 ` H. Peter Anvin
2012-08-22 18:28 ` Linus Torvalds
2012-08-22 19:01 ` Ben Hutchings
2012-08-22 17:26 ` Linus Torvalds
2012-08-22 16:51 ` Linus Torvalds
2012-08-22 16:59 ` H. Peter Anvin
2012-08-22 15:51 ` H. Peter Anvin
2012-08-22 14:50 ` Linus Torvalds
2012-08-22 14:56 ` Linus Torvalds
2012-08-22 15:05 ` David Laight
2012-08-22 15:16 ` Linus Torvalds
2012-08-22 15:41 ` Ben Hutchings
2012-08-22 14:42 ` David Laight
2012-08-22 1:26 ` [PATCH 3/3] sfc: Use __raw_writeo() to perform TX descriptor push where possible Ben Hutchings
2012-08-22 1:38 ` [PATCH 0/3] x86_64, sfc: 128-bit memory-mapped I/O H. Peter Anvin
2012-08-22 1:43 ` Ben Hutchings
2012-08-22 1:59 ` H. Peter Anvin
2012-08-22 2:10 ` Ben Hutchings
2012-08-22 2:31 ` H. Peter Anvin
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=503456C0.9000203@zytor.com \
--to=hpa@zytor.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.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 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.