mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Ingo Molnar <mingo@elte.hu>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: x86_64: tss_struct layout does not match comments  !?
Date: Thu, 03 Jul 2008 11:47:29 +0100	[thread overview]
Message-ID: <1215082049.3026.15.camel@castor.localdomain> (raw)

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;
}

Richard



             reply	other threads:[~2008-07-03 12:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 10:47 Richard Kennedy [this message]
2008-07-03 11:39 ` Ingo Molnar
2008-07-03 11:57   ` Richard Kennedy
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=1215082049.3026.15.camel@castor.localdomain \
    --to=richard@rsk.demon.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®