lkml.org 
[lkml]   [2018]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 06/18] rhashtable: simplify nested_table_alloc() and rht_bucket_nested_insert()
    On Fri, Jun 01, 2018 at 02:44:09PM +1000, NeilBrown wrote:
    > Now that we don't use the hash value or shift in nested_table_alloc()
    > there is room for simplification.
    > We only need to pass a "is this a leaf" flag to nested_table_alloc(),
    > and don't need to track as much information in
    > rht_bucket_nested_insert().
    >
    > Note there is another minor cleanup in nested_table_alloc() here.
    > The number of elements in a page of "union nested_tables" is most naturally
    >
    > PAGE_SIZE / sizeof(ntbl[0])
    >
    > The previous code had
    >
    > PAGE_SIZE / sizeof(ntbl[0].bucket)
    >
    > which happens to be the correct value only because the bucket uses all
    > the space in the union.
    >
    > Signed-off-by: NeilBrown <neilb@suse.com>

    Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
    --
    Email: Herbert Xu <herbert@gondor.apana.org.au>
    Home Page: http://gondor.apana.org.au/~herbert/
    PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

    \
     
     \ /
      Last update: 2018-06-01 18:29    [W:4.534 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site