lkml.org 
[lkml]   [2001]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectnetfilter ip_conntrack num_physpages
    num_physpages is shifted too far in netfilter's ip_conntrack_init():
    would go to 0 on a 4GB, 8GB, ... 32-bit machine. Okay, not quite all
    the 4GB goes into num_physpages, so it's rather an issue with 5GB ...

    Naive patch (against 2.4.3-pre2 or 2.4.2-ac11 or 2.4.2 or 2.4.1) below,
    but I won't be submitting this to Alan or Linus myself (unless you ask):
    I expect you'll want to consider whether the number should go on
    climbing linearly in that way above 1GB.

    Hugh

    --- 2.4.2-ac11/net/ipv4/netfilter/ip_conntrack_core.c Mon Mar 5 11:47:01 2001
    +++ linux/net/ipv4/netfilter/ip_conntrack_core.c Mon Mar 5 12:01:49 2001
    @@ -1078,7 +1078,7 @@
    /* Idea from tcp.c: use 1/16384 of memory. On i386: 32MB
    * machine has 256 buckets. 1GB machine has 8192 buckets. */
    ip_conntrack_htable_size
    - = (((num_physpages << PAGE_SHIFT) / 16384)
    + = (((num_physpages << (PAGE_SHIFT - 12)) / 4)
    / sizeof(struct list_head));
    ip_conntrack_max = 8 * ip_conntrack_htable_size;

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:29    [W:0.021 / U:61.748 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site