From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Ingo Molnar <mingo@elte.hu>
Cc: lkml <linux-kernel@vger.kernel.org>,
the arch/x86 maintainers <x86@kernel.org>
Subject: Re: x86_64: tss_struct layout does not match comments !?
Date: Thu, 03 Jul 2008 12:57:01 +0100 [thread overview]
Message-ID: <1215086221.3026.16.camel@castor.localdomain> (raw)
In-Reply-To: <20080703113925.GA5594@elte.hu>
On Thu, 2008-07-03 at 13:39 +0200, Ingo Molnar wrote:
> * Richard Kennedy <richard@rsk.demon.co.uk> wrote:
>
> > Hi Ingo,
> >
> > the comments in the definition of tss_struct suggests is should be
> > cacheline aligned ( or 256 byte aligned ? ) :-
> >
> > |struct tss_struct {
> > |....
> > | /*
> > | * Pad the TSS to be cacheline-aligned (size is 0x100):
> > | */
> > | unsigned long __cacheline_filler[35];
> > | /*
> > | * .. and then another 0x100 bytes for the emergency kernel stack:
> > | */
> > | unsigned long stack[64];
> > |
> > |} __attribute__((packed));
> >
> > However on a 64 bit build the size of tss_struct is 9136,
> > cacheline_filler is 280 and stack size is 512 at offset 8624.
> > None of which are cacheline aligned.
> >
> > I'm guessing this isn't what was intended.
> >
> > do you know what the original intention was ?
> >
> > 1. struct tss_struct{...} __cacheline_aligned;
> > or just
> > 2. struct tss_struct {
> > ...
> > long stack[64] __cacheline_aligned;
> > }
>
> #1 is the intent - because each CPU has a separate TSS. init_tss.stack
> is really just an emergency static stack we have in place for very early
> exceptions.
>
> i think the __cacheline_filler could be removed safely. Mind sending a
> patch for that?
>
> Ingo
No problem.
Richard
next prev parent reply other threads:[~2008-07-03 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 10:47 Richard Kennedy
2008-07-03 11:39 ` Ingo Molnar
2008-07-03 11:57 ` Richard Kennedy [this message]
2008-07-04 12:56 ` [PATCH] x86: cacheline_align tss_struct Richard Kennedy
2008-07-04 14:48 ` Ingo Molnar
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=1215086221.3026.16.camel@castor.localdomain \
--to=richard@rsk.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®