[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A736460.5070509@twiddle.net>
Date: Fri, 31 Jul 2009 14:38:40 -0700
From: Richard Henderson <rth@...ddle.net>
To: Tim Abbott <tabbott@...lice.com>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sam Ravnborg <sam@...nborg.org>,
Anders Kaseorg <andersk@...lice.com>,
Nelson Elhage <nelhage@...lice.com>,
linux-alpha@...r.kernel.org
Subject: Re: [PATCH 1/2] alpha: use .data.init_task instead of .data.init_thread.
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~
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists