From: Dave Hansen <dave@sr71.net>
To: unlisted-recipients:; (no To-header on input)
Cc: torvalds@linux-foundation.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, luto@amacapital.net, bp@alien8.de,
fenghua.yu@intel.com, hpa@zytor.com, oleg@redhat.com,
tglx@linutronix.de, ross.zwisler@linux.intel.com
Subject: Re: [RFC][PATCH 2/2] x86, fpu: enlarge xregs_state
Date: Thu, 16 Jul 2015 02:10:23 -0700 [thread overview]
Message-ID: <55A774FF.3060208@sr71.net> (raw)
In-Reply-To: <20150716081332.641D2B2F@viggo.jf.intel.com>
On 07/16/2015 01:13 AM, Dave Hansen wrote:
> +/*
> + * The largest xsave buffer known today is 2752 bytes on a system
> + * implementing AVX-512. This includes the 512-byte i387 state
> + * and 64-byte header. We add a small amount of padding in case
> + * an implementation adds some padding or wastes some space.
> + *
> + * Note, if we overflow this, we will disable XSAVE completely.
> + *
> + * Also, note that the real size we need is enumerated by
> + * cpuid leaves and can not be known at compile time.
> + */
> +#define XSTATE_MAX_SIZE (2752 + 256)
BTW, this has one big-ish side-effect. It takes the size of task_struct
from ~3.5k to ~5.4k for me:
slabinfo before:
task_struct 198 198 3456 9 8 : ...
after:
task_struct 166 180 5376 6 8 : ...
I'm sure folks on small systems are going to cringe at eating 2k/thread,
so we've got to revisit this _somehow_.
prev parent reply other threads:[~2015-07-16 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 8:13 [RFC][PATCH 1/2] x86, fpu: disable XSAVE if init buf too small Dave Hansen
2015-07-16 8:13 ` [RFC][PATCH 2/2] x86, fpu: enlarge xregs_state Dave Hansen
2015-07-16 9:10 ` Dave Hansen [this message]
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=55A774FF.3060208@sr71.net \
--to=dave@sr71.net \
--cc=bp@alien8.de \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome