linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Maxin John <maxin.john@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Daniel Baluta <dbaluta@ixiacom.com>,
	naveen yadav <yad.naveen@gmail.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: kmemleak for MIPS
Date: Wed, 30 Mar 2011 14:27:12 +0200	[thread overview]
Message-ID: <1301488032.3283.42.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTikXfVNkyFE2MpW9ZtfX2G=QKvT7kvEuDE-YE5xO@mail.gmail.com>

Le mercredi 30 mars 2011 A  13:17 +0100, Maxin John a A(C)crit :
> A quick observation from dmesg after placing printks in
> "net/ipv4/udp.c" for MIPS-malta
> 
> CONFIG_BASE_SMALL : 0
> table->mask : 127
> UDP_HTABLE_SIZE_MIN :  256
> 
> dmesg:
> ....
> ...
> TCP: Hash tables configured (established 8192 bind 8192)
> TCP reno registered
> CONFIG_BASE_SMALL : 0
> UDP hash table entries: 128 (order: 0, 4096 bytes)
> table->mask, UDP_HTABLE_SIZE_MIN : 127 256
> CONFIG_BASE_SMALL : 0
> UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
> table->mask, UDP_HTABLE_SIZE_MIN : 127 256
> NET: Registered protocol family 1
> ....
> ....
> 
> printk(s) are placed in udp.c as listed below:
> 
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 588f47a..ca7f6c6 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -2162,7 +2162,7 @@ __setup("uhash_entries=", set_uhash_entries);
>  void __init udp_table_init(struct udp_table *table, const char *name)
>  {
>         unsigned int i;
> -
> +       printk("CONFIG_BASE_SMALL : %d \n", CONFIG_BASE_SMALL);
>         if (!CONFIG_BASE_SMALL)
>                 table->hash = alloc_large_system_hash(name,
>                         2 * sizeof(struct udp_hslot),
> @@ -2175,6 +2175,8 @@ void __init udp_table_init(struct udp_table
> *table, const char *name)
>         /*
>          * Make sure hash table has the minimum size
>          */
> +       printk("table->mask, UDP_HTABLE_SIZE_MIN : %d %d
> \n",table->mask,UDP_HTABLE_SIZE_MIN);
> +
>         if (CONFIG_BASE_SMALL || table->mask < UDP_HTABLE_SIZE_MIN - 1) {
>                 table->hash = kmalloc(UDP_HTABLE_SIZE_MIN *
>                                       2 * sizeof(struct udp_hslot), GFP_KERNEL);
> ~


How much memory do you have exactly on this machine ?

alloc_large_system_hash() has no parameter to specify a minimum hash
table, and UDP needs one.

If you care about losing 8192 bytes of memory, you could boot with

"uhash_entries=256"



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-03-30 12:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 13:54 naveen yadav
2011-03-24  9:27 ` Daniel Baluta
2011-03-24  9:55   ` Catalin Marinas
2011-03-28 21:15     ` Maxin John
2011-03-29 10:40       ` Catalin Marinas
2011-03-29 11:38         ` Maxin John
2011-03-29 11:50           ` Catalin Marinas
2011-03-29 12:27             ` Maxin John
2011-03-29 19:36               ` Maxin John
2011-03-29 19:54                 ` Daniel Baluta
2011-03-30  9:15                 ` Catalin Marinas
2011-03-30  9:54                   ` Daniel Baluta
2011-03-30  9:58                     ` Catalin Marinas
2011-03-30 11:03                     ` Maxin John
2011-03-30 11:24                       ` Daniel Baluta
2011-03-30 11:38                         ` Catalin Marinas
2011-03-30 12:17                           ` Maxin John
2011-03-30 12:27                             ` Eric Dumazet [this message]
2011-03-30 12:40                               ` Maxin John
2011-03-30 12:52                               ` Daniel Baluta
2011-03-30 13:17                                 ` Maxin John
2011-03-30 13:27                                   ` Eric Dumazet
2011-03-30 14:07                                     ` Maxin John
2011-03-30 14:07                                     ` Catalin Marinas
2011-03-30 12:22                         ` Eric Dumazet
2011-03-30 10:08                   ` Maxin John
2011-03-30 14:28                 ` Ralf Baechle
2011-03-30 14:21         ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2009-11-02 17:07 Kmemleak for mips Luis R. Rodriguez
2009-11-03  9:23 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301488032.3283.42.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=dbaluta@ixiacom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=maxin.john@gmail.com \
    --cc=yad.naveen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox