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_. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

