lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/9] swap_info: change to array of pointers
    Hugh Dickins wrote:
    > The swap_info_struct is only 76 or 104 bytes, but it does seem wrong
    > to reserve an array of about 30 of them in bss, when most people will
    > want only one. Change swap_info[] to an array of pointers.
    >
    > That does need a "type" field in the structure: pack it as a char with
    > next type and short prio (aha, char is unsigned by default on PowerPC).
    > Use the (admittedly peculiar) name "type" throughout for this index.
    >
    > /proc/swaps does not take swap_lock: I wouldn't want it to, but do take
    > care with barriers when adding a new item to the array (never removed).
    >
    > Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>

    Acked-by: Rik van Riel <riel@redhat.com>

    --
    All rights reversed.


    \
     
     \ /
      Last update: 2009-10-15 17:07    [W:0.022 / U:31.396 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site