From: Richard Henderson <rth@twiddle.net>
To: Tim Abbott <tabbott@ksplice.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Sam Ravnborg <sam@ravnborg.org>,
Anders Kaseorg <andersk@ksplice.com>,
Nelson Elhage <nelhage@ksplice.com>,
linux-alpha@vger.kernel.org
Subject: Re: [PATCH 1/2] alpha: use .data.init_task instead of .data.init_thread.
Date: Fri, 31 Jul 2009 14:38:40 -0700 [thread overview]
Message-ID: <4A736460.5070509@twiddle.net> (raw)
In-Reply-To: <4A7360C3.2060507@twiddle.net>
On 07/31/2009 02:23 PM, Richard Henderson wrote:
> Similarly it is *not* a bug that the page_aligned sections were before
> data, because we already knew we had 2 page alignment from the end of
> init + 2 pages of init_thread.
Indeed, I'll go further and say that the common definition of
RW_DATA_SECTION is buggy.
> #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \
> . = ALIGN(PAGE_SIZE); \
> .data : AT(ADDR(.data) - LOAD_OFFSET) { \
> INIT_TASK(inittask) \
> CACHELINE_ALIGNED_DATA(cacheline) \
> READ_MOSTLY_DATA(cacheline) \
> DATA_DATA \
> CONSTRUCTORS \
> NOSAVE_DATA(nosave) \
> PAGE_ALIGNED_DATA(pagealigned) \
> }
Given that we align the entire .data section why have interior padding
to re-align for page-aligned data? Surely a better ordering would be
. = ALIGN(PAGE_SIZE);
.data : AT(ADDR(.data) - LOAD_OFFSET) {
INIT_TASK(inittask)
NOSAVE_DATA
PAGE_ALIGNED_DATA(pagealigned)
CACHELINE_ALIGNED_DATA(cacheline)
READ_MOSTLY_DATA(cacheline)
DATA_DATA
CONSTRUCTORS
}
with that change, and without
> - . = ALIGN(2 * PAGE_SIZE);
> + . = ALIGN(PAGE_SIZE);
> __init_end = .;
the patch looks like it'd be ok. All you're doing with this fragment is
failing to free a page of padding. You could change it to
. = ALIGN(THREAD_SIZE)
if it makes you feel better.
r~
next prev parent reply other threads:[~2009-07-31 21:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 20:56 [PATCH 1/2] alpha: use .data.init_task instead of .data.init_thread Tim Abbott
2009-07-31 21:23 ` Richard Henderson
2009-07-31 21:38 ` Richard Henderson [this message]
2009-07-31 23:44 ` Tim Abbott
2009-07-31 22:02 ` Tim Abbott
2009-07-31 23:30 ` Richard Henderson
2009-07-31 23:56 ` Tim Abbott
2009-08-02 16:25 ` Richard Henderson
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=4A736460.5070509@twiddle.net \
--to=rth@twiddle.net \
--cc=andersk@ksplice.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nelhage@ksplice.com \
--cc=sam@ravnborg.org \
--cc=tabbott@ksplice.com \
/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;
as well as URLs for NNTP newsgroup(s).