lkml.org 
[lkml]   [2009]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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~


    \
     
     \ /
      Last update: 2009-07-31 23:41    [W:0.020 / U:1.896 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site