[lkml]   [2006]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2.6.17-rc5-mm1
    On Tue, 6 Jun 2006, Hugh Dickins wrote:

    > I'll go mad if I try to work it out again: I was as worried as you
    > when I discovered that test in sys_swapon a year or so ago, apparently
    > without any check on MAX_SWAPFILES; and went moaning to Andrew. But
    > once I'd worked through swp_type, pte_to_swp_entry, swp_entry_to_pte,
    > swp_entry, I did come to the conclusion that the MAX_SWAPFILES bound
    > was actually safely built in there.

    I do not think we want anyone go mad so could be simplify this whole m***
    so that mere mortals can comprehend what is going on while reading the

    > Have you no mercy? Oh, wasn't it rendered safe by the:

    Ok. So we have a mystical expression here that needs to be explained:


    swp_entry(~0L,0) ->
    swp_entry(0xffffffffffffffff, 0) ->
    0xfffffffffffffff << SWP_TYPE_SHIFT ->

    Ok we got the highest swap type and this encodes MAX_SWAPFILES_SHIFT and
    therefore limits the number of swap

    But now we convert this to a arch specific pte. The hope is that the arch
    will mask off any unsupported bits? This is done by s390?

    Then we convert the result back into a swap entry and take its type which
    will hopefully give us the maximum number of swap devices supported by the

    Would it not be better for an arch to explicitly tell us how many swap
    devices are supported? Then we could make the swap_info array shorter and
    get rid of this cryptic test.

    This test also creates a problem for the migration entries: It is really
    not clear until runtime how many swap devices are supported so we cannot
    take the last 2 for page migration. In order for page migration to work
    all NUMA arches that do not support 32 swap devices need to define
    CONFIG_MIGRATION=n. Seems that this is only s390?

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-06-06 19:43    [W:0.029 / U:23.336 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site